From f8b1c29638f40f430b77a4c5c8f03236979fcbf7 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Fri, 7 Jul 2023 21:33:26 +0300 Subject: [PATCH] service details dialog redesign --- app/ui/service_details_dialog.glade | 2230 ++++++++++++++------------- app/ui/service_details_dialog.py | 16 +- 2 files changed, 1154 insertions(+), 1092 deletions(-) diff --git a/app/ui/service_details_dialog.glade b/app/ui/service_details_dialog.glade index ee3e5ce6..a9a8c35b 100644 --- a/app/ui/service_details_dialog.glade +++ b/app/ui/service_details_dialog.glade @@ -1,9 +1,9 @@ - - + + - + @@ -77,9 +78,9 @@ Author: Dmitriy Yefremov True False - False + False fec_list_store - 0 + 0 @@ -203,8 +204,8 @@ Author: Dmitriy Yefremov 180 - 0.10000000000000001 - 10 + 0.10 + 10 @@ -262,19 +263,16 @@ Author: Dmitriy Yefremov {use_header} - False + False Service data False True - center-on-parent - True - document-properties-symbolic - dialog - True - True - - - + center-on-parent + True + document-properties-symbolic + dialog + True + True Cancel @@ -309,16 +307,15 @@ Author: Dmitriy Yefremov - False - 2 - 2 + False + 5 + 5 vertical - 2 - False + False center - end + end False @@ -326,575 +323,220 @@ Author: Dmitriy Yefremov 0 + + + True + False + center + 10 + + + True + False + Reference + + + + + + False + True + 0 + + + + + True + False + : + + + + + + False + True + 1 + + + + + True + False + 5 + 5 + True + + + + + + False + True + 2 + + + + + True + True + 0 + + True - False - 2 - 2 - 5 - 0.019999999552965164 - in + False + 5 + 0.019999999552965164 + none - + True - False - 5 - 5 - 5 - vertical - 5 + False - + True - False - 2 - - - True - False - Name - - - 0 - 0 - - - - - True - True - document-edit-symbolic - - - 0 - 1 - - - - - True - False - Package - - - 1 - 0 - - - - - True - True - document-edit-symbolic - - - 1 - 1 - - - - - True - False - SID - - - 2 - 0 - - - - - True - True - 10 - 10 - document-edit-symbolic - - - - - 2 - 1 - - - - - True - False - Type - - - 3 - 0 - - - - - True - False - srv_type_liststore - 1 - True - 1 - 0 - - - - - 0 - - - - - - - - True - True - 7 - 7 - document-edit-symbolic - - - - - - - 3 - 1 - - - - - True - False - Reference - - - 4 - 0 - - - - - True - True - True - False - 8 - 10 - - - 4 - 1 - - - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False + False + 10 + 10 + 10 + 10 vertical - 2 - - - True - True - 4 - 5 - - - - 8 - 1 - - - - - True - False - True - 4 - 5 - - - - 7 - 1 - - - - - True - False - True - 4 - 5 - - - - 6 - 1 - - - - - True - False - True - 4 - 5 - - - - 5 - 1 - - - - - True - True - 4 - 5 - - - - 4 - 1 - - - - - True - False - Teletext - - - 8 - 0 - - - - - True - False - HE-ACC - - - 7 - 0 - - - - - True - False - ACC - - - 6 - 0 - - - - - True - False - AC3+ - - - 5 - 0 - - - - - True - False - AC3 - - - 4 - 0 - - - - - True - True - 4 - 5 - - - - 1 - 1 - - - - - True - False - Video - - - 1 - 0 - - - - - True - False - start - PID's: - 6 - 6 - - - 0 - 1 - - - - - True - False - 25 - True - Delays (ms): - 10 - 10 - 1 - - - 9 - 1 - - - - - True - False - Bitstream - - - 10 - 0 - - - - - True - False - PCM - - - 11 - 0 - - - - - True - True - 6 - 6 - - - - 10 - 1 - - - - - True - True - 6 - 6 - - - - 11 - 1 - - - - - True - False - PCR - - - 3 - 0 - - - - - True - False - Audio - - - 2 - 0 - - - - - True - True - 4 - 5 - - - - 3 - 1 - - - - - True - True - 4 - 5 - - - - 2 - 1 - - - - - - - - - - - False - False - 3 - - - - - True - False 10 - + True - False - center - 5 - 10 - 2 + False + 10 - + + True - False - Flags: - 0 - - - 0 - 0 - - - - - Keep - True - True - False - True - - - 1 - 0 - - - - - Hide - True - True - False - True - - - 2 - 0 - - - - - Use PID's - True - True - False - True - - - 3 - 0 - - - - - New - True - True - False - True - - - 4 - 0 - - - - - False - True - 0 - - - - - True - False - 2 - - - True - False - Extra: + False + 5 + 5 + + + True + False + start + Name + + + 0 + 0 + + + + + True + True + document-edit-symbolic + + + 1 + 1 + + + + + True + True + document-edit-symbolic + + + 1 + 0 + + + + + True + False + start + Package + + + 0 + 1 + + + + + True + False + start + SID + + + 0 + 2 + + + + + True + True + 10 + 10 + document-edit-symbolic + + + + + 1 + 2 + + + + + True + False + start + Type + + + 0 + 3 + + + + + True + False + srv_type_liststore + 1 + True + 1 + 0 + + + + + 0 + + + + + + + + True + True + 7 + 7 + document-edit-symbolic + + + + + + + 1 + 3 + + False @@ -903,18 +545,244 @@ Author: Dmitriy Yefremov - + True - True - 20 - 20 - document-edit-symbolic - c:000000,etc. - + False + 10 + 5 + vertical + 5 + + + + True + False + center + 2 + + + True + False + Flags: + 0 + + + 0 + 0 + + + + + Keep + True + True + False + True + + + 1 + 0 + + + + + Hide + True + True + False + True + + + 2 + 0 + + + + + Use PID's + True + True + False + True + + + 3 + 0 + + + + + New + True + True + False + True + + + 4 + 0 + + + + + False + True + 0 + + + + + + True + False + 5 + 5 + + + True + True + C:0000,C:a1b2,etc. + 25 + 20 + document-edit-symbolic + C:0000,C:a1b2,etc. + + + + 1 + 0 + + + + + True + False + start + CAID's: + + + 0 + 0 + + + + + True + False + start + Extra: + + + 0 + 1 + + + + + True + True + 25 + 20 + document-edit-symbolic + c:000000,etc. + + + + 1 + 1 + + + + + False + True + 1 + + + + + + True + False + 5 + 5 + + + True + False + start + Delays (ms): + 10 + 10 + + + 0 + 1 + + + + + True + False + Bitstream + + + 1 + 0 + + + + + True + True + 6 + 6 + + + + 1 + 1 + + + + + True + False + PCM + + + 2 + 0 + + + + + True + True + 6 + 6 + + + + 2 + 1 + + + + + + + + False + True + 3 + + False True + end 1 @@ -922,64 +790,252 @@ Author: Dmitriy Yefremov False True - end 1 - + + True - False - 2 + False + vertical + 2 - + True - True - C:0000,C:a1b2,etc. - 20 - 20 - document-edit-symbolic - C:0000,C:a1b2,etc. - + True + 4 + 5 + - 1 - 0 + 8 + 1 - + True - False - CAID's: + False + True + 4 + 5 + - 0 - 0 + 7 + 1 + + + True + False + True + 4 + 5 + + + + 6 + 1 + + + + + True + False + True + 4 + 5 + + + + 5 + 1 + + + + + True + True + 4 + 5 + + + + 4 + 1 + + + + + True + False + Teletext + + + 8 + 0 + + + + + True + False + HE-ACC + + + 7 + 0 + + + + + True + False + ACC + + + 6 + 0 + + + + + True + False + AC3+ + + + 5 + 0 + + + + + True + False + AC3 + + + 4 + 0 + + + + + True + True + 4 + 5 + + + + 1 + 1 + + + + + True + False + Video + + + 1 + 0 + + + + + True + False + start + PID's: + fill + 6 + 6 + + + 0 + 1 + + + + + True + False + PCR + + + 3 + 0 + + + + + True + False + Audio + + + 2 + 0 + + + + + True + True + 4 + 5 + + + + 3 + 1 + + + + + True + True + 4 + 5 + + + + 2 + 1 + + + + + False - True - end + False 2 - - False - True - 4 - + True - False + False + 2 Service data: + + + @@ -992,336 +1048,337 @@ Author: Dmitriy Yefremov True - False - 2 - 2 - 5 - 0.019999999552965164 - in + False + 5 + 0.019999999552965164 + none - + True - False - 5 - 5 - 2 - vertical - 2 + False - + True - False - 2 + False + 10 + 10 + 10 + 10 + vertical + 5 - + + True - False - Position - - - 0 - 0 - - - - - True - False - Freq - - - 1 - 0 - - - - - True - False - True - 12 - 12 - document-edit-symbolic - - - - 1 - 1 - - - - - True - False - Rate - - - 2 - 0 - - - - - True - False - True - 12 - 12 - document-edit-symbolic - - - - 2 - 1 - - - - - True - False - 5 - 5 - Pol - - - 3 - 0 - - - - - True - False - False - pol_list_store - 0 + False + 2 - - - 0 - - - - - 3 - 1 - - - - - True - False - 5 - 5 - FEC - - - 4 - 0 - - - - - True - False - False - fec_list_store - 0 - - - - 0 - - - - - 4 - 1 - - - - - True - False - True - 12 - 12 - document-edit-symbolic - - - - - 7 - 1 - - - - - True - False - Namespace - - - 7 - 0 - - - - - True - False - TID - - - 5 - 0 - - - - - True - False - True - 8 - 10 - document-edit-symbolic - - - - - 5 - 1 - - - - - True - False - NID - - - 6 - 0 - - - - - True - False - True - 8 - 10 - document-edit-symbolic - - - - - 6 - 1 - - - - - True - False - 1 - - + True - False - True - number - sat_pos_adjustment - 1 - True + False + Position - False - True - 0 + 0 + 0 - + True - False - False - 0 - - E - W - + False + Freq - False - True - 1 + 1 + 0 + + + + + True + False + True + 12 + 12 + document-edit-symbolic + + + + 1 + 1 + + + + + True + False + Rate + + + 2 + 0 + + + + + True + False + True + 12 + 12 + document-edit-symbolic + + + + 2 + 1 + + + + + True + False + 5 + 5 + Pol + + + 3 + 0 + + + + + True + False + False + pol_list_store + 0 + + + + 0 + + + + + 3 + 1 + + + + + True + False + 5 + 5 + FEC + + + 4 + 0 + + + + + True + False + False + fec_list_store + 0 + + + + 0 + + + + + 4 + 1 + + + + + True + False + True + 12 + 12 + document-edit-symbolic + + + + + 7 + 1 + + + + + True + False + Namespace + + + 7 + 0 + + + + + True + False + TID + + + 5 + 0 + + + + + True + False + True + 8 + 10 + document-edit-symbolic + + + + + 5 + 1 + + + + + True + False + NID + + + 6 + 0 + + + + + True + False + True + 8 + 10 + document-edit-symbolic + + + + + 6 + 1 + + + + + True + False + 1 + + + True + False + True + number + sat_pos_adjustment + 1 + True + + + False + True + 0 + + + + + True + False + False + 0 + + E + W + + + + False + True + 1 + + + + + 0 + 1 - 0 - 1 + False + True + 0 - - - False - True - 3 - - - - - True - True + True - False - 5 - 2 + False + center + 5 True - False + False Inversion - 2 - 0 + 2 + 0 True - False + False Rolloff 0.02 - 3 - 0 + 3 + 0 True - False + False Pilot - 4 - 0 + 4 + 0 True False - False + False invertion_list_store - 0 + 0 @@ -1330,17 +1387,17 @@ Author: Dmitriy Yefremov - 2 - 1 + 2 + 1 True False - False + False rolloff_list_store - 0 + 0 @@ -1349,17 +1406,17 @@ Author: Dmitriy Yefremov - 3 - 1 + 3 + 1 True False - False + False pilot_list_store - 0 + 0 @@ -1368,28 +1425,28 @@ Author: Dmitriy Yefremov - 4 - 1 + 4 + 1 True - False + False PLS mode - 5 - 0 + 5 + 0 True False - False + False pls_mode_list_store - 0 + 0 @@ -1398,107 +1455,107 @@ Author: Dmitriy Yefremov - 5 - 1 + 5 + 1 True - False + False Flag - 8 - 0 + 8 + 0 True False - True - 8 - 10 - document-edit-symbolic + True + 8 + 10 + document-edit-symbolic - 8 - 1 + 8 + 1 True - False + False PLS code - 6 - 0 + 6 + 0 True False - True - 8 - 10 - document-edit-symbolic + True + 8 + 10 + document-edit-symbolic - 6 - 1 + 6 + 1 True - False + False Stream ID - 7 - 0 + 7 + 0 True False - True - 8 - 10 - document-edit-symbolic + True + 8 + 10 + document-edit-symbolic - 7 - 1 + 7 + 1 True - False + False System - 0 - 0 + 0 + 0 True False - False + False True sys_list_store - 0 + 0 @@ -1508,29 +1565,29 @@ Author: Dmitriy Yefremov - 0 - 1 + 0 + 1 True - False + False Mod - 1 - 0 + 1 + 0 True False - False + False True mod_list_store - 0 + 0 @@ -1539,37 +1596,38 @@ Author: Dmitriy Yefremov - 1 - 1 + 1 + 1 - - - - True - False - Extra: - + + False + True + 1 + - - False - True - 4 - + True - False + False + 2 True - False + False + 5 Transponder data: + + + False @@ -1580,33 +1638,33 @@ Author: Dmitriy Yefremov True - False + False 2 True - True - Edit + True + Edit False True - end + end 1 True - False - 10 - document-edit-symbolic + False + 10 + document-edit-symbolic False True - end + end 2 @@ -1614,7 +1672,7 @@ Author: Dmitriy Yefremov False True - end + end 2 @@ -1650,20 +1708,16 @@ Author: Dmitriy Yefremov - {use_header} - 480 - 300 - False + 480 + 300 + False Transponder details True - center-on-parent - True - dialog - True - True - - - + center-on-parent + True + dialog + True + True Cancel @@ -1684,12 +1738,11 @@ Author: Dmitriy Yefremov - False + False vertical - 2 - False + False center @@ -1701,24 +1754,24 @@ Author: Dmitriy Yefremov True - False - warning - True + False + warning + True - False + False 6 - end + end True - False - 20 - 20 - 5 - 5 + False + 20 + 20 + 5 + 5 Changes will be applied to all services of this transponder! -Continue? + Continue? center 2 @@ -1737,7 +1790,7 @@ Continue? - False + False 16 @@ -1754,112 +1807,125 @@ Continue? - - 120 + True - True - in + False - + + 120 True - False - transponder_services_liststore - False - vertical - - - + True + 10 + 10 + 10 + 10 + in - - autosize - Service - True - 0.5 - - - - 0 - + + True + False + transponder_services_liststore + False + vertical + + - - - - - autosize - Package - True - 0.5 - - - 1 - - - - - - - autosize - Type - 0.5 - - - 0.50999999046325684 + + autosize + Service + True + 0.5 + + + + 0 + + - - 2 - - - - - - autosize - Ssid - True - 0.5 - - 0.50999999046325684 + + autosize + Package + True + 0.5 + + + + 1 + + - - 3 - - - - - - autosize - Freq. - 0.5 - - 0.50999999046325684 + + autosize + Type + 0.5 + + + 0.5099999904632568 + + + 2 + + - - 4 - - - - - - autosize - Pos. - 0.5 - - 0.50999999046325684 + + autosize + Ssid + True + 0.5 + + + 0.5099999904632568 + + + 3 + + + + + + + autosize + Freq. + 0.5 + + + 0.5099999904632568 + + + 4 + + + + + + + autosize + Pos. + 0.5 + + + 0.5099999904632568 + + + 5 + + - - 5 - + True diff --git a/app/ui/service_details_dialog.py b/app/ui/service_details_dialog.py index f4d75dbb..92a71a26 100644 --- a/app/ui/service_details_dialog.py +++ b/app/ui/service_details_dialog.py @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) 2018-2022 Dmitriy Yefremov +# Copyright (c) 2018-2023 Dmitriy Yefremov # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -140,7 +140,7 @@ class ServiceDetailsDialog: self._srv_type_entry = self._non_empty_elements.get("srv_type_entry") self._service_type_combo_box = builder.get_object("service_type_combo_box") self._cas_entry = builder.get_object("cas_entry") - self._reference_entry = builder.get_object("reference_entry") + self._reference_label = builder.get_object("reference_label") self._keep_check_button = builder.get_object("keep_check_button") self._hide_check_button = builder.get_object("hide_check_button") self._use_pids_check_button = builder.get_object("use_pids_check_button") @@ -159,7 +159,6 @@ class ServiceDetailsDialog: self._pilot_combo_box = builder.get_object("pilot_combo_box") self._pls_mode_combo_box = builder.get_object("pls_mode_combo_box") self._tr_edit_switch = builder.get_object("tr_edit_switch") - self._tr_extra_expander = builder.get_object("tr_extra_expander") self._DVB_S2_ELEMENTS = (self._mod_combo_box, self._rolloff_combo_box, self._pilot_combo_box, self._pls_mode_combo_box, self._pls_code_entry, self._stream_id_entry) @@ -186,7 +185,6 @@ class ServiceDetailsDialog: elem.set_text(" ") elem.set_text("") self._new_check_button.set_active(True) - self._tr_extra_expander.activate() self._service_type_combo_box.set_active(0) self._pol_combo_box.set_active(0) self._fec_combo_box.set_active(0) @@ -366,8 +364,7 @@ class ServiceDetailsDialog: tr_grid = self._builder.get_object("tr_grid") tr_grid.remove_column(7) tr_grid.set_margin_bottom(5) - self._builder.get_object("tr_extra_expander").set_visible(False) - self._builder.get_object("srv_separator").set_visible(False) + self._builder.get_object("extra_transponder_grid").set_visible(False) self._package_entry.set_sensitive(False) # ***************** Init Sat positions *********************# @@ -527,7 +524,7 @@ class ServiceDetailsDialog: package=self._package_entry.get_text(), service_type=SERVICE_TYPE.get(self._srv_type_entry.get_text(), SERVICE_TYPE["3"]), picon=self._old_service.picon, - picon_id=self._reference_entry.get_text().replace(":", "_") + ".png", + picon_id=self._reference_label.get_text().replace(":", "_") + ".png", ssid="{:04x}".format(int(self._sid_entry.get_text())), freq=freq, rate=rate, @@ -798,9 +795,9 @@ class ServiceDetailsDialog: if self._s_type is SettingsType.ENIGMA_2: on_id = int(self._namespace_entry.get_text()) ref = "1:0:{:X}:{:X}:{:X}:{:X}:{:X}:0:0:0".format(srv_type, ssid, tid, nid, on_id) - self._reference_entry.set_text(ref) + self._reference_label.set_text(ref) else: - self._reference_entry.set_text("{:x}{:04x}{:04x}".format(tid, nid, ssid)) + self._reference_label.set_text("{:x}{:04x}{:04x}".format(tid, nid, ssid)) def update_ui_for_terrestrial(self): tr_grid = self.get_transponder_grid_for_non_satellite() @@ -891,7 +888,6 @@ class ServiceDetailsDialog: # FEC fec_model.append(("None",)) # Extra - tr_box.remove(self._tr_extra_expander) tr_grid.set_margin_bottom(5) self._freq_entry.set_width_chars(10) self._freq_entry.set_max_width_chars(10)