diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/Controller_Data.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/Controller_Data.py index 3bb9385..b9ff230 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/Controller_Data.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/Controller_Data.py @@ -82,6 +82,11 @@ class Controller_Data: self.is_pane3_hidden = False self.is_pane4_hidden = False + self.is_searching = False + self.search_iconview = None + self.search_view = None + + self.skip_edit = False self.cancel_edit = False self.ctrlDown = False diff --git a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/KeyboardSignalsMixin.py b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/KeyboardSignalsMixin.py index 868ceaa..3b253e0 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/KeyboardSignalsMixin.py +++ b/src/versions/solarfm-0.0.1/SolarFM/new/solarfm/signal_classes/KeyboardSignalsMixin.py @@ -1,4 +1,5 @@ # Python imports +import re # Lib imports import gi @@ -9,6 +10,7 @@ from gi.repository import Gtk, Gdk # Application imports +valid_fname_pat = re.compile(r"[a-z0-9A-Z-_\[\]\(\)\| ]") class KeyboardSignalsMixin: @@ -37,6 +39,16 @@ class KeyboardSignalsMixin: if "alt" in keyname: self.altDown = False + + if re.fullmatch(valid_fname_pat, keyname): + if not self.ctrlDown and not self.shiftDown and not self.altDown: + if not self.is_searching: + self.is_searching = True + wid, tid, self.search_view, self.search_iconview, store = self.get_current_state() + self.popup_search_files(wid, keyname) + return + + if self.ctrlDown and self.shiftDown and keyname == "t": self.trash_files() 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 653f335..d34bba2 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 @@ -13,6 +13,9 @@ class ShowHideMixin: def show_messages_popup(self, type, text, seconds=None): self.message_widget.popup() + def stop_file_searching(self, widget=None, eve=None): + self.is_searching = False + def show_exists_page(self, widget=None, eve=None): response = self.file_exists_dialog.run() 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 b8d4ab6..01ce62d 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 @@ -55,6 +55,19 @@ class WidgetFileActionMixin: + def popup_search_files(self, wid, keyname): + entry = self.builder.get_object(f"win{wid}_search_field") + entry.set_text(keyname) + entry.grab_focus_without_selecting() + self.builder.get_object(f"win{wid}_search").popup() + + 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(): + path = Gtk.TreePath().new_from_indices([i]) + self.search_iconview.select_path(path) def open_files(self): wid, tid, view, iconview, store = self.get_current_state() diff --git a/user_config/solarfm/Main_Window.glade b/user_config/solarfm/Main_Window.glade index cb4a4ee..029013d 100644 --- a/user_config/solarfm/Main_Window.glade +++ b/user_config/solarfm/Main_Window.glade @@ -1658,6 +1658,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe notebook1 True True + True 5 5 5 @@ -1695,6 +1696,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe notebook2 True True + True 5 5 5 @@ -1746,6 +1748,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe notebook3 True True + True 5 5 5 @@ -1783,6 +1786,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe notebook4 True True + True 5 5 5 @@ -1882,6 +1886,92 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe + + False + 5 + 5 + 5 + 5 + window_1 + bottom + none + + + + 52 + True + True + + + + + + + False + 5 + 5 + 5 + 5 + window_2 + bottom + none + + + + 96 + True + True + + + + + + + False + 5 + 5 + 5 + 5 + window_3 + none + + + + 96 + True + True + + + + + + + False + 5 + 5 + 5 + 5 + window_4 + none + + + + 96 + True + True + + + + + True False diff --git a/user_config/solarfm/stylesheet.css b/user_config/solarfm/stylesheet.css index 4c11309..c0383f6 100644 --- a/user_config/solarfm/stylesheet.css +++ b/user_config/solarfm/stylesheet.css @@ -35,6 +35,10 @@ notebook > header > tabs > tab:checked { border: 2px solid rgba(116, 0, 0, 0.64); } +.search-border { + border: 2px solid rgba(136, 204, 39, 1); +} + .notebook-selected-focus { /* Neon Blue 00e8ff border */ border: 2px solid rgba(0, 232, 255, 0.34);