Commits

Vladimir Kolev committed da226c9

Updated version - The playlist selector now follows the current playing song.

Comments (0)

Files changed (2)

data/about_dialog.ui

     <property name="icon">gsharkdown_64.png</property>
     <property name="type_hint">dialog</property>
     <property name="program_name">gSharkDown</property>
-    <property name="version">0.2.6</property>
+    <property name="version">0.2.7</property>
     <property name="copyright" translatable="yes">(c) Vladimir Kolev 2011</property>
     <property name="comments" translatable="yes">Gnome-toolkit based desktop application for downloading music files from Grooveshark.com</property>
     <property name="website">https://bitbucket.org/vkolev/gsharkdown</property>
         self.play_view.set_model(self.playlist)
         self.play_view.connect('row-activated', self.double_click_start)
         self._create_play_columns()
+        self.selector = self.play_view.get_selection()
 
         self.staticon = gtk.StatusIcon()
         self.staticon.set_from_file("%s/data/gsharkdown_16.png" % BASEPATH)
         else:
             self.player.set_state(gst.STATE_NULL)
             self.play_button.set_stock_id(gtk.STOCK_MEDIA_PLAY)
+            self.playing = None
             self.set_songinfos()
-            self.playing = None
 
     def set_songinfos(self, song=None):
         """
         Updates some labels and icons when a song is playing
         """
         if song != None:
+            if self.playing == None:
+                self.playing = 0
+            treerow = self.playlist.iter_nth_child(None, self.playing)
+            self.selector.select_iter(treerow)
             self.staticon.set_from_file(
                 "%s/data/gsharkdown_16_playing.png" % BASEPATH
             )
             self.staticon.set_tooltip(
                 "gSharkDown: GrooveShark Downloader"
             )
+            self.selector.unselect_all()
             self.songinfo.set_markup("")
 
     def download_selected(self, widget, data=None):