mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
small consolidation
This commit is contained in:
parent
c950aff51b
commit
49b277d38f
@ -320,6 +320,16 @@ class ArtistView(Gtk.ScrolledWindow):
|
|||||||
self.clear()
|
self.clear()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def get_selected_artists(self):
|
||||||
|
paths=self.selection.get_selected_rows()[1]
|
||||||
|
artists=[]
|
||||||
|
for path in paths:
|
||||||
|
treeiter = self.store.get_iter(path)
|
||||||
|
if not treeiter == None:
|
||||||
|
selected_artist=self.store.get_value(treeiter, 0)
|
||||||
|
artists.append(selected_artist)
|
||||||
|
return artists
|
||||||
|
|
||||||
class AlbumIconView(Gtk.IconView):
|
class AlbumIconView(Gtk.IconView):
|
||||||
def __init__(self, client, settings, window):
|
def __init__(self, client, settings, window):
|
||||||
Gtk.IconView.__init__(self)
|
Gtk.IconView.__init__(self)
|
||||||
@ -760,14 +770,8 @@ class Browser(Gtk.Box):
|
|||||||
pass
|
pass
|
||||||
self.title_list.scroll_to_selected_title()
|
self.title_list.scroll_to_selected_title()
|
||||||
|
|
||||||
def on_artist_selection_change(self, widget):
|
def on_artist_selection_change(self, *args):
|
||||||
paths=widget.get_selected_rows()[1]
|
artists=self.artist_list.get_selected_artists()
|
||||||
artists=[]
|
|
||||||
for path in paths:
|
|
||||||
treeiter = self.artist_list.store.get_iter(path)
|
|
||||||
if not treeiter == None:
|
|
||||||
selected_artist=self.artist_list.store.get_value(treeiter, 0)
|
|
||||||
artists.append(selected_artist)
|
|
||||||
self.album_list.refresh(artists)
|
self.album_list.refresh(artists)
|
||||||
|
|
||||||
class ProfileSettings(Gtk.Grid):
|
class ProfileSettings(Gtk.Grid):
|
||||||
|
Loading…
Reference in New Issue
Block a user