From 8c69cdebe5b5257ac030bb2febd68554e1f9b415 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Thu, 2 Dec 2021 00:03:11 -0600 Subject: [PATCH] Added TODO signals dbl click and enter key --- README.md | 2 - .../solarfm/signal_classes/ShowHideMixin.py | 16 +- .../mixins/WidgetFileActionMixin.py | 2 + user_config/solarfm/Main_Window.glade | 1894 +++++++++-------- 4 files changed, 964 insertions(+), 950 deletions(-) diff --git a/README.md b/README.md index d445a66..0ff4cae 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ SolarFM is a Gtk+ Python file manager.
  • Add drive size free and consumed info to bottom bar.
  • Add simpleish plugin system to run bash/python scripts.
  • Add DnD context awareness for over folder drop.
  • -
  • Add double click event for App chooser.
  • -
  • Add enter key event for rename dialog.
  • # Images diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/ShowHideMixin.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/ShowHideMixin.py index 9b95f7f..34126aa 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/ShowHideMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/ShowHideMixin.py @@ -3,7 +3,8 @@ # Gtk imports import gi gi.require_version('Gtk', '3.0') -from gi.repository import Gtk, Gio +gi.require_version('Gdk', '3.0') +from gi.repository import Gtk, Gdk, Gio # Application imports @@ -82,7 +83,8 @@ class ShowHideMixin: self.builder.get_object("appchooser_menu").hide() def run_appchooser_launch(self, widget=None, eve=None): - self.builder.get_object("appchooser_select_btn").pressed() + dialog = widget.get_parent().get_parent() + dialog.response(Gtk.ResponseType.OK) def show_context_menu(self, widget=None, eve=None): self.builder.get_object("context_menu").run() @@ -100,7 +102,15 @@ class ShowHideMixin: self.builder.get_object("edit_file_menu").run() def hide_edit_file_menu(self, widget=None, eve=None): - self.builder.get_object("edit_file_menu").hide() + if widget: + name = widget.get_name() + if name == "rename": + self.builder.get_object("edit_file_menu").hide() + + keyname = Gdk.keyval_name(eve.keyval).lower() + if "return" in keyname or "enter" in keyname: + self.builder.get_object("edit_file_menu").hide() + def hide_edit_file_menu_skip(self, widget=None, eve=None): self.skip_edit = True diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WidgetFileActionMixin.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WidgetFileActionMixin.py index a4ec6cb..8429f6e 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WidgetFileActionMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/mixins/WidgetFileActionMixin.py @@ -165,7 +165,9 @@ class WidgetFileActionMixin: def copy_files(self): wid, tid, view, iconview, store = self.get_current_state() + print(self.selected_files) uris = self.format_to_uris(store, wid, tid, self.selected_files) + print(uris) self.to_copy_files = uris def paste_files(self): diff --git a/user_config/solarfm/Main_Window.glade b/user_config/solarfm/Main_Window.glade index bc6e9fc..12f3b7d 100644 --- a/user_config/solarfm/Main_Window.glade +++ b/user_config/solarfm/Main_Window.glade @@ -2,951 +2,6 @@ - - False - mouse - splashscreen - south - - - - False - vertical - 2 - - - False - end - - - gtk-cancel - True - True - True - True - - - True - True - 0 - - - - - Select - True - True - True - - - True - True - 1 - - - - - False - False - 0 - - - - - True - False - False - True - - - - False - True - 1 - - - - - - button31 - appchooser_select_btn - - - - $(which 7za || echo 7zr) a %o %N - - - False - True - center - dialog - center - True - True - - - False - vertical - 2 - - - False - end - - - gtk-cancel - True - True - True - True - - - True - True - 0 - - - - - gtk-ok - True - True - True - True - - - True - True - 1 - - - - - False - False - 0 - - - - - True - False - vertical - - - True - False - True - - - True - False - Compress Commands: - 0.20000000298023224 - - - - - - False - True - 0 - - - - - - - - True - False - Archive Format: - 1 - - - - - - False - True - 2 - - - - - True - False - 0 - 0 - - 7Zip (*.7z) - Zip (*.zip *.ZIP) - RAR (*.rar *.RAR) - Tar (*.tar) - Tar bzip2 (*.tar.bz2) - Tar Gzip (*.tar.gz *.tgz) - Tar xz (*.tar.xz *.txz) - Gzip (*.gz) - XZ (*.xz) - - - - - False - True - 3 - - - - - False - True - 0 - - - - - 72 - True - True - arc_command_buffer - - - True - True - 1 - - - - - False - True - 2 - - - - - - button21 - button22 - - - - True - False - gtk-save-as - - - True - False - gtk-new - - - False - center - splashscreen - center - - - - False - vertical - 2 - - - False - end - - - - - - - - - False - False - 0 - - - - - True - False - vertical - - - 500 - 26 - True - True - gtk-edit - New File/Dir Name... - - - False - True - 0 - - - - - True - False - 20 - vertical - True - - - True - False - - - True - False - 15 - Folder - - - - - - True - True - 0 - - - - - True - False - 15 - File - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - True - File/Folder - True - - - False - True - 1 - - - - - Create - create - True - True - True - Create File/Folder... - createImage - True - - - - False - True - 2 - - - - - True - True - 1 - - - - - True - True - 1 - - - - - - - True - False - gtk-execute - - - - 320 - False - True - bottom - - - True - False - vertical - - - gtk-save-as - True - True - True - True - - - - False - True - 0 - - - - - 600 - True - True - True - in - False - - - message_view - True - True - True - False - False - message_buffer - - - - - False - True - 1 - - - - - - - True - False - gtk-open - - - True - False - gtk-edit - 3 - - - True - False - gtk-edit - - - True - False - gtk-media-forward - - - False - True - center - splashscreen - True - center - - - - False - vertical - 2 - - - False - end - - - Skip - True - True - True - skip_img - True - - - - True - True - 0 - - - - - gtk-cancel - True - True - True - True - - - - True - True - 1 - - - - - False - False - 0 - - - - - True - False - vertical - - - True - False - - - True - False - Rename: - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - False - True - 0 - - - - - 500 - 26 - True - True - gtk-edit - To: - - - False - True - 1 - - - - - Rename - rename - True - True - True - rename_img - True - - - - False - True - 2 - - - - - True - True - 1 - - - - - - - True - False - user-trash - - - True - False - user-trash - - - False - False - mouse - splashscreen - True - False - False - static - - - - False - vertical - 2 - - - False - end - - - - - - - - - False - False - 0 - - - - - True - False - vertical - - - True - False - vertical - - - gtk-delete - delete - True - True - True - Delete... - 20 - True - True - - - - False - True - 11 - - - - - gtk-open - open - True - True - True - Open... - True - - - - False - True - 0 - - - - - Open With - True - True - True - open_with_img - True - - - - False - True - 1 - - - - - gtk-execute - execute - True - True - True - True - - - - False - True - 2 - - - - - Execute in Terminal - execute_in_terminal - True - True - True - exec_in_term_img - - - - False - True - 3 - - - - - Rename - rename - True - True - True - Rename... - 20 - rename_img2 - True - - - - False - True - 4 - - - - - gtk-cut - cut - True - True - True - Cut... - True - True - - - - False - True - 5 - - - - - gtk-copy - copy - True - True - True - Copy... - True - True - - - - False - True - 6 - - - - - gtk-paste - paste - True - True - True - Paste... - True - True - - - - False - True - 7 - - - - - Go To Trash - go_to_trash - True - True - True - Go To Trash... - trash_img2 - True - - - - False - True - end - 8 - - - - - Archive - archive - True - True - True - Archive... - archive_img - True - - - - False - True - 9 - - - - - Trash - trash - True - True - True - Move to Trash... - trash_img - True - - - - False - True - end - 11 - - - - - False - True - 2 - - - - - False - True - 1 - - - - - - - False - True - center - dialog - False - center - warning - Warning! - - - False - vertical - 2 - - - False - True - end - - - gtk-no - True - True - True - True - - - True - True - 0 - - - - - gtk-yes - True - True - True - True - - - True - True - 1 - - - - - False - False - 0 - - - - - - button4 - button3 - - False 5 @@ -1327,11 +382,616 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe + + False + mouse + splashscreen + south + + + + False + vertical + 2 + + + False + end + + + gtk-cancel + True + True + True + True + + + True + True + 0 + + + + + Select + True + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + False + True + + + + False + True + 1 + + + + + + button31 + appchooser_select_btn + + + + $(which 7za || echo 7zr) a %o %N + + + False + True + center + dialog + center + True + True + + + False + vertical + 2 + + + False + end + + + gtk-cancel + True + True + True + True + + + True + True + 0 + + + + + gtk-ok + True + True + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + vertical + + + True + False + True + + + True + False + Compress Commands: + 0.20000000298023224 + + + + + + False + True + 0 + + + + + + + + True + False + Archive Format: + 1 + + + + + + False + True + 2 + + + + + True + False + 0 + 0 + + 7Zip (*.7z) + Zip (*.zip *.ZIP) + RAR (*.rar *.RAR) + Tar (*.tar) + Tar bzip2 (*.tar.bz2) + Tar Gzip (*.tar.gz *.tgz) + Tar xz (*.tar.xz *.txz) + Gzip (*.gz) + XZ (*.xz) + + + + + False + True + 3 + + + + + False + True + 0 + + + + + 72 + True + True + arc_command_buffer + + + True + True + 1 + + + + + False + True + 2 + + + + + + button21 + button22 + + + + True + False + gtk-save-as + + + True + False + gtk-new + + + False + center + splashscreen + center + + + + False + vertical + 2 + + + False + end + + + + + + + + + False + False + 0 + + + + + True + False + vertical + + + 500 + 26 + True + True + True + gtk-edit + New File/Dir Name... + + + False + True + 0 + + + + + True + False + 20 + vertical + True + + + True + False + + + True + False + 15 + Folder + + + + + + True + True + 0 + + + + + True + False + 15 + File + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + True + File/Folder + True + + + False + True + 1 + + + + + Create + create + True + True + True + Create File/Folder... + createImage + True + + + + False + True + 2 + + + + + True + True + 1 + + + + + True + True + 1 + + + + + + + True + False + gtk-execute + True False gtk-justify-center + + + 320 + False + True + bottom + + + True + False + vertical + + + gtk-save-as + True + True + True + True + + + + False + True + 0 + + + + + 600 + True + True + True + in + False + + + message_view + True + True + True + False + False + message_buffer + + + + + False + True + 1 + + + + + + + True + False + gtk-open + + + True + False + gtk-edit + 3 + + + True + False + gtk-edit + + + True + False + gtk-media-forward + + + False + True + center + splashscreen + True + center + + + + False + vertical + 2 + + + False + end + + + Skip + True + True + True + skip_img + True + + + + True + True + 0 + + + + + gtk-cancel + True + True + True + True + + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + vertical + + + True + False + + + True + False + Rename: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + False + True + 0 + + + + + 500 + 26 + True + True + True + gtk-edit + To: + + + + False + True + 1 + + + + + Rename + rename + True + True + True + rename_img + True + + + + False + True + 2 + + + + + True + True + 1 + + + + + True False @@ -1979,4 +1639,348 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe + + True + False + user-trash + + + True + False + user-trash + + + False + False + mouse + splashscreen + True + False + False + static + + + + False + vertical + 2 + + + False + end + + + + + + + + + False + False + 0 + + + + + True + False + vertical + + + True + False + vertical + + + gtk-delete + delete + True + True + True + Delete... + 20 + True + True + + + + False + True + 11 + + + + + gtk-open + open + True + True + True + Open... + True + + + + False + True + 0 + + + + + Open With + True + True + True + open_with_img + True + + + + False + True + 1 + + + + + gtk-execute + execute + True + True + True + True + + + + False + True + 2 + + + + + Execute in Terminal + execute_in_terminal + True + True + True + exec_in_term_img + + + + False + True + 3 + + + + + Rename + rename + True + True + True + Rename... + 20 + rename_img2 + True + + + + False + True + 4 + + + + + gtk-cut + cut + True + True + True + Cut... + True + True + + + + False + True + 5 + + + + + gtk-copy + copy + True + True + True + Copy... + True + True + + + + False + True + 6 + + + + + gtk-paste + paste + True + True + True + Paste... + True + True + + + + False + True + 7 + + + + + Go To Trash + go_to_trash + True + True + True + Go To Trash... + trash_img2 + True + + + + False + True + end + 8 + + + + + Archive + archive + True + True + True + Archive... + archive_img + True + + + + False + True + 9 + + + + + Trash + trash + True + True + True + Move to Trash... + trash_img + True + + + + False + True + end + 11 + + + + + False + True + 2 + + + + + False + True + 1 + + + + + + + False + True + center + dialog + False + center + warning + Warning! + + + False + vertical + 2 + + + False + True + end + + + gtk-no + True + True + True + True + + + True + True + 0 + + + + + gtk-yes + True + True + True + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + + button4 + button3 + +