diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 850a901b..9d46d2bd 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -205,6 +205,12 @@ class Application(Gtk.Application): self._bouquets_main_box = builder.get_object("bouquets_main_box") self._header_bar = builder.get_object("header_bar") self._bq_name_label = builder.get_object("bq_name_label") + # App info + self._app_info_box = builder.get_object("app_info_box") + self._app_info_box.bind_property("visible", self._status_bar_box, "visible", 4) + self._app_info_box.bind_property("visible", builder.get_object("main_paned"), "visible", 4) + self._app_info_box.bind_property("visible", builder.get_object("right_header_box"), "sensitive", 4) + self._app_info_box.bind_property("visible", builder.get_object("left_header_box"), "sensitive", 4) # Status bar self._ip_label = builder.get_object("ip_label") self._ip_label.set_text(self._options.get(self._profile).get("host")) @@ -273,7 +279,6 @@ class Application(Gtk.Application): self.init_drag_and_drop() self.init_colors() self.init_http_api() - self._services_view.grab_focus() def do_activate(self): self._main_window.set_application(self) @@ -875,11 +880,18 @@ class Application(Gtk.Application): yield True def append_data(self, bouquets, services): + if self._app_info_box.get_visible(): + yield from self.show_app_info(False) self.append_bouquets(bouquets) yield from self.append_services(services) self.update_sat_positions() yield True + def show_app_info(self, visible): + self._app_info_box.set_visible(visible) + self._app_info_box.grab_focus() if visible else self._services_view.grab_focus() + yield True + def append_blacklist(self, black_list): if black_list: self._blacklist.update(black_list) @@ -1154,6 +1166,7 @@ class Application(Gtk.Application): profile = self._options.get("profile") self._ip_label.set_text(self._options.get(profile).get("host")) if profile != self._profile: + yield from self.show_app_info(True) self._profile = profile c_gen = self.clear_current_data() yield from c_gen @@ -1632,8 +1645,8 @@ class Application(Gtk.Application): def on_main_window_state(self, window, event): full = not event.new_window_state & Gdk.WindowState.FULLSCREEN self._main_data_box.set_visible(full) - self._status_bar_box.set_visible(full) self._player_tool_bar.set_visible(full) + self._status_bar_box.set_visible(full and not self._app_info_box.get_visible()) # ************************ HTTP API ****************************# diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index e1c21ae7..a4733bdd 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -346,6 +346,7 @@ Author: Dmitriy Yefremov True + False True True Bouquet @@ -991,43 +992,41 @@ Author: Dmitriy Yefremov - + True False + 1 + 1 + + + 2 + + + + + True + False + True + FTP-transfer + + + + True + False + network-wired + + + + + 3 + + + + + True + False + False 1 - - - True - False - - - False - True - 2 - 0 - - - - - True - False - True - FTP-transfer - - - - True - False - network-wired - - - - - False - True - 1 - - True @@ -1051,7 +1050,7 @@ Author: Dmitriy Yefremov - + True False @@ -1105,7 +1104,7 @@ Author: Dmitriy Yefremov - + True False @@ -1162,12 +1161,13 @@ Author: Dmitriy Yefremov - 2 + 4 True + False False 1 @@ -1347,7 +1347,6 @@ Author: Dmitriy Yefremov vertical - True False @@ -2719,10 +2718,67 @@ Author: Dmitriy Yefremov 0 + + + True + True + vertical + + + + + True + False + gtk-edit + 6 + + + False + True + 0 + + + + + True + False + DemonEditor + + + + + + + False + True + 1 + + + + + True + False + 0.4.6 Pre-alpha + + + + + + False + True + 2 + + + + + False + True + 2 + + 24 - True False