diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/Controller.py b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/Controller.py index 325c860..f87902a 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/Controller.py +++ b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/Controller.py @@ -75,6 +75,11 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi data = method(*(self, *parameters)) self.plugins.set_message_on_plugin(type, data) + def open_terminal(self, widget=None, eve=None): + wid, tid = self.window_controller.get_active_wid_and_tid() + view = self.get_fm_window(wid).get_view_by_id(tid) + dir = view.get_current_directory() + view.execute(f"{view.terminal_app}", dir) def save_load_session(self, action="save_session"): wid, tid = self.window_controller.get_active_wid_and_tid() @@ -107,7 +112,6 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi save_load_dialog.hide() - def load_session(self, session_json): if debug: print(f"Session Data: {session_json}") @@ -162,8 +166,6 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi self.empty_trash() if action == "create": - self.create_files() + self.show_new_file_menu() if action in ["save_session", "save_session_as", "load_session"]: self.save_load_session(action) - - self.ctrlDown = False diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WidgetFileActionMixin.py b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WidgetFileActionMixin.py index 161cf11..8b7d275 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WidgetFileActionMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WidgetFileActionMixin.py @@ -87,8 +87,8 @@ class WidgetFileActionMixin: def do_file_search(self, widget, eve=None): query = widget.get_text() self.search_iconview.unselect_all() - for i, file in enumerate(self.search_view.files): - if query and query in file.lower(): + for i, file in enumerate(self.search_view.get_files()): + if query and query in file[0].lower(): path = Gtk.TreePath().new_from_indices([i]) self.search_iconview.select_path(path) diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WindowMixin.py b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WindowMixin.py index f4d7392..c4ee00c 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WindowMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/mixins/ui/WindowMixin.py @@ -182,9 +182,11 @@ class WindowMixin(TabMixin): def grid_icon_double_click(self, iconview, item, data=None): try: if self.ctrlDown and self.shiftDown: + self.unset_keys_and_data() self.execute_files(in_terminal=True) return elif self.ctrlDown: + self.unset_keys_and_data() self.execute_files() return diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/signals/KeyboardSignalsMixin.py b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/signals/KeyboardSignalsMixin.py index 89fe462..ee27648 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/signals/KeyboardSignalsMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/solarfm/controller/signals/KeyboardSignalsMixin.py @@ -47,6 +47,7 @@ class KeyboardSignalsMixin: if self.ctrlDown and self.shiftDown and keyname == "t": + self.unset_keys_and_data() self.trash_files() @@ -57,6 +58,7 @@ class KeyboardSignalsMixin: if isinstance(focused_obj, Gtk.IconView): self.is_searching = True wid, tid, self.search_view, self.search_iconview, store = self.get_current_state() + self.unset_keys_and_data() self.popup_search_files(wid, keyname) return @@ -79,26 +81,30 @@ class KeyboardSignalsMixin: if (self.ctrlDown and keyname == "up") or (self.ctrlDown and keyname == "u"): self.builder.get_object("go_up").released() if self.ctrlDown and keyname == "l": + self.unset_keys_and_data() self.builder.get_object("path_entry").grab_focus() if self.ctrlDown and keyname == "t": self.builder.get_object("create_tab").released() if self.ctrlDown and keyname == "o": + self.unset_keys_and_data() self.open_files() if self.ctrlDown and keyname == "w": self.keyboard_close_tab() if self.ctrlDown and keyname == "h": self.show_hide_hidden_files() if (self.ctrlDown and keyname == "e"): + self.unset_keys_and_data() self.rename_files() if self.ctrlDown and keyname == "c": - self.to_cut_files.clear() self.copy_files() + self.to_cut_files.clear() if self.ctrlDown and keyname == "x": self.to_copy_files.clear() self.cut_files() if self.ctrlDown and keyname == "v": self.paste_files() if self.ctrlDown and keyname == "n": + self.unset_keys_and_data() self.show_new_file_menu() @@ -110,11 +116,11 @@ class KeyboardSignalsMixin: else: top_main_menubar.show() if keyname == "delete": + self.unset_keys_and_data() self.delete_files() if keyname == "f2": + self.unset_keys_and_data() self.rename_files() if keyname == "f4": - wid, tid = self.window_controller.get_active_wid_and_tid() - view = self.get_fm_window(wid).get_view_by_id(tid) - dir = view.get_current_directory() - view.execute(f"{view.terminal_app}", dir) + self.unset_keys_and_data() + self.open_terminal() diff --git a/user_config/usr/share/solarfm/Main_Window.glade b/user_config/usr/share/solarfm/Main_Window.glade index 9adfb86..07da0ac 100644 --- a/user_config/usr/share/solarfm/Main_Window.glade +++ b/user_config/usr/share/solarfm/Main_Window.glade @@ -1144,6 +1144,11 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False gtk-save + + True + False + gtk-execute + True @@ -1459,6 +1464,16 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False + + + Terminal + True + False + image5 + False + + + True @@ -2397,6 +2412,24 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe 3 + + + gtk-new + create + True + True + True + New File/Folder... + 20 + True + + + + False + True + 4 + + Rename @@ -2405,7 +2438,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe True True Rename... - 20 rename_img2 True @@ -2413,7 +2445,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 4 + 5 @@ -2431,7 +2463,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 5 + 6 @@ -2449,7 +2481,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 6 + 7 @@ -2467,7 +2499,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 7 + 8 @@ -2485,7 +2517,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 8 + 9 @@ -2502,7 +2534,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 9 + 10 @@ -2518,7 +2550,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 10 + 11 @@ -2537,7 +2569,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 11 + 12 @@ -2555,7 +2587,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 12 + 13 @@ -2574,7 +2606,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 13 + 14