From ab5f98a2b62481bb9c3819ecbe6ff2fd93505670 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sat, 18 Aug 2018 17:35:30 +0300 Subject: [PATCH] skeleton for IPTV lists configuration dialog --- app/ui/dialogs.glade | 417 +++++++++++++++++++++++++++++++++----- app/ui/iptv.py | 18 ++ app/ui/main_app_window.py | 6 +- 3 files changed, 385 insertions(+), 56 deletions(-) diff --git a/app/ui/dialogs.glade b/app/ui/dialogs.glade index 632c747f..1dba4e46 100644 --- a/app/ui/dialogs.glade +++ b/app/ui/dialogs.glade @@ -89,6 +89,7 @@ Author: Dmitriy Yefremov 2 + 85 True True True @@ -112,6 +113,7 @@ Author: Dmitriy Yefremov + 85 True True True @@ -582,6 +584,299 @@ Author: Dmitriy Yefremov button4 + + 320 + False + + False + True + center + True + dialog + True + True + center + + + + + + False + vertical + 2 + + + False + end + + + + + + gtk-close + True + True + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + vertical + 5 + + + True + False + IPTV streams list configuration + + + False + True + 0 + + + + + True + False + 5 + + + True + False + Apply for all lists + 1 + + + True + True + 1 + + + + + True + True + + + False + True + end + 2 + + + + + True + True + 1 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + 2 + 2 + True + + + True + True + 5 + 5 + 1 + gtk-edit + + + 0 + 2 + + + + + True + True + 5 + 5 + 0 + gtk-edit + + + 1 + 2 + + + + + True + True + 5 + 5 + 0 + gtk-edit + + + 2 + 2 + + + + + True + True + 5 + 5 + 0 + gtk-edit + + + 3 + 2 + + + + + True + False + Namespace + + + 3 + 1 + + + + + True + False + NID + + + 2 + 1 + + + + + True + False + SID + + + 1 + 1 + + + + + True + False + Type + + + 0 + 1 + + + + + Auto + True + True + False + True + True + + + 2 + 0 + + + + + Auto + True + True + False + True + True + + + 3 + 0 + + + + + Auto + True + True + False + True + True + + + 1 + 0 + + + + + + + + + + True + False + Starting values + + + + + False + True + 2 + + + + + False + True + 1 + + + + + + button7 + + False @@ -699,11 +994,8 @@ Author: Dmitriy Yefremov False - 5 - 5 - 5 vertical - 2 + 1 False @@ -731,41 +1023,22 @@ Author: Dmitriy Yefremov - + True False - Please wait, streams testing in progress... - - - False - True - 0 - - - - - 10 - True - False - True - - - False - True - 1 - - - - - True - False - center + 10 + 10 + 5 + 5 + vertical 2 True False - Found + 10 + 10 + Please wait, streams testing in progress... False @@ -774,13 +1047,11 @@ Author: Dmitriy Yefremov - + + 10 True False - 0 - - - + True False @@ -789,10 +1060,50 @@ Author: Dmitriy Yefremov - + True False - unavailable streams. + center + 2 + + + True + False + Found + + + False + True + 0 + + + + + True + False + 0 + + + + + + False + True + 1 + + + + + True + False + unavailable streams. + + + False + True + 2 + + False @@ -800,30 +1111,26 @@ Author: Dmitriy Yefremov 2 + + + True + False + + + False + True + 3 + + False True - 2 - - - - - True - False - - - False - True - 2 - 4 + 1 - - button6 - diff --git a/app/ui/iptv.py b/app/ui/iptv.py index a9ef5ee1..a5168019 100644 --- a/app/ui/iptv.py +++ b/app/ui/iptv.py @@ -260,5 +260,23 @@ class SearchUnavailableDialog: self._dialog.destroy() +class IptvListConfigurationDialog: + + def __init__(self, transient): + handlers = {} + + builder = Gtk.Builder() + builder.set_translation_domain(TEXT_DOMAIN) + builder.add_objects_from_file(UI_RESOURCES_PATH + "dialogs.glade", ("iptv_list_configuration_dialog",)) + builder.connect_signals(handlers) + + self._dialog = builder.get_object("iptv_list_configuration_dialog") + self._dialog.set_transient_for(transient) + + def show(self): + response = self._dialog.run() + self._dialog.destroy() + + if __name__ == "__main__": pass diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index e9b8b0fc..2482c840 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -14,7 +14,7 @@ from app.eparser.enigma.bouquets import BqServiceType from app.eparser.neutrino.bouquets import BqType from app.properties import get_config, write_config, Profile from app.tools.media import Player -from .iptv import IptvDialog, SearchUnavailableDialog +from .iptv import IptvDialog, SearchUnavailableDialog, IptvListConfigurationDialog from .search import SearchProvider from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, LOCKED_ICON, HIDE_ICON, IPTV_ICON, MOVE_KEYS from .dialogs import show_dialog, DialogType, get_chooser_dialog, WaitDialog, get_message @@ -113,6 +113,7 @@ class MainAppWindow: "on_service_edit": self.on_service_edit, "on_services_add_new": self.on_services_add_new, "on_iptv": self.on_iptv, + "on_iptv_list_configuration": self.on_iptv_list_configuration, "on_play_stream": self.on_play_stream, "on_remove_all_unavailable": self.on_remove_all_unavailable, "on_new_bouquet": self.on_new_bouquet, @@ -978,6 +979,9 @@ class MainAppWindow: self._is_played = True self._player.play() + def on_iptv_list_configuration(self, item): + IptvListConfigurationDialog(self._main_window).show() + @run_idle def on_remove_all_unavailable(self, item): iptv_rows = list(filter(lambda r: r[5] == BqServiceType.IPTV.value, self._fav_model))