Add checkbox to disable connection checking.
This avoids issues with connection checking from breaking gPodder until an update becomes available.
This commit is contained in:
parent
5d1363babc
commit
844aef7c1b
|
@ -563,6 +563,26 @@
|
|||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="hseparator_updating3">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton_check_connection">
|
||||
<property name="label" translatable="yes">Check connection before updating (if supported)</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-label" translatable="yes">Updating</property>
|
||||
|
|
|
@ -91,6 +91,8 @@ defaults = {
|
|||
'retries': 3, # number of retries when downloads time out
|
||||
},
|
||||
|
||||
'check_connection': True,
|
||||
|
||||
# Software updates from gpodder.org
|
||||
'software_update': {
|
||||
'check_on_startup': True, # check for updates on start
|
||||
|
|
|
@ -254,6 +254,9 @@ class gPodderPreferences(BuilderWidget):
|
|||
self.combo_auto_download.add_attribute(cellrenderer, 'text', NewEpisodeActionList.C_CAPTION)
|
||||
self.combo_auto_download.set_active(self.auto_download_model.get_index())
|
||||
|
||||
self._config.connect_gtk_togglebutton('check_connection',
|
||||
self.checkbutton_check_connection)
|
||||
|
||||
if self._config.auto_remove_played_episodes:
|
||||
adjustment_expiration = self.hscale_expiration.get_adjustment()
|
||||
if self._config.episode_old_age > adjustment_expiration.get_upper():
|
||||
|
|
|
@ -2611,7 +2611,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
|
||||
def update_feed_cache(self, channels=None,
|
||||
show_new_episodes_dialog=True):
|
||||
if not util.connection_available():
|
||||
if self.config.check_connection and not util.connection_available():
|
||||
self.show_message(_('Please connect to a network, then try again.'),
|
||||
_('No network connection'), important=True)
|
||||
return
|
||||
|
@ -3526,7 +3526,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
interval, self._on_auto_update_timer)
|
||||
|
||||
def _on_auto_update_timer(self):
|
||||
if not util.connection_available():
|
||||
if self.config.check_connection and not util.connection_available():
|
||||
logger.debug('Skipping auto update (no connection available)')
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue