From fdd2d61a28f01b78065ce8f8cc3d85da6f54e4ce Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sun, 30 Sep 2018 00:12:15 +0300 Subject: [PATCH] new player prototype --- app/ui/main_app_window.py | 28 +- app/ui/main_window.glade | 2246 ++++++++++++++++++------------------- 2 files changed, 1138 insertions(+), 1136 deletions(-) diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 5ecf18fe..0897cafe 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1,6 +1,5 @@ import os import shutil -import time from contextlib import suppress from functools import lru_cache @@ -182,9 +181,12 @@ class MainAppWindow: self._fav_model = builder.get_object("fav_list_store") self._services_model = builder.get_object("services_list_store") self._bouquets_model = builder.get_object("bouquets_tree_store") - self._main_window_box = builder.get_object("main_window_box") + self._main_data_box = builder.get_object("main_data_box") self._player_drawing_area = builder.get_object("player_drawing_area") - self._player_box = builder.get_object("player_box") + self._player_tool_bar = builder.get_object("player_tool_bar") + self._status_bar_box = builder.get_object("status_bar_box") + self._services_main_box = builder.get_object("services_main_box") + self._bouquets_main_box = builder.get_object("bouquets_main_box") # Enabling events for the drawing area self._player_drawing_area.set_events(Gdk.ModifierType.BUTTON1_MASK) self._player_frame = builder.get_object("player_frame") @@ -1211,7 +1213,7 @@ class MainAppWindow: if not url: return - self._player_box.set_visible(True) + self._player_drawing_area.set_visible(True) if not self._player: try: @@ -1234,7 +1236,9 @@ class MainAppWindow: if self._player: self._player.release() self._player = None - GLib.idle_add(self._player_box.set_visible, False, priority=GLib.PRIORITY_LOW) + GLib.idle_add(self._player_drawing_area.set_visible, False, priority=GLib.PRIORITY_LOW) + GLib.idle_add(self._services_main_box.set_visible, True, priority=GLib.PRIORITY_LOW) + GLib.idle_add(self._bouquets_main_box.set_visible, True, priority=GLib.PRIORITY_LOW) def on_player_size_allocate(self, area, rectangle=None): area.hide() @@ -1243,6 +1247,8 @@ class MainAppWindow: def on_drawing_area_realize(self, widget): self._drawing_area_xid = widget.get_window().get_xid() self._player.set_xwindow(self._drawing_area_xid) + self._services_main_box.set_visible(False) + self._bouquets_main_box.set_visible(False) def on_player_press(self, area, event): if event.button == Gdk.BUTTON_PRIMARY: @@ -1254,14 +1260,10 @@ class MainAppWindow: self._main_window.fullscreen() if self._full_screen else self._main_window.unfullscreen() def on_main_window_state(self, window, event): - if event.new_window_state & Gdk.WindowState.FULLSCREEN: - if self._main_window_box in window: - window.remove(self._main_window_box) - self._player_drawing_area.reparent(window) - elif self._player_drawing_area in window: - window.remove(self._player_drawing_area) - window.add(self._main_window_box) - self._player_frame.add(self._player_drawing_area) + full = not event.new_window_state & Gdk.WindowState.FULLSCREEN + self._main_data_box.set_visible(full) + self._player_tool_bar.set_visible(full) + self._status_bar_box.set_visible(full) # ***************** Filter and search *********************# diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index 09b90b49..d0550829 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -1204,994 +1204,52 @@ Author: Dmitriy Yefremov - + True False - 1 vertical - - - True - False - - - True - False - 1 - - - 32 - True - True - edit-find-symbolic - False - False - - - - False - True - 0 - - - - - True - False - False - True - half - - - - True - False - center - down - - - - - False - False - 1 - - - - - True - False - False - True - half - - - - True - False - center - up - - - - - False - False - 2 - - - - - - - False - True - 0 - - - - - False - - - True - False - 2 - - - Only free - True - True - True - - - - False - False - 0 - - - - - 32 - True - True - tools-check-spelling - False - False - - - - False - True - 1 - - - - - True - False - filter_types_list_store - 0 - 0 - - - - - 0 - - - - - False - True - 2 - - - - - True - False - filter_sat_positions_list_store - 0 - 0 - - - - - 0 - - - - - False - True - 3 - - - - - - - False - True - 1 - - - 250 True True - 1 - 1 - True - - True + + 320 + 240 False - vertical - - - True - False - Services - - - - - - False - True - 0 - - - - - True - True - in - - - True - True - services_model_tree_model_sort - 3 - True - both - True - - - - - - - - - - - multiple - - - - - False - CAS - - - - 0 - - - - - - - False - Type - - - - 1 - - - - - - - True - 2 - 50 - Service - True - True - 3 - - - - 2 - - - - - end - 25 - - - 3 - - - - - - 4 - - - - - - 5 - - - - - - - True - 50 - Package - True - True - 6 - - - end - 15 - - - 6 - - - - - - - True - 25 - Type - True - True - 7 - - - 0.51999998092651367 - - - 7 - - - - - - - Picon - True - 9 - - - - 8 - - - - - - - False - fixed - Picon ID - - - - 9 - - - - - - - True - 25 - SID - True - True - 10 - - - 0.50999999046325684 - - - 10 - - - - - - - True - 25 - Freq - True - True - 11 - - - 0.50999999046325684 - - - 11 - - - - - - - True - 25 - Rate - True - True - 12 - - - 0.50999999046325684 - - - 12 - - - - - - - True - 25 - Pol - True - True - 13 - - - 0.50999999046325684 - - - 13 - - - - - - - True - 25 - FEC - True - True - 14 - - - 0.50999999046325684 - - - 14 - - - - - - - True - 25 - System - True - True - 15 - - - 0.50999999046325684 - - - 15 - - - - - - - True - 25 - Pos - True - 16 - - - 0.50999999046325684 - - - 16 - - - - - - - False - data_id - - - - 17 - - - - - - - False - fav_id - - - - 18 - - - - - - - False - transponder - - - - 19 - - - - - - - - - True - True - 1 - - - - - 22 - True - False - queue - 2 - - - True - False - 5 - emblem-readonly - - - False - True - 0 - - - - - True - False - CAS - 20 - 20 - 0 - - - False - True - 2 - 1 - - - - - True - False - vertical - - - False - True - 5 - 2 - - - - - True - False - tv-symbolic - - - False - True - 3 - - - - - True - False - TV - 5 - 0 - - - False - True - 4 - - - - - True - False - network-wireless-symbolic - - - False - True - 5 - - - - - True - False - Radio - 5 - 0 - - - False - True - 6 - - - - - True - False - system-run - - - False - True - 7 - - - - - True - False - Data - 0 - - - False - True - 8 - - - - - True - False - vertical - - - False - True - 5 - 9 - - - - - False - True - 3 - - + + + - True - False + False + True - + True - True - True + False + 1 + vertical - + True False - vertical - + True False - Bouquet details - - - - - - False - True - 0 - - - - - True - True - vertical - True + 1 - - False - vertical - - - True - False - 2 - 2 - 0 - 0 - in - - - True - False - - - - - - - - - - - True - True - 0 - - - - - True - False - - - True - False - Play - gtk-media-play - - - - False - True - - - - - True - False - Stop - True - gtk-media-stop - - - - False - True - - - - - True - False - - - True - False - - - - - False - Fullscreen - True - gtk-fullscreen - - - - False - True - - - - - True - False - - - False - False - - - - - True - False - Close - Close - True - gtk-close - - - - False - True - - - - - False - False - end - 1 - - - - - True - True - - - - + + 32 True True - 2 - in - - - True - True - fav_list_store - 2 - True - both - True - - - - - - - - - - - multiple - - - - - True - 25 - Num - - - 0.20000000298023224 - 5 - 5 - - - 0 - - - - - - - True - 2 - 50 - Service - True - - - - 8 - - - - - - 1 - - - - - end - 25 - - - 2 - - - - - - 3 - - - - - - 4 - - - - - - - True - 25 - Type - True - - - 0.50999999046325684 - - - 5 - - - - - - - 25 - Pos - True - - - 0.50999999046325684 - - - 6 - - - - - - - False - fav_id - - - - 7 - - - - - - - - - True - True - - - - - True - True - 1 - - - - - 20 - True - False - 2 - - - True - False - document-properties + edit-find-symbolic + False + False + False @@ -2200,13 +1258,91 @@ Author: Dmitriy Yefremov - + True + False False - 0 - 4 - 4 - 0 + True + half + + + + True + False + center + down + + + + + False + False + 1 + + + + + True + False + False + True + half + + + + True + False + center + up + + + + + False + False + 2 + + + + + + + False + True + 0 + + + + + False + + + True + False + 2 + + + Only free + True + True + True + + + + False + False + 0 + + + + + 32 + True + True + tools-check-spelling + False + False + False @@ -2215,9 +1351,19 @@ Author: Dmitriy Yefremov - + True False + filter_types_list_store + 0 + 0 + + + + + 0 + + False @@ -2226,153 +1372,56 @@ Author: Dmitriy Yefremov - + True False - center + filter_sat_positions_list_store + 0 + 0 + - - True - False - True - end - 12 - 20 - + + + 0 + - True + False True 3 - - False - True - 4 - - True - False + False + True + 1 - + + 250 True - False - vertical + True + 1 + 1 + True - + True False - Bouquets - - - - - - False - True - 0 - - - - - True - True - 2 - in + vertical - - True - True - bouquets_tree_store - False - 0 - True - True - True - - - - - - - - - - - - multiple - - - - - True - 2 - autosize - Bouquets - True - - - - 0 - - - - - - 1 - - - - - 0 - - - 2 - - - - - - - False - True - autosize - Type - - - - 3 - - - - - - - - - True - True - 1 - - - - - 20 - True - False - 2 - - + True False - document-properties + Services + + + False @@ -2381,60 +1430,910 @@ Author: Dmitriy Yefremov - + True - False - 0 - 10 - 10 - 0 + True + in + + + True + True + services_model_tree_model_sort + 3 + True + both + True + + + + + + + + + + + multiple + + + + + False + CAS + + + + 0 + + + + + + + False + Type + + + + 1 + + + + + + + True + 2 + 50 + Service + True + True + 3 + + + + 2 + + + + + end + 25 + + + 3 + + + + + + 4 + + + + + + 5 + + + + + + + True + 50 + Package + True + True + 6 + + + end + 15 + + + 6 + + + + + + + True + 25 + Type + True + True + 7 + + + 0.51999998092651367 + + + 7 + + + + + + + Picon + True + 9 + + + + 8 + + + + + + + False + fixed + Picon ID + + + + 9 + + + + + + + True + 25 + SID + True + True + 10 + + + 0.50999999046325684 + + + 10 + + + + + + + True + 25 + Freq + True + True + 11 + + + 0.50999999046325684 + + + 11 + + + + + + + True + 25 + Rate + True + True + 12 + + + 0.50999999046325684 + + + 12 + + + + + + + True + 25 + Pol + True + True + 13 + + + 0.50999999046325684 + + + 13 + + + + + + + True + 25 + FEC + True + True + 14 + + + 0.50999999046325684 + + + 14 + + + + + + + True + 25 + System + True + True + 15 + + + 0.50999999046325684 + + + 15 + + + + + + + True + 25 + Pos + True + 16 + + + 0.50999999046325684 + + + 16 + + + + + + + False + data_id + + + + 17 + + + + + + + False + fav_id + + + + 18 + + + + + + + False + transponder + + + + 19 + + + + + + - False + True True 1 - + + 22 + True + False + queue + 2 + + + True + False + 5 + emblem-readonly + + + False + True + 0 + + + + + True + False + CAS + 20 + 20 + 0 + + + False + True + 2 + 1 + + + + + True + False + vertical + + + False + True + 5 + 2 + + + + + True + False + tv-symbolic + + + False + True + 3 + + + + + True + False + TV + 5 + 0 + + + False + True + 4 + + + + + True + False + network-wireless-symbolic + + + False + True + 5 + + + + + True + False + Radio + 5 + 0 + + + False + True + 6 + + + + + True + False + system-run + + + False + True + 7 + + + + + True + False + Data + 0 + + + False + True + 8 + + + + + True + False + vertical + + + False + True + 5 + 9 + + + + + False + True + 3 + - False - True - 2 + True + False + + + + + True + True + True + + + True + False + vertical + + + True + False + Bouquet details + + + + + + False + True + 0 + + + + + True + True + 2 + in + + + True + True + fav_list_store + 2 + True + both + True + + + + + + + + + + + multiple + + + + + True + 25 + Num + + + 0.20000000298023224 + 5 + 5 + + + 0 + + + + + + + True + 2 + 50 + Service + True + + + + 8 + + + + + + 1 + + + + + end + 25 + + + 2 + + + + + + 3 + + + + + + 4 + + + + + + + True + 25 + Type + True + + + 0.50999999046325684 + + + 5 + + + + + + + 25 + Pos + True + + + 0.50999999046325684 + + + 6 + + + + + + + False + fav_id + + + + 7 + + + + + + + + + True + True + 1 + + + + + 20 + True + False + 2 + + + True + False + document-properties + + + False + True + 0 + + + + + True + False + 0 + 4 + 4 + 0 + + + False + True + 1 + + + + + True + False + + + False + True + 2 + + + + + True + False + center + + + True + False + True + end + 12 + 20 + + + + + True + True + 3 + + + + + False + True + 4 + + + + + True + False + + + + + True + False + vertical + + + True + False + Bouquets + + + + + + False + True + 0 + + + + + True + True + 2 + in + + + True + True + bouquets_tree_store + False + 0 + True + True + True + + + + + + + + + + + + multiple + + + + + True + 2 + autosize + Bouquets + True + + + + 0 + + + + + + 1 + + + + + 0 + + + 2 + + + + + + + False + True + autosize + Type + + + + 3 + + + + + + + + + True + True + 1 + + + + + 20 + True + False + 2 + + + True + False + document-properties + + + False + True + 0 + + + + + True + False + 0 + 10 + 10 + 0 + + + False + True + 1 + + + + + + + + False + True + 2 + + + + + True + False + + + + + True + False - True - False + True + True + 1 + 4 + + + + + True + False + 2 + + + False + True + 5 - True - False + False + True True True - 1 - 4 - - - - - True - False - 2 - - - False - True - 5 + 0 @@ -2495,7 +2394,108 @@ Author: Dmitriy Yefremov False False - 6 + end + 1 + + + + + False + 2 + 2 + 0 + in + + + True + False + + + True + False + + + True + False + + + + + True + False + Play + gtk-media-play + + + + False + True + + + + + True + False + Stop + True + gtk-media-stop + + + + False + True + + + + + True + False + Fullscreen + True + gtk-fullscreen + + + + False + True + + + + + True + False + + + True + False + + + + + True + False + Close + Close + True + gtk-close + + + + False + True + + + + + + + + + + False + True + end + 2