diff --git a/app/ui/iptv.glade b/app/ui/iptv.glade index 76abe9d3..570ad684 100644 --- a/app/ui/iptv.glade +++ b/app/ui/iptv.glade @@ -34,9 +34,10 @@ Author: Dmitriy Yefremov + 1 320 False - + False True center @@ -50,7 +51,7 @@ Author: Dmitriy Yefremov - + False vertical 1 @@ -59,7 +60,7 @@ Author: Dmitriy Yefremov False end - + gtk-cancel True True @@ -70,9 +71,12 @@ Author: Dmitriy Yefremov True True - 4 + 0 + + + False @@ -81,12 +85,13 @@ Author: Dmitriy Yefremov - + True False 2 2 5 + 5 0 in @@ -190,6 +195,9 @@ Author: Dmitriy Yefremov + + search_unavailable_cancel_button + @@ -206,105 +214,61 @@ Author: Dmitriy Yefremov + 1 480 False + Stream data False True True dialog True True - - + + + + gtk-cancel True - False - Stream data - 2 - True - - - gtk-cancel - True - True - True - True - True - - - - - - True - False - 2 - - - gtk-add - True - True - True - True - - - - True - True - 1 - - - - - gtk-save - True - True - True - True - True - - - - True - True - 2 - - - - - end - 1 - - + True + True + True + True + + + gtk-add + True + True + True + True + + + + + + gtk-save + True + True + True + True + True + + + + + + - + False vertical - - - False - - - - - - - - - - - - False - False - 0 - - True False - 2 - 2 + 5 + 5 2 vertical @@ -482,6 +446,7 @@ Author: Dmitriy Yefremov True False + 5 0.019999999552965164 in @@ -655,11 +620,15 @@ Author: Dmitriy Yefremov + + iptv_dialog_cancel_button + + 1 400 False - + IPTV streams list configuration False True center @@ -668,73 +637,39 @@ Author: Dmitriy Yefremov True True center - - + + + + gtk-close True - False - 2 - True - - - gtk-close - True - True - True - 15 - True - True - - - 1 - - - - - True - False - IPTV streams list configuration - - - - - gtk-apply - True - True - True - 15 - True - True - - - - end - 1 - - + True + True + True + True + + + gtk-apply + True + True + True + True + True + + + - + False vertical 2 - - - False - end - - - False - False - 0 - - True False - 2 - 2 + 5 + 5 2 vertical @@ -835,6 +770,7 @@ Author: Dmitriy Yefremov True False 5 + 5 0.019999999552965164 in @@ -1135,6 +1071,9 @@ Author: Dmitriy Yefremov False + 1 + 1 + 1 True @@ -1185,7 +1124,7 @@ Author: Dmitriy Yefremov - close_config_list_button + close_config_list_button diff --git a/app/ui/iptv.py b/app/ui/iptv.py index a931a21f..6a9439fd 100644 --- a/app/ui/iptv.py +++ b/app/ui/iptv.py @@ -27,10 +27,10 @@ def is_data_correct(elems): class IptvDialog: def __init__(self, transient, view, services, bouquet, profile=Profile.ENIGMA_2, action=Action.ADD): - handlers = {"on_entry_changed": self.on_entry_changed, + handlers = {"on_response": self.on_response, + "on_entry_changed": self.on_entry_changed, "on_url_changed": self.on_url_changed, "on_save": self.on_save, - "on_cancel": self.on_cancel, "on_stream_type_changed": self.on_stream_type_changed} builder = Gtk.Builder() @@ -88,8 +88,9 @@ class IptvDialog: def show(self): self._dialog.run() - def on_cancel(self, item): - self._dialog.destroy() + def on_response(self, dialog, response): + if response == Gtk.ResponseType.CANCEL: + self._dialog.destroy() def on_save(self, item): self.on_url_changed(self._url_entry) @@ -278,6 +279,7 @@ class IptvListConfigurationDialog: def __init__(self, transient, services, iptv_rows, bouquet, profile): handlers = {"on_apply": self.on_apply, + "on_response": self.on_response, "on_stream_type_default_togged": self.on_stream_type_default_togged, "on_stream_type_changed": self.on_stream_type_changed, "on_default_type_toggled": self.on_default_type_toggled, @@ -328,7 +330,10 @@ class IptvListConfigurationDialog: def show(self): self._dialog.run() - self._dialog.destroy() + + def on_response(self, dialog, response): + if response == Gtk.ResponseType.CANCEL: + self._dialog.destroy() def on_stream_type_changed(self, box): self.update_reference()