Updated patch

This commit is contained in:
Rigoberto Calleja 2013-04-23 20:38:08 -05:00
parent 3a0f32c136
commit e20122a41a
2 changed files with 8 additions and 9 deletions

View file

@ -256,8 +256,8 @@ Item {
Action {
text: _('Update')
onClicked: {
controller.updatePodcast(main.currentPodcast)
main.showMessage(_('Updating podcast'))
controller.updatePodcast(main.currentPodcast);
main.showMessage(_('Updating podcast'));
}
},
Action {

View file

@ -528,10 +528,10 @@ class Controller(QObject):
@Slot(QObject)
def updatePodcast(self, podcast):
if not self.request_connection():
return
if not podcast.pause_subscription:
podcast.qupdate(finished_callback=self.update_subset_stats)
if not self.request_connection():
return
if not podcast.pause_subscription:
podcast.qupdate(finished_callback=self.update_subset_stats)
@Slot()
def updateAllPodcasts(self):
@ -587,10 +587,9 @@ class Controller(QObject):
def contextMenuResponse(self, index):
assert index < len(self.context_menu_actions)
action = self.context_menu_actions[index]
if action.action == 'update':
podcast = action.target
self.updatePodcast(podcast)
podcast = action.target
self.updatePodcast(podcast)
elif action.action == 'force-update':
action.target.qupdate(force=True, \
finished_callback=self.update_subset_stats)