From cf540e5c9a4b2668c878180744e91ae2b63b1cda Mon Sep 17 00:00:00 2001 From: DYefremov Date: Mon, 29 Jun 2020 15:58:43 +0300 Subject: [PATCH] picons explorer gui changes --- app/ui/picons_manager.glade | 237 ++++++++++++++++++------------------ app/ui/picons_manager.py | 14 +-- 2 files changed, 126 insertions(+), 125 deletions(-) diff --git a/app/ui/picons_manager.glade b/app/ui/picons_manager.glade index 8adba4cf..d0a82f36 100644 --- a/app/ui/picons_manager.glade +++ b/app/ui/picons_manager.glade @@ -49,6 +49,11 @@ Author: Dmitriy Yefremov edit-find-replace-symbolic 1 + + True + False + emblem-important-symbolic + True False @@ -342,49 +347,6 @@ Author: Dmitriy Yefremov 1 - - - False - 1 - 1 - - - True - True - edit-find-symbolic - False - False - - - - - False - True - 2 - - - - - False - 1 - 1 - - - True - True - edit-find-replace-symbolic - False - False - - - - - - False - True - 3 - - True @@ -399,6 +361,7 @@ Author: Dmitriy Yefremov 5 5 5 + vertical True @@ -410,10 +373,33 @@ Author: Dmitriy Yefremov True False + + + True + False + Source: + + + False + True + 3 + + False 2 + + + True + False + Filter + + + 0 + 0 + + True @@ -424,17 +410,6 @@ Author: Dmitriy Yefremov True - - 0 - 0 - - - - - True - False - Filter - 1 0 @@ -444,21 +419,10 @@ Author: Dmitriy Yefremov False True + end 0 - - - True - False - Source: - - - False - True - 3 - - False @@ -745,8 +709,8 @@ Author: Dmitriy Yefremov 10 - 128 - 72 + 100 + 60 True False gtk-missing-image @@ -763,6 +727,7 @@ Author: Dmitriy Yefremov True False + end False @@ -792,6 +757,49 @@ Author: Dmitriy Yefremov 6 + + + False + 1 + 1 + + + True + True + edit-find-symbolic + False + False + + + + + False + True + 7 + + + + + False + 1 + 1 + + + True + True + edit-find-replace-symbolic + False + False + + + + + + False + True + 8 + + explorer @@ -821,7 +829,7 @@ Author: Dmitriy Yefremov True - 200 + 180 True False 2 @@ -946,7 +954,6 @@ Author: Dmitriy Yefremov - 280 True False 2 @@ -1238,7 +1245,7 @@ Author: Dmitriy Yefremov center - Enigma2 (default) + Enigma2 True True False @@ -1306,7 +1313,7 @@ Author: Dmitriy Yefremov center - No(default) + No True True False @@ -1533,6 +1540,25 @@ Author: Dmitriy Yefremov True False expand + + + Receive + True + True + True + Download from the receiver + receive_image + True + + + + + False + True + 0 + True + + Send @@ -1551,24 +1577,6 @@ Author: Dmitriy Yefremov 0 - - - Receive - True - True - True - Download from the receiver - receive_image - True - - - - - False - True - 1 - - Remove @@ -1584,31 +1592,7 @@ Author: Dmitriy Yefremov False True - 3 - - - - - True - True - False - Details - False - - - True - False - emblem-important-symbolic - - - - - - False - True - end - 5 - True + 4 @@ -1626,7 +1610,25 @@ Author: Dmitriy Yefremov False True - 6 + 5 + + + + + Details + True + True + True + info_toggle_button_image + True + + + + True + True + end + 5 + True @@ -1734,10 +1736,9 @@ Author: Dmitriy Yefremov True True - True - 150 + 100 True True in diff --git a/app/ui/picons_manager.py b/app/ui/picons_manager.py index 49a8d9b3..0d304b8a 100644 --- a/app/ui/picons_manager.py +++ b/app/ui/picons_manager.py @@ -103,7 +103,7 @@ class PiconsDialog: self._url_entry = builder.get_object("url_entry") self._picons_dir_entry = builder.get_object("picons_dir_entry") self._message_label = builder.get_object("info_bar_message_label") - self._info_check_button = builder.get_object("info_check_button") + self._info_toggle_button = builder.get_object("info_toggle_button") self._picon_info_image = builder.get_object("picon_info_image") self._picon_info_label = builder.get_object("picon_info_label") self._load_providers_button = builder.get_object("load_providers_button") @@ -135,10 +135,10 @@ class PiconsDialog: self._filter_button.bind_property("active", builder.get_object("filter_service_box"), "visible") self._filter_button.bind_property("active", builder.get_object("src_title_grid"), "visible") self._filter_button.bind_property("active", builder.get_object("dst_title_grid"), "visible") - self._filter_button.bind_property("visible", self._info_check_button, "visible") + self._filter_button.bind_property("visible", self._info_toggle_button, "visible") explorer_info_bar = builder.get_object("explorer_info_bar") explorer_info_bar.bind_property("visible", builder.get_object("explorer_info_bar_frame"), "visible") - self._info_check_button.bind_property("active", explorer_info_bar, "visible") + self._info_toggle_button.bind_property("active", explorer_info_bar, "visible") # Init drag-and-drop self.init_drag_and_drop() # Style @@ -356,7 +356,7 @@ class PiconsDialog: def on_send_button_drag_data_received(self, button, drag_context, x, y, data, info, time): path = self.get_path_from_uris(data) - if path: + if path and show_dialog(DialogType.QUESTION, self._dialog) == Gtk.ResponseType.OK: self.on_send(files_filter={path.name}, path=path.parent) def on_download_button_drag_data_received(self, button, drag_context, x, y, data, info, time): @@ -385,7 +385,7 @@ class PiconsDialog: def on_selective_send(self, view): path = self.get_selected_path(view) - if path: + if path and show_dialog(DialogType.QUESTION, self._dialog) == Gtk.ResponseType.OK: self.on_send(files_filter={path.name}, path=path.parent) def on_selective_download(self, view): @@ -438,7 +438,7 @@ class PiconsDialog: files_filter=files_filter), True) def on_remove(self, item=None, files_filter=None): - if show_dialog(DialogType.QUESTION, self._dialog) == Gtk.ResponseType.CANCEL: + if show_dialog(DialogType.QUESTION, self._dialog) != Gtk.ResponseType.OK: return self.run_func(lambda: remove_picons(settings=self._settings, @@ -731,7 +731,7 @@ class PiconsDialog: map(lambda s: s.picon_id, filter(lambda s: txt in s.service.upper(), self._app.current_services.values()))) def on_picon_activated(self, view): - if self._info_check_button.get_active(): + if self._info_toggle_button.get_active(): model, path = view.get_selection().get_selected_rows() if not path: return