mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-01-27 09:50:11 +01:00
small refactoring for iptv list dialog
This commit is contained in:
@@ -307,6 +307,19 @@ Author: Dmitriy Yefremov
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="list_configuration_ok_button">
|
||||
<property name="label" translatable="yes">OK</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -764,6 +777,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="yt_import_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