From f77becc21c6b304db320a9767b119fad2cc4bbb4 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Fri, 4 Feb 2022 18:14:11 -0600 Subject: [PATCH] UI changes, added save_as --- .../SolarFM/solarfm/controller/Controller.py | 7 +- .../usr/share/solarfm/Main_Window.glade | 114 +++++++++++------- 2 files changed, 78 insertions(+), 43 deletions(-) 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 14b62fc..008e308 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 @@ -78,9 +78,14 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi save_load_dialog = self.builder.get_object("save_load_dialog") if action == "save_session": + self.window_controller.save_state() + return + elif action == "save_session_as": save_load_dialog.set_action(Gtk.FileChooserAction.SAVE) elif action == "load_session": save_load_dialog.set_action(Gtk.FileChooserAction.OPEN) + else: + raise Exception(f"Unknown action given: {action}") save_load_dialog.set_current_folder(view.get_current_directory()) save_load_dialog.set_current_name("session.json") @@ -154,7 +159,7 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi if action == "create": self.create_files() - if action in ["save_session", "load_session"]: + if action in ["save_session", "save_session_as", "load_session"]: self.save_load_session(action) self.ctrlDown = False diff --git a/user_config/usr/share/solarfm/Main_Window.glade b/user_config/usr/share/solarfm/Main_Window.glade index f6905d3..e55b351 100644 --- a/user_config/usr/share/solarfm/Main_Window.glade +++ b/user_config/usr/share/solarfm/Main_Window.glade @@ -1139,6 +1139,11 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False gtk-justify-center + + True + False + gtk-save + True @@ -1455,27 +1460,52 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe - - Save Session - save_session + True False - New File/Folder... - image1 - False - - - - - - Load Session - load_session - True - False - New File/Folder... - image2 - False - + Session + + + True + False + + + Save Session + save_session + True + False + New File/Folder... + image4 + False + + + + + + Save Session As + save_session_as + True + False + New File/Folder... + image1 + False + + + + + + Load Session + load_session + True + False + New File/Folder... + image2 + False + + + + + @@ -2458,25 +2488,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe 8 - - - gtk-delete - delete - True - True - True - Delete... - 20 - True - True - - - - False - True - 9 - - Restore From Trash @@ -2491,7 +2502,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 10 + 9 @@ -2502,13 +2513,12 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe True True Empty Trash... - 20 False True - 11 + 10 @@ -2519,6 +2529,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe True True Move to Trash... + 20 trash_img True @@ -2526,7 +2537,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe False True - 12 + 11 @@ -2541,6 +2552,25 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe True + + False + True + 12 + + + + + gtk-delete + delete + True + True + True + Delete... + 20 + True + True + + False True