ocarina: Use libsaria.sources.cur_id for scrolling

I was using a get_attrs() call for finding the current song id.  This
information is available directly through libsaria.sources, though.  I
think it will be easier to just use the cur_id variable.
This commit is contained in:
Bryan Schumaker 2011-05-28 15:31:59 -04:00
parent 1cbb1fb969
commit 1bb0480c65
1 changed files with 2 additions and 2 deletions

View File

@ -95,8 +95,8 @@ class ListView(gtk.TreeView):
self.thaw()
def goto(self, *args):
id = libsaria.sources.get_attrs("id")
if id == -1: # Bad id
id = libsaria.sources.cur_id
if id == None or id == -1: # Bad id
return
vis = self.get_visible_rect()
if vis[3] == 0: # The widget hasn't been realized yet