Commits

Vladimir Kolev committed 66ec56c

Playlist now shows artist and songname with markup

Comments (0)

Files changed (1)

         self.sw2 = builder.get_object('scrolledwindow2')
         self.playlist = gtk.ListStore(str, gtk.gdk.Pixbuf, str, str, object, int)
         self.play_view = gtk.IconView(self.playlist)
-        self.play_view.set_text_column(0)
+        self.play_view.set_markup_column(0)
         self.play_view.set_pixbuf_column(1)
         self.play_view.set_tooltip_column(2)
         self.play_view.set_columns(999)
         self.prefsmenu.popup(None, None, None, 0, 0)
     
     def add_song_to_playlist(self, song):
-        song_string = song['ArtistName'] + " - " + song['SongName']
-        if len(song_string) > 14:
-            song_string = song_string[:13] + "..."
+        song_string = "<b>%s</b>\n<i>%s</i>" % (song['ArtistName'], song['SongName'])
+        #if len(song_string) > 14:
+        #    song_string = song_string[:13] + "..."
         self.playlist.append([
             song_string,
             self.create_track_icon(song['CoverArtFilename']),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.