def episodeContextMenu(self, episode): menu = [] toggle_new = _('Mark as old') if episode.is_new else _('Mark as new') menu.append(helper.Action(toggle_new, 'episode-toggle-new', episode)) toggle_archive = _('Allow deletion') if episode.archive else _('Archive') menu.append(helper.Action(toggle_archive, 'episode-toggle-archive', episode)) if episode.state != gpodder.STATE_DELETED: menu.append(helper.Action(_('Delete'), 'episode-delete', episode)) menu.append(helper.Action(_('Add to play queue'), 'episode-enqueue', episode)) self.show_context_menu(menu)
def podcastContextMenu(self, podcast): menu = [] if isinstance(podcast, model.EpisodeSubsetView): menu.append(helper.Action(_('Mark episodes as old'), 'mark-all-as-read', podcast)) menu.append(helper.Action(_('Update all'), 'update-all', podcast)) else: menu.append(helper.Action(_('Update'), 'update', podcast)) menu.append(helper.Action(_('Mark episodes as old'), 'mark-as-read', podcast)) menu.append(helper.Action(_('Rename'), 'rename-podcast', podcast)) menu.append(helper.Action(_('Copy URL to clipboard'), 'copy-url-clipboard', podcast)) menu.append(helper.Action(_('Change section'), 'change-section', podcast)) menu.append(helper.Action(_('Unsubscribe'), 'unsubscribe', podcast)) #menu.append(helper.Action('Force update all', 'force-update-all', podcast)) #menu.append(helper.Action('Force update', 'force-update', podcast)) self.show_context_menu(menu)