added display option for bouquet details list

This commit is contained in:
DYefremov
2020-12-24 23:30:29 +03:00
parent 96aeb05dd1
commit f1935e4a56
3 changed files with 48 additions and 0 deletions

View File

@@ -628,6 +628,14 @@ class Settings:
def alternate_layout(self, value):
self._settings["alternate_layout"] = value
@property
def bq_details_first(self):
return self._settings.get("bq_details_first", False)
@bq_details_first.setter
def bq_details_first(self, value):
self._settings["bq_details_first"] = value
@property
def is_themes_support(self):
return self._settings.get("is_themes_support", False)

View File

@@ -2553,6 +2553,42 @@ Author: Dmitriy Yefremov
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="bouquet_box">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="bq_list_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Display the bouquet channel list first</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="bq_list_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label_item">

View File

@@ -197,6 +197,8 @@ class SettingsDialog:
self._icon_theme_combo_box = builder.get_object("icon_theme_combo_box")
self._dark_mode_switch = builder.get_object("dark_mode_switch")
self._layout_switch = builder.get_object("layout_switch")
self._bq_list_switch = builder.get_object("bq_list_switch")
self._layout_switch.bind_property("active", builder.get_object("bouquet_box"), "sensitive")
self._themes_support_switch = builder.get_object("themes_support_switch")
self._themes_support_switch.bind_property("active", builder.get_object("gtk_theme_frame"), "sensitive")
self._themes_support_switch.bind_property("active", builder.get_object("icon_theme_frame"), "sensitive")
@@ -363,6 +365,7 @@ class SettingsDialog:
if self._ext_settings.is_darwin:
self._ext_settings.dark_mode = self._dark_mode_switch.get_active()
self._ext_settings.alternate_layout = self._layout_switch.get_active()
self._ext_settings.bq_details_first = self._bq_list_switch.get_active()
self._ext_settings.is_themes_support = self._themes_support_switch.get_active()
self._ext_settings.theme = self._theme_combo_box.get_active_id()
self._ext_settings.icon_theme = self._icon_theme_combo_box.get_active_id()
@@ -781,6 +784,7 @@ class SettingsDialog:
def init_appearance(self):
self._dark_mode_switch.set_active(self._ext_settings.dark_mode)
self._layout_switch.set_active(self._ext_settings.alternate_layout)
self._bq_list_switch.set_active(self._ext_settings.bq_details_first)
t_support = self._ext_settings.is_themes_support
self._themes_support_switch.set_active(t_support)
if t_support: