mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-03-05 20:11:59 +01:00
small refactoring for iptv list dialog
This commit is contained in:
@@ -753,6 +753,15 @@ Author: Dmitriy Yefremov
|
||||
<signal name="clicked" handler="on_apply" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="list_configuration_ok_button">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="iptv_list_configuration_dialog_box">
|
||||
<property name="can_focus">False</property>
|
||||
@@ -1208,6 +1217,7 @@ Author: Dmitriy Yefremov
|
||||
<action-widgets>
|
||||
<action-widget response="-6">cancel_config_list_button</action-widget>
|
||||
<action-widget response="-10">list_configuration_apply_button</action-widget>
|
||||
<action-widget response="-5">list_configuration_ok_button</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkImage" id="remove_selection_image">
|
||||
|
||||
@@ -466,6 +466,7 @@ class IptvListDialog:
|
||||
self._list_namespace_entry = builder.get_object("list_namespace_entry")
|
||||
self._apply_button = builder.get_object("list_configuration_apply_button")
|
||||
self._cancel_button = builder.get_object("cancel_config_list_button")
|
||||
self._ok_button = builder.get_object("list_configuration_ok_button")
|
||||
# Style
|
||||
style_provider = Gtk.CssProvider()
|
||||
style_provider.load_from_path(UI_RESOURCES_PATH + "style.css")
|
||||
@@ -627,6 +628,8 @@ class M3uImportDialog(IptvListDialog):
|
||||
self._dialog.set_title(get_message("Playlist import"))
|
||||
self._dialog.connect("delete-event", self.on_close)
|
||||
self._apply_button.set_label(get_message("Import"))
|
||||
self._ok_button.bind_property("visible", self._apply_button, "visible", 4)
|
||||
self._ok_button.bind_property("visible", self._cancel_button, "visible", 4)
|
||||
# Progress
|
||||
self._progress_bar = Gtk.ProgressBar(visible=False, valign="center")
|
||||
self._spinner = Gtk.Spinner(active=False)
|
||||
@@ -654,11 +657,6 @@ class M3uImportDialog(IptvListDialog):
|
||||
frame = Gtk.Frame(visible=True)
|
||||
frame.add(extra_box)
|
||||
self._data_box.add(frame)
|
||||
# Buttons
|
||||
self._ok_button = Gtk.Button.new_from_stock(Gtk.STOCK_OK)
|
||||
self._ok_button.bind_property("visible", self._apply_button, "visible", 4)
|
||||
self._ok_button.bind_property("visible", self._cancel_button, "visible", 4)
|
||||
self._dialog.add_action_widget(self._ok_button, Gtk.ResponseType.OK)
|
||||
|
||||
self.get_m3u(m3_path, s_type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user