---------- Forwarded message ----------
From: Andreas Böttger <[email protected]>
Date: 2009/9/28
Subject: Re: [Bug 558] Minimize gPodder in the system notification area
To: [email protected]
Sorry, here comes the patches. Sorry for the "code clean".
2009/9/28 <[email protected]>
https://bugs.gpodder.org/show_bug.cgi?id=558
>
> --- Comment #4 from Thomas Perl <[email protected]> 2009-09-28 14:06:23 BST
> ---
> Andreas: Any update on the patch?
>
> --
> Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
diff --git a/data/ui/desktop/gpodderpreferences.ui
b/data/ui/desktop/gpodderpreferences.ui
index af8bf5e..4f20170 100644
--- a/data/ui/desktop/gpodderpreferences.ui
+++ b/data/ui/desktop/gpodderpreferences.ui
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<interface>
+ <requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="adjustment1">
<property name="value">20</property>
@@ -1114,6 +1115,15 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">2</property>
@@ -1153,7 +1163,7 @@
<object class="GtkTable" id="table12">
<property name="visible">True</property>
<property name="border_width">10</property>
- <property name="n_rows">9</property>
+ <property name="n_rows">10</property>
<property name="n_columns">2</property>
<property name="column_spacing">5</property>
<property name="row_spacing">5</property>
@@ -1213,7 +1223,7 @@
</object>
<packing>
<property name="top_attach">1</property>
- <property name="bottom_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -1230,8 +1240,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -1245,8 +1255,8 @@
</object>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -1257,8 +1267,8 @@
</object>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="y_padding">3</property>
@@ -1276,8 +1286,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -1289,8 +1299,8 @@
<property name="icon-size">6</property>
</object>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -1309,12 +1319,30 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="on_quit_systray">
+ <property name="label" translatable="yes">Close to sytem
notification area</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child>
diff --git a/src/gpodder/config.py b/src/gpodder/config.py
index daa6021..ec5fb72 100644
--- a/src/gpodder/config.py
+++ b/src/gpodder/config.py
@@ -43,7 +43,7 @@ else:
gPodderSettings = {
# General settings
- 'player': (str, 'default',
+ 'player': (str, 'default',
_("The default player for all media, if set to 'default' this will "
"attempt to use xdg-open on linux or the built-in media player on
maemo.")),
'videoplayer': (str, 'default',
@@ -62,7 +62,7 @@ gPodderSettings = {
_("The maximum number of simultaneous downloads allowed at a single "
"time. Requires 'max_downloads_enabled'.")),
'max_downloads_enabled': ( bool, True,
- _("The 'max_downloads' setting will only work if this is set to
'True'.")),
+ _("The 'max_downloads' setting will only work if this is set to
'True'.")),
'limit_rate': ( bool, False,
_("The 'limit_rate_value' setting will only work if this is set to
'True'.")),
'limit_rate_value': ( float, 500.0,
@@ -111,13 +111,13 @@ gPodderSettings = {
'disable_pre_sync_conversion': (bool, False,
_("Disable pre-synchronization conversion of OGG files. This should be "
"enabled for deviced that natively support OGG. Eg. Rockbox, iAudio")),
-
+
# Tray icon and notification settings
'display_tray_icon': (bool, False,
_("Whether or not gPodder should display an icon in the system tray.")),
'minimize_to_tray': (bool, False,
_("If 'display_tray_icon' is enabled, when gPodder is minimized it will "
- "not be visible in the window list.")),
+ "not be visible in the window list.")),
'start_iconified': (bool, False,
_("When gPodder starts, send it to the tray immediately.")),
'enable_notifications': (bool, True,
@@ -130,6 +130,8 @@ gPodderSettings = {
'do_not_show_new_episodes_dialog': (bool, False,
_("Do not show the new episodes dialog after updating feed cache when "
"gPodder is not minimized")),
+ 'on_quit_systray': (bool, False,
+ _("When the 'X' button is clicked do not quit, send gPodder to the
tray.")),
# Settings that are updated directly in code
@@ -152,8 +154,6 @@ gPodderSettings = {
_("Whether or not the player requires Windows-style paths in the
playlist.")),
# Special settings (not in preferences)
- 'on_quit_systray': (bool, False,
- _("When the 'X' button is clicked do not quit, send gPodder to the
tray.")),
'max_episodes_per_feed': (int, 200,
_("The maximum number of episodes that gPodder will display in the
episode "
"list. Note: Set this to a lower value on slower hardware to speed up "
@@ -242,7 +242,7 @@ gPodderSettings.update(window_props('episode_window',
width=500, height=400))
class Config(dict):
Settings = gPodderSettings
-
+
# Number of seconds after which settings are auto-saved
WRITE_TO_DISK_TIMEOUT = 60
@@ -264,7 +264,7 @@ class Config(dict):
if '{channel' in self.custom_sync_name:
log('Fixing OLD syntax {channel.*} => {podcast.*} in
custom_sync_name.', sender=self)
self.custom_sync_name = self.custom_sync_name.replace('{channel.',
'{podcast.')
-
+
def __getattr__(self, name):
if name in self.Settings:
return self[name]
@@ -273,7 +273,7 @@ class Config(dict):
def get_description(self, option_name):
description = _('No description available.')
-
+
if self.Settings.get(option_name) is not None:
row = self.Settings[option_name]
if len(row) >= 3:
@@ -284,7 +284,7 @@ class Config(dict):
def add_observer(self, callback):
"""
Add a callback function as observer. This callback
- will be called when a setting changes. It should
+ will be called when a setting changes. It should
have this signature:
observer(name, old_value, new_value)
diff --git a/src/gpodder/gtkui/desktop/preferences.py
b/src/gpodder/gtkui/desktop/preferences.py
index c87995d..e04d297 100644
--- a/src/gpodder/gtkui/desktop/preferences.py
+++ b/src/gpodder/gtkui/desktop/preferences.py
@@ -46,15 +46,18 @@ class gPodderPreferences(BuilderWidget):
self._config.connect_gtk_spinbutton('auto_update_frequency',
self.auto_update_frequency)
self._config.connect_gtk_togglebutton('display_tray_icon',
self.display_tray_icon)
self._config.connect_gtk_togglebutton('minimize_to_tray',
self.minimize_to_tray)
+ self._config.connect_gtk_togglebutton('on_quit_systray',
self.on_quit_systray)
self._config.connect_gtk_togglebutton('enable_notifications',
self.enable_notifications)
self._config.connect_gtk_togglebutton('start_iconified',
self.start_iconified)
self._config.connect_gtk_togglebutton('ipod_delete_played_from_db',
self.ipod_delete_played_from_db)
self._config.connect_gtk_togglebutton('mp3_player_delete_played',
self.delete_episodes_marked_played)
self._config.connect_gtk_togglebutton('disable_pre_sync_conversion',
self.player_supports_ogg)
-
-
self.enable_notifications.set_sensitive(self.display_tray_icon.get_active())
-
self.minimize_to_tray.set_sensitive(self.display_tray_icon.get_active())
-
+
+
self.enable_notifications.set_sensitive(self.display_tray_icon.get_active())
+
self.minimize_to_tray.set_sensitive(self.display_tray_icon.get_active())
+
+ self.on_quit_systray.set_sensitive(self.display_tray_icon.get_active())
+
self.entryCustomSyncName.set_sensitive(
self.cbCustomSyncName.get_active())
self.iPodMountpoint.set_label( self._config.ipod_mount)
@@ -63,7 +66,7 @@ class gPodderPreferences(BuilderWidget):
self.on_sync_delete.set_sensitive(not
self.delete_episodes_marked_played.get_active())
self.on_sync_mark_played.set_sensitive(not
self.delete_episodes_marked_played.get_active())
-
+
# device type
self.comboboxDeviceType.set_active( 0)
if self._config.device_type == 'ipod':
@@ -151,14 +154,14 @@ class gPodderPreferences(BuilderWidget):
index += 1
# return index of custom command or first item
return max(0, index_custom)
-
+
def on_auto_update_feeds_toggled( self, widget, *args):
self.auto_update_frequency.set_sensitive(widget.get_active())
-
+
def on_display_tray_icon_toggled( self, widget, *args):
- self.enable_notifications.set_sensitive(widget.get_active())
- self.minimize_to_tray.set_sensitive(widget.get_active())
-
+ self.enable_notifications.set_sensitive(widget.get_active())
+ self.minimize_to_tray.set_sensitive(widget.get_active())
+
def on_cbCustomSyncName_toggled( self, widget, *args):
self.entryCustomSyncName.set_sensitive( widget.get_active())
diff --git a/src/gpodder/gui.py b/src/gpodder/gui.py
index cbbf70f..c3c248e 100644
--- a/src/gpodder/gui.py
+++ b/src/gpodder/gui.py
@@ -128,7 +128,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.db = Database(gpodder.database_file)
self.config = config
BuilderWidget.__init__(self, None)
-
+
def new(self):
if gpodder.interface == gpodder.MAEMO:
self.app = hildon.Program()
@@ -173,7 +173,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.itemShowToolbar.set_active(self.config.show_toolbar)
self.itemShowDescription.set_active(self.config.episode_list_descriptions)
-
+
self.config.connect_gtk_spinbutton('max_downloads',
self.spinMaxDownloads)
self.config.connect_gtk_togglebutton('max_downloads_enabled',
self.cbMaxDownloads)
self.config.connect_gtk_spinbutton('limit_rate_value',
self.spinLimitDownloads)
@@ -1025,7 +1025,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
menu.append( item)
menu.show_all()
- # Disable tooltips while we are showing the menu, so
+ # Disable tooltips while we are showing the menu, so
# the tooltip will not appear over the menu
self.treeview_allow_tooltips(self.treeChannels, False)
menu.connect('deactivate', lambda menushell:
self.treeview_allow_tooltips(self.treeChannels, True))
@@ -1046,7 +1046,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
have to update our model to reflect this change.
"""
self.podcast_list_model.delete_cover_by_url(channel_url)
-
+
def cover_download_finished(self, channel_url, pixbuf):
"""
The Cover Downloader calls this when it has finished
@@ -1257,7 +1257,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
item.set_image(gtk.image_new_from_icon_name(ICON('web-browser'),
gtk.ICON_SIZE_MENU))
item.connect('activate', lambda w:
util.open_website(episodes[0].link))
menu.append(self.set_finger_friendly(item))
-
+
if gpodder.interface == gpodder.MAEMO:
# Because we open the popup on left-click for Maemo,
# we also include a non-action to close the menu
@@ -1267,7 +1267,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
menu.append(self.set_finger_friendly(item))
menu.show_all()
- # Disable tooltips while we are showing the menu, so
+ # Disable tooltips while we are showing the menu, so
# the tooltip will not appear over the menu
self.treeview_allow_tooltips(self.treeAvailable, False)
menu.connect('deactivate', lambda menushell:
self.treeview_allow_tooltips(self.treeAvailable, True))
@@ -1427,7 +1427,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
selection = self.treeAvailable.get_selection()
if selection.count_selected_rows() > 0:
(model, paths) = selection.get_selected_rows()
-
+
for path in paths:
episode = model.get_value(model.get_iter(path),
EpisodeListModel.C_EPISODE)
@@ -1577,7 +1577,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
threading.Thread(target=do_update_episode_list_model).start()
else:
self.episode_list_model.clear()
-
+
def offer_new_episodes(self, channels=None):
new_episodes = self.get_new_episodes(channels)
if new_episodes:
@@ -1791,10 +1791,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.new_episodes_show(episodes, notification=True)
else:
if len(episodes) == 1:
- message = _('One new episode is available for
download')
+ message = _('One new episode is available for
download')
else:
message = _('%i new episodes are available for
download' % len(episodes))
-
+
self.pbFeedUpdate.set_text(message)
def _update_cover(self, channel):
@@ -1859,7 +1859,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.show_update_feeds_buttons()
def update_feed_cache(self, channels=None, force_update=True,
select_url_afterwards=None):
- if self.updating_feed_cache:
+ if self.updating_feed_cache:
return
if not force_update:
@@ -1867,14 +1867,14 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.channel_list_changed = True
self.update_podcast_list_model(select_url=select_url_afterwards)
return
-
+
self.updating_feed_cache = True
self.itemUpdate.set_sensitive(False)
self.itemUpdateChannel.set_sensitive(False)
if self.tray_icon:
self.tray_icon.set_status(self.tray_icon.STATUS_UPDATING_FEED_CACHE)
-
+
if channels is None:
channels = self.channels
@@ -1910,7 +1910,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# Only iconify if we are using the window's "X" button,
# but not when we are using "Quit" in the menu or toolbar
- if not self.config.on_quit_ask and self.config.on_quit_systray and
self.tray_icon and widget.get_name() not in ('toolQuit', 'itemQuit'):
+ if self.config.on_quit_systray and self.tray_icon and
widget.get_name() not in ('toolQuit', 'itemQuit'):
self.iconify_main_window()
elif self.config.on_quit_ask or downloading:
if gpodder.interface == gpodder.MAEMO:
@@ -2334,12 +2334,12 @@ class gPodder(BuilderWidget, dbus.service.Object):
return False
return True
-
+
def my_gpodder_offer_autoupload(self):
if not self.config.my_gpodder_autoupload:
if self.show_confirmation(_('gPodder can automatically upload your
subscription list to my.gpodder.org when you close it. Do you want to enable
this feature?'), _('Upload subscriptions on quit')):
self.config.my_gpodder_autoupload = True
-
+
def on_download_from_mygpo(self, widget):
if self.require_my_gpodder_authentication():
client = my.MygPodderClient(self.config.my_gpodder_username,
self.config.my_gpodder_password)
@@ -2420,10 +2420,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
title = _('Remove podcast and episodes?')
message = _('Do you really want to remove <b>%s</b> and all
downloaded episodes?') % saxutils.escape(self.active_channel.title)
-
+
dialog.set_title(title)
dialog.set_markup('<span weight="bold"
size="larger">%s</span>\n\n%s'%(title, message))
-
+
cb_ask = gtk.CheckButton(_('Do not delete my downloaded
episodes'))
dialog.vbox.pack_start(cb_ask)
cb_ask.show_all()
@@ -2461,7 +2461,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# there is a podcast after the deleted one, so
# we simply select the one that comes after it
select_url = self.channels[position+1].url
-
+
# Remove the channel
self.active_channel.delete(purge=not keep_episodes)
self.channels.remove(self.active_channel)
@@ -2583,7 +2583,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
dlg.set_logo(gtk.gdk.pixbuf_new_from_file(gpodder.icon_file))
except:
dlg.set_logo_icon_name('gpodder')
-
+
dlg.run()
def on_wNotebook_switch_page(self, widget, *args):
@@ -2674,13 +2674,13 @@ class gPodder(BuilderWidget, dbus.service.Object):
"""Double-click/enter action handler for treeAvailable"""
# We should only have one one selected as it was double clicked!
e = self.get_selected_episodes()[0]
-
+
if (self.config.double_click_episode_action == 'download'):
# If the episode has already been downloaded and exists then play
it
if e.was_downloaded(and_exists=True):
self.playback_episodes(self.get_selected_episodes())
# else download it if it is not already downloading
- elif not self.episode_is_downloading(e):
+ elif not self.episode_is_downloading(e):
self.download_episode_list([e])
self.update_episode_list_icons([e.url])
self.play_or_download()
@@ -2688,7 +2688,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# If we happen to have downloaded this episode simple play it
if e.was_downloaded(and_exists=True):
self.playback_episodes(self.get_selected_episodes())
- # else if streaming is possible stream it
+ # else if streaming is possible stream it
elif self.streaming_possible():
self.playback_episodes(self.get_selected_episodes())
else:
@@ -2734,7 +2734,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.enable_download_list_update()
elif task.status == task.DONE:
model.remove(model.get_iter(tree_row_reference.get_path()))
-
+
self.play_or_download()
# Update the tab title and downloads list
@@ -2780,7 +2780,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# so if we are not a Maemo app, we don't do anything
if gpodder.interface != gpodder.MAEMO:
return False
-
+
diff = 0
if event.keyval == gtk.keysyms.F7: #plus
diff = 1
@@ -2816,10 +2816,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
def uniconify_main_window(self):
if self.is_iconified():
self.gPodder.present()
-
+
def iconify_main_window(self):
if not self.is_iconified():
- self.gPodder.iconify()
+ self.gPodder.iconify()
def update_podcasts_tab(self):
if len(self.channels):
diff --git a/src/gpodder/gui.py b/src/gpodder/gui.py
index cbbf70f..c3c248e 100644
--- a/src/gpodder/gui.py
+++ b/src/gpodder/gui.py
@@ -128,7 +128,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.db = Database(gpodder.database_file)
self.config = config
BuilderWidget.__init__(self, None)
-
+
def new(self):
if gpodder.interface == gpodder.MAEMO:
self.app = hildon.Program()
@@ -173,7 +173,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.itemShowToolbar.set_active(self.config.show_toolbar)
self.itemShowDescription.set_active(self.config.episode_list_descriptions)
-
+
self.config.connect_gtk_spinbutton('max_downloads',
self.spinMaxDownloads)
self.config.connect_gtk_togglebutton('max_downloads_enabled',
self.cbMaxDownloads)
self.config.connect_gtk_spinbutton('limit_rate_value',
self.spinLimitDownloads)
@@ -1025,7 +1025,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
menu.append( item)
menu.show_all()
- # Disable tooltips while we are showing the menu, so
+ # Disable tooltips while we are showing the menu, so
# the tooltip will not appear over the menu
self.treeview_allow_tooltips(self.treeChannels, False)
menu.connect('deactivate', lambda menushell:
self.treeview_allow_tooltips(self.treeChannels, True))
@@ -1046,7 +1046,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
have to update our model to reflect this change.
"""
self.podcast_list_model.delete_cover_by_url(channel_url)
-
+
def cover_download_finished(self, channel_url, pixbuf):
"""
The Cover Downloader calls this when it has finished
@@ -1257,7 +1257,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
item.set_image(gtk.image_new_from_icon_name(ICON('web-browser'),
gtk.ICON_SIZE_MENU))
item.connect('activate', lambda w:
util.open_website(episodes[0].link))
menu.append(self.set_finger_friendly(item))
-
+
if gpodder.interface == gpodder.MAEMO:
# Because we open the popup on left-click for Maemo,
# we also include a non-action to close the menu
@@ -1267,7 +1267,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
menu.append(self.set_finger_friendly(item))
menu.show_all()
- # Disable tooltips while we are showing the menu, so
+ # Disable tooltips while we are showing the menu, so
# the tooltip will not appear over the menu
self.treeview_allow_tooltips(self.treeAvailable, False)
menu.connect('deactivate', lambda menushell:
self.treeview_allow_tooltips(self.treeAvailable, True))
@@ -1427,7 +1427,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
selection = self.treeAvailable.get_selection()
if selection.count_selected_rows() > 0:
(model, paths) = selection.get_selected_rows()
-
+
for path in paths:
episode = model.get_value(model.get_iter(path),
EpisodeListModel.C_EPISODE)
@@ -1577,7 +1577,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
threading.Thread(target=do_update_episode_list_model).start()
else:
self.episode_list_model.clear()
-
+
def offer_new_episodes(self, channels=None):
new_episodes = self.get_new_episodes(channels)
if new_episodes:
@@ -1791,10 +1791,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.new_episodes_show(episodes, notification=True)
else:
if len(episodes) == 1:
- message = _('One new episode is available for
download')
+ message = _('One new episode is available for
download')
else:
message = _('%i new episodes are available for
download' % len(episodes))
-
+
self.pbFeedUpdate.set_text(message)
def _update_cover(self, channel):
@@ -1859,7 +1859,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.show_update_feeds_buttons()
def update_feed_cache(self, channels=None, force_update=True,
select_url_afterwards=None):
- if self.updating_feed_cache:
+ if self.updating_feed_cache:
return
if not force_update:
@@ -1867,14 +1867,14 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.channel_list_changed = True
self.update_podcast_list_model(select_url=select_url_afterwards)
return
-
+
self.updating_feed_cache = True
self.itemUpdate.set_sensitive(False)
self.itemUpdateChannel.set_sensitive(False)
if self.tray_icon:
self.tray_icon.set_status(self.tray_icon.STATUS_UPDATING_FEED_CACHE)
-
+
if channels is None:
channels = self.channels
@@ -1910,7 +1910,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# Only iconify if we are using the window's "X" button,
# but not when we are using "Quit" in the menu or toolbar
- if not self.config.on_quit_ask and self.config.on_quit_systray and
self.tray_icon and widget.get_name() not in ('toolQuit', 'itemQuit'):
+ if self.config.on_quit_systray and self.tray_icon and
widget.get_name() not in ('toolQuit', 'itemQuit'):
self.iconify_main_window()
elif self.config.on_quit_ask or downloading:
if gpodder.interface == gpodder.MAEMO:
@@ -2334,12 +2334,12 @@ class gPodder(BuilderWidget, dbus.service.Object):
return False
return True
-
+
def my_gpodder_offer_autoupload(self):
if not self.config.my_gpodder_autoupload:
if self.show_confirmation(_('gPodder can automatically upload your
subscription list to my.gpodder.org when you close it. Do you want to enable
this feature?'), _('Upload subscriptions on quit')):
self.config.my_gpodder_autoupload = True
-
+
def on_download_from_mygpo(self, widget):
if self.require_my_gpodder_authentication():
client = my.MygPodderClient(self.config.my_gpodder_username,
self.config.my_gpodder_password)
@@ -2420,10 +2420,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
title = _('Remove podcast and episodes?')
message = _('Do you really want to remove <b>%s</b> and all
downloaded episodes?') % saxutils.escape(self.active_channel.title)
-
+
dialog.set_title(title)
dialog.set_markup('<span weight="bold"
size="larger">%s</span>\n\n%s'%(title, message))
-
+
cb_ask = gtk.CheckButton(_('Do not delete my downloaded
episodes'))
dialog.vbox.pack_start(cb_ask)
cb_ask.show_all()
@@ -2461,7 +2461,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# there is a podcast after the deleted one, so
# we simply select the one that comes after it
select_url = self.channels[position+1].url
-
+
# Remove the channel
self.active_channel.delete(purge=not keep_episodes)
self.channels.remove(self.active_channel)
@@ -2583,7 +2583,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
dlg.set_logo(gtk.gdk.pixbuf_new_from_file(gpodder.icon_file))
except:
dlg.set_logo_icon_name('gpodder')
-
+
dlg.run()
def on_wNotebook_switch_page(self, widget, *args):
@@ -2674,13 +2674,13 @@ class gPodder(BuilderWidget, dbus.service.Object):
"""Double-click/enter action handler for treeAvailable"""
# We should only have one one selected as it was double clicked!
e = self.get_selected_episodes()[0]
-
+
if (self.config.double_click_episode_action == 'download'):
# If the episode has already been downloaded and exists then play
it
if e.was_downloaded(and_exists=True):
self.playback_episodes(self.get_selected_episodes())
# else download it if it is not already downloading
- elif not self.episode_is_downloading(e):
+ elif not self.episode_is_downloading(e):
self.download_episode_list([e])
self.update_episode_list_icons([e.url])
self.play_or_download()
@@ -2688,7 +2688,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# If we happen to have downloaded this episode simple play it
if e.was_downloaded(and_exists=True):
self.playback_episodes(self.get_selected_episodes())
- # else if streaming is possible stream it
+ # else if streaming is possible stream it
elif self.streaming_possible():
self.playback_episodes(self.get_selected_episodes())
else:
@@ -2734,7 +2734,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.enable_download_list_update()
elif task.status == task.DONE:
model.remove(model.get_iter(tree_row_reference.get_path()))
-
+
self.play_or_download()
# Update the tab title and downloads list
@@ -2780,7 +2780,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# so if we are not a Maemo app, we don't do anything
if gpodder.interface != gpodder.MAEMO:
return False
-
+
diff = 0
if event.keyval == gtk.keysyms.F7: #plus
diff = 1
@@ -2816,10 +2816,10 @@ class gPodder(BuilderWidget, dbus.service.Object):
def uniconify_main_window(self):
if self.is_iconified():
self.gPodder.present()
-
+
def iconify_main_window(self):
if not self.is_iconified():
- self.gPodder.iconify()
+ self.gPodder.iconify()
def update_podcasts_tab(self):
if len(self.channels):
_______________________________________________
gpodder-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-devel