Skip to content

Commit

Permalink
fix song info window when no artist/title tag set
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Horowitz committed Jul 8, 2007
1 parent cfc7d23 commit dad1200
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sonata.py
Expand Up @@ -3834,7 +3834,7 @@ def infowindow_add_lyrics_tab(self, show_tab=False):
lyricsbox_bottom = gtk.HBox()
self.lyrics_refresh = gtk.Button(' ' + _("_Search..."))
self.lyrics_refresh.set_image(gtk.image_new_from_stock(gtk.STOCK_FIND, gtk.ICON_SIZE_MENU))
self.lyrics_refresh.connect('clicked', self.on_lyrics_search, self.songinfo.artist, self.songinfo.title)
self.lyrics_refresh.connect('clicked', self.on_lyrics_search)
lyricsbox_bottom.pack_start(self.lyrics_refresh, False, False, 3)
lyricsbox.pack_start(lyricsbox_bottom, False, False, 3)
self.infowindow_notebook.append_page(lyricsbox, nblabel4)
Expand Down Expand Up @@ -3995,7 +3995,9 @@ def infowindow_show_now(self):
self.infowindow.show_all()
self.infowindow_visible = True

def on_lyrics_search(self, event, artist, title):
def on_lyrics_search(self, event):
artist = self.songinfo.artist
title = self.songinfo.title
dialog = gtk.Dialog('Lyrics Search', self.infowindow, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_FIND, gtk.RESPONSE_ACCEPT))
dialog.action_area.get_children()[0].set_label(_("Search"))
dialog.action_area.get_children()[0].set_image(gtk.image_new_from_stock(gtk.STOCK_FIND, gtk.ICON_SIZE_MENU))
Expand Down

0 comments on commit dad1200

Please sign in to comment.