Double-click or press Enter to open channel settings.
This provides similar behavior to opening shownotes for episodes.
This commit is contained in:
parent
b034f3dc29
commit
c35c6aa887
|
@ -3508,6 +3508,20 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
# double-click action of the podcast list or enter
|
||||
self.treeChannels.set_cursor(path)
|
||||
|
||||
# open channel settings
|
||||
channel = self.get_selected_channels()[0]
|
||||
if channel and not isinstance(channel, PodcastChannelProxy):
|
||||
self.on_itemEditChannel_activate(None)
|
||||
|
||||
def get_selected_channels(self):
|
||||
"""Get a list of selected channels from treeChannels"""
|
||||
selection = self.treeChannels.get_selection()
|
||||
model, paths = selection.get_selected_rows()
|
||||
|
||||
channels = [model.get_value(model.get_iter(path), PodcastListModel.C_CHANNEL) for path in paths]
|
||||
channels = [c for c in channels if c is not None]
|
||||
return channels
|
||||
|
||||
def on_treeChannels_cursor_changed(self, widget, *args):
|
||||
(model, iter) = self.treeChannels.get_selection().get_selected()
|
||||
|
||||
|
|
Loading…
Reference in New Issue