Defaulting open/save to .local/usr/share/gtk4 folder

This commit is contained in:
itdominator 2023-10-22 22:02:45 -05:00
parent 66491a6198
commit f3e808b839
6 changed files with 27 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View File

@ -25,7 +25,8 @@ class DialogSignalsMixin():
file_chooser.add_filter(file_filter) file_chooser.add_filter(file_filter)
file_chooser.set_default_response(Gtk.ResponseType.OK) file_chooser.set_default_response(Gtk.ResponseType.OK)
file_chooser.set_current_folder(os.path.expanduser('~')) path = f"{os.path.expanduser('~')}/.local/share/gtksourceview-4/styles"
file_chooser.set_current_folder(path)
path = None path = None
response = file_chooser.run() response = file_chooser.run()
@ -112,7 +113,8 @@ class DialogSignalsMixin():
file_chooser.add_filter(file_filter) file_chooser.add_filter(file_filter)
file_chooser.set_default_response(Gtk.ResponseType.OK) file_chooser.set_default_response(Gtk.ResponseType.OK)
file_chooser.set_current_folder( os.path.expanduser('~') ) path = f"{os.path.expanduser('~')}/.local/share/gtksourceview-4/styles"
file_chooser.set_current_folder(path)
if current_name: if current_name:
file_chooser.set_current_name(current_name) file_chooser.set_current_name(current_name)

View File

@ -18,6 +18,6 @@ function main() {
fi fi
cd "/opt/" cd "/opt/"
python /opt/gtk-code-themer.zip "$@" python /opt/gtkcodethemer.zip "$@"
} }
main "$@"; main "$@";

View File

@ -1,11 +0,0 @@
[Desktop Entry]
Name=<change_me>
GenericName=<change_me>
Comment=<change_me>
Exec=/bin/<change_me> %F
Icon=/usr/share/<change_me>/icons/<change_me>.png
Type=Application
StartupNotify=true
Categories=System;FileTools;Utility;Core;GTK;FileManager;
MimeType=
Terminal=false

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Gtk Code Themer
GenericName=Code Syntax Themer.
Comment=A code syntax theming tool for Gtk Source View using tools.
Exec=/bin/gtkcodethemer %F
Icon=/usr/share/gtkcodethemer/icons/gtkcodethemer.png
Type=Application
StartupNotify=true
Categories=System;Utility;Core;GTK;Code;IDE;Development
MimeType=
Terminal=false

View File

@ -411,6 +411,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<signal name="color-set" handler="on_style_changed" swapped="no"/>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@ -422,6 +423,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<signal name="color-set" handler="on_style_changed" swapped="no"/>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@ -643,6 +645,15 @@
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="left-margin">2</property> <property name="left-margin">2</property>
<property name="right-margin">2</property> <property name="right-margin">2</property>
<property name="monospace">True</property>
<property name="show-line-numbers">True</property>
<property name="show-line-marks">True</property>
<property name="auto-indent">True</property>
<property name="insert-spaces-instead-of-tabs">True</property>
<property name="show-right-margin">True</property>
<property name="smart-home-end">always</property>
<property name="highlight-current-line">True</property>
<property name="smart-backspace">True</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>