podcast_list_view_all -> ui.gtk.podcast_list.all_episodes

This commit is contained in:
auouymous 2022-12-08 15:50:56 -07:00
parent ff2c19e186
commit 8ca292e5a5
4 changed files with 8 additions and 10 deletions

View File

@ -228,8 +228,6 @@ defaults = {
# The sooner this goes away, the better
gPodderSettings_LegacySupport = {
'episode_list_descriptions': 'ui.gtk.episode_list.descriptions',
'podcast_list_view_all': 'ui.gtk.podcast_list.all_episodes',
'podcast_list_sections': 'ui.gtk.podcast_list.sections',
'episode_list_view_mode': 'ui.gtk.episode_list.view_mode',
'podcast_list_view_mode': 'ui.gtk.podcast_list.view_mode',

View File

@ -229,7 +229,7 @@ class gPodderPreferences(BuilderWidget):
self.combobox_preferred_vimeo_format.add_attribute(cellrenderer, 'text', self.preferred_vimeo_format_model.C_CAPTION)
self.combobox_preferred_vimeo_format.set_active(self.preferred_vimeo_format_model.get_index())
self._config.connect_gtk_togglebutton('podcast_list_view_all',
self._config.connect_gtk_togglebutton('ui.gtk.podcast_list.all_episodes',
self.checkbutton_show_all_episodes)
self._config.connect_gtk_togglebutton('podcast_list_sections',
self.checkbutton_podcast_sections)

View File

@ -264,7 +264,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
g = self.gPodder
action = Gio.SimpleAction.new_stateful(
'showEpisodeDescription', None, GLib.Variant.new_boolean(self.config.episode_list_descriptions))
'showEpisodeDescription', None, GLib.Variant.new_boolean(self.config.ui.gtk.episode_list.descriptions))
action.connect('activate', self.on_itemShowDescription_activate)
g.add_action(action)
@ -2189,7 +2189,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
True (the former updates just the selected
episodes and the latter updates all episodes).
"""
descriptions = self.config.episode_list_descriptions
descriptions = self.config.ui.gtk.episode_list.descriptions
if urls is not None:
# We have a list of URLs to walk through
@ -2432,7 +2432,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
sections_active = any(is_section(x) for x in self.podcast_list_model)
if self.config.podcast_list_view_all:
if self.config.ui.gtk.podcast_list.all_episodes:
# Update "all episodes" view in any case (if enabled)
self.podcast_list_model.update_first_row()
# List model length minus 1, because of "All"
@ -2456,7 +2456,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
if iter is not None:
# If we have selected the "all episodes" view, we have
# to update all channels for selected episodes:
if self.config.podcast_list_view_all and \
if self.config.ui.gtk.podcast_list.all_episodes and \
self.podcast_list_model.iter_is_first_row(iter):
urls = self.get_podcast_urls_from_selected_episodes()
self.podcast_list_model.update_by_urls(urls)
@ -2511,7 +2511,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.treeAvailable.get_selection().unselect_all()
self.treeAvailable.scroll_to_point(0, 0)
descriptions = self.config.episode_list_descriptions
descriptions = self.config.ui.gtk.episode_list.descriptions
with self.treeAvailable.get_selection().handler_block(self.episode_selection_handler_id):
# have to block the on_episode_list_selection_changed handler because
# when selecting any channel from All Episodes, on_episode_list_selection_changed
@ -3360,7 +3360,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
def on_itemShowDescription_activate(self, action, param):
state = action.get_state()
self.config.episode_list_descriptions = not state
self.config.ui.gtk.episode_list.descriptions = not state
action.set_state(GLib.Variant.new_boolean(not state))
def on_item_view_hide_boring_podcasts_toggled(self, action, param):

View File

@ -838,7 +838,7 @@ class PodcastListModel(Gtk.ListStore):
# C_DOWNLOADS, C_COVER_VISIBLE, C_SECTION
0, False, section.title)
if config.podcast_list_view_all and channels:
if config.ui.gtk.podcast_list.all_episodes and channels:
all_episodes = PodcastChannelProxy(db, config, channels, '', self)
iter = self.append(channel_to_row(all_episodes))
self.update_by_iter(iter)