From 2ded35705eba54d3f41004a798db679327012809 Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Sat, 11 Sep 2021 03:14:12 +0300 Subject: [PATCH] Preferences: Remove deprecated GTK features (#1154) * gpodderpreferences.ui: Save with Glade 3.38.2 * gpodderpreferences.ui: Add tab label children * gpodderpreferences.ui: Return notebook pages to correct order * gpodderpreferences.ui: Use named icons, replace stock-ids * gpodderpreferences.ui: Remove extra rows and columns from table_video * gpodderpreferences.ui: Use traditional indicator for CheckButtons * gpodderpreferences.ui: Set can-focus to True where appropriate * gpodderpreferences.ui: Add border-width to mygpo_config * gpodderpreferences.ui: Add margins around dialog ButtonBox * gpodderpreferences.ui: Replace gtk-close stock label with text * preferences.py: Set transient for parent * podcastdirectory.py: Set transient for parent This was accidentally removed in d9a0c7d15a. * gpodderchannel.ui: Downgrade GTK requirement to 3.16 * README.md: Increase minimum GTK version to 3.16 --- README.md | 2 +- share/gpodder/ui/gtk/gpodderchannel.ui | 2 +- share/gpodder/ui/gtk/gpodderpreferences.ui | 715 ++++++++++++------ src/gpodder/gtkui/desktop/podcastdirectory.py | 1 + src/gpodder/gtkui/desktop/preferences.py | 1 + 5 files changed, 470 insertions(+), 251 deletions(-) diff --git a/README.md b/README.md index 8284364d..518190d1 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ PyPI. With this, you get a self-contained gPodder CLI codebase. ### GTK3 UI - Additional Dependencies - [PyGObject](https://wiki.gnome.org/PyGObject) 3.22.0 or newer -- [GTK+3](https://www.gtk.org/) 3.10 or newer +- [GTK+3](https://www.gtk.org/) 3.16 or newer ### Optional Dependencies diff --git a/share/gpodder/ui/gtk/gpodderchannel.ui b/share/gpodder/ui/gtk/gpodderchannel.ui index f86ccaf6..c8b0ffe9 100644 --- a/share/gpodder/ui/gtk/gpodderchannel.ui +++ b/share/gpodder/ui/gtk/gpodderchannel.ui @@ -1,7 +1,7 @@ - + False Channel Editor diff --git a/share/gpodder/ui/gtk/gpodderpreferences.ui b/share/gpodder/ui/gtk/gpodderpreferences.ui index 4cc595c4..d347cad4 100644 --- a/share/gpodder/ui/gtk/gpodderpreferences.ui +++ b/share/gpodder/ui/gtk/gpodderpreferences.ui @@ -1,62 +1,104 @@ - + + + - 1000 100 - 10 - 10 - 0 + 1000 200 - - - 360 - 0 - 1 - 1 - 0 - 0 + 10 + 10 30 - 0 - 10 - 1 - 0 7 + 1 + 10 + + + 360 + 1 + 1 - False - True - parent_widget - GTK_WIN_POS_CENTER_ON_PARENT - 260 - 320 + False Preferences - dialog - + True + center-on-parent + 320 + 260 + dialog + - 2 True + False vertical + + + True + False + 5 + 5 + 5 + 5 + end + + + Edit config + True + True + False + + + + True + True + 0 + + + + + Close + True + True + False + + + + True + True + 1 + + + + + False + False + end + 0 + + - 6 True + True + 6 - 12 - 6 True + False + 12 vertical + 6 True False - 12 6 + 12 True @@ -91,7 +133,7 @@ True False - gtk-edit + document-edit-symbolic @@ -134,7 +176,7 @@ True False - gtk-edit + document-edit-symbolic @@ -144,20 +186,34 @@ + + False + True + 0 + - horizontal True + False + + False + True + 1 + "All episodes" in podcast list True + True + False + True False + True 2 @@ -165,165 +221,57 @@ Use sections for podcast list True + True + False + True False + True 3 - - General - - - - 12 - 6 + + True - vertical - - - 12 - 6 - True - - - True - False - 0 - Preferred YouTube format: - - - 0 - 0 - - - - - True - False - True - - - - 1 - 0 - - - - - True - False - 0 - Preferred YouTube HLS format: - - - 0 - 2 - - - - - True - False - True - - - - 1 - 2 - - - - - True - False - 0 - Preferred Vimeo format: - - - 0 - 4 - - - - - True - False - - - - 1 - 4 - - - - - False - - + False + General - Video - - - - - 12 - 6 - True - vertical - - - True - True - in - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - False - True - False - True - 1 - - - - - - - True - - - - - Extensions + False - 12 True False + 12 vertical 6 Synchronize subscriptions and episode actions True + True + False + True + + False + True + 0 + True False - 12 6 + 12 True @@ -339,8 +287,8 @@ True - True True + True @@ -363,8 +311,8 @@ True - True True + True @@ -375,8 +323,8 @@ True - True True + True False @@ -412,8 +360,8 @@ True - True True + True @@ -422,6 +370,11 @@ + + False + True + 1 + @@ -431,145 +384,184 @@ False + + False + True + 2 + - gpodder.net 1 + + + True + False + gpodder.net + + + 1 + False + + - 12 - 6 True + False + 12 vertical + 6 - 12 True - horizontal + False + 12 - Update interval: True - 0.0 - 0.1 + False + Update interval: + 0 + 0.10000000149011612 False + True + 0 - 0 - True - False - bottom True - adjustment_update_interval - horizontal + True + True True - - + adjustment_update_interval + False + 0 + bottom + + + False + True 1 False + True + 0 - horizontal True + False False + True 2 - 12 True - horizontal + False + 12 - Maximum number of episodes per podcast: True - 0.0 + False + Maximum number of episodes per podcast: + 0 False + True + 0 - adjustment_episode_limit True + True + adjustment_episode_limit False + True 1 False + True 3 - horizontal True + False False + True 4 - 12 True - horizontal + False + 12 - When new episodes are found: True - 0.0 + False + When new episodes are found: + 0 False + True + 0 True - + False + + False + True 1 False + True 5 - horizontal True + False False + True 6 @@ -577,68 +569,94 @@ Check connection before updating (if supported) True + True + False + True False + True 7 - Updating 2 + + + True + False + Updating + + + 2 + False + + - 12 - 6 True + False + 12 vertical + 6 - 12 True - horizontal + False + 12 - Delete played episodes: True - 0.0 - 0.1 + False + Delete played episodes: + 0 + 0.10000000149011612 False + True + 0 - 0 - True - bottom True - adjustment_expiration - horizontal + True + True True - - + adjustment_expiration + 0 + bottom + + + False + True 1 False + True + 0 Remove played episodes even if unfinished True + True + False + True False + True 1 @@ -646,35 +664,52 @@ Also remove unplayed episodes True + True + False + True False + True 2 - Clean-up 3 + + + True + False + Clean-up + + + 3 + False + + True + False 12 - 6 vertical + 6 True - 12 + False 6 + 12 True - 0 + False Device type: + 0 0 @@ -684,6 +719,7 @@ True + False True @@ -695,8 +731,9 @@ True - 0 + False Mountpoint: + 0 0 @@ -706,8 +743,9 @@ True - True + True False + True @@ -716,25 +754,38 @@ + + False + True + 0 + Create playlists on device True + True False True + + False + True + 1 + True + False 12 True - 0 + False Playlists Folder: + 0 False @@ -745,6 +796,7 @@ True + True False @@ -755,24 +807,37 @@ + + False + True + 2 + Remove episodes deleted on device from gPodder True + True False True + + False + True + 3 + True + False 12 True - 0 + False After syncing an episode: + 0 False @@ -783,6 +848,7 @@ True + False @@ -792,29 +858,212 @@ + + False + True + 4 + Only sync unplayed episodes True + True False True + + False + True + 5 + Remove episodes deleted in gPodder from device True + True False True + + False + True + 6 + - Devices 4 + + + True + False + Devices + + + 4 + False + + + + + True + False + 12 + vertical + 6 + + + + True + False + 6 + 12 + + + True + False + Preferred YouTube format: + 0 + + + 0 + 0 + + + + + True + False + True + + + + 1 + 0 + + + + + True + False + Preferred YouTube HLS format: + 0 + + + 0 + 1 + + + + + True + False + True + + + + 1 + 1 + + + + + True + False + Preferred Vimeo format: + 0 + + + 0 + 2 + + + + + True + False + + + + 1 + 2 + + + + + False + True + 0 + + + + + 5 + + + + + True + False + Video + + + 5 + False + + + + + True + False + 12 + vertical + 6 + + + True + True + in + + + True + True + False + 1 + + + + + + + + + + True + True + 0 + + + + + 6 + + + + + True + False + Extensions + + + 6 + False + + True @@ -822,38 +1071,6 @@ 2 - - - 5 - end - 6 - True - - - Edit config - True - - - - - - gtk-close - True - True - - - - True - True - 1 - - - - - False - end - - diff --git a/src/gpodder/gtkui/desktop/podcastdirectory.py b/src/gpodder/gtkui/desktop/podcastdirectory.py index 9c881574..79cdd5c4 100644 --- a/src/gpodder/gtkui/desktop/podcastdirectory.py +++ b/src/gpodder/gtkui/desktop/podcastdirectory.py @@ -99,6 +99,7 @@ class DirectoryProvidersModel(Gtk.ListStore): class gPodderPodcastDirectory(BuilderWidget): def new(self): + self.gPodderPodcastDirectory.set_transient_for(self.parent_widget) if hasattr(self, 'custom_title'): self.main_window.set_title(self.custom_title) diff --git a/src/gpodder/gtkui/desktop/preferences.py b/src/gpodder/gtkui/desktop/preferences.py index 9fd4690e..7dc874f4 100644 --- a/src/gpodder/gtkui/desktop/preferences.py +++ b/src/gpodder/gtkui/desktop/preferences.py @@ -185,6 +185,7 @@ class gPodderPreferences(BuilderWidget): C_TOGGLE, C_LABEL, C_EXTENSION, C_SHOW_TOGGLE = list(range(4)) def new(self): + self.gPodderPreferences.set_transient_for(self.parent_widget) for cb in (self.combo_audio_player_app, self.combo_video_player_app): cellrenderer = Gtk.CellRendererPixbuf() cb.pack_start(cellrenderer, False)