Skip to content

Commit

Permalink
tray tooltip image follows pref
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Horowitz committed Sep 14, 2006
1 parent 3fc520b commit af688e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sonata.py
Expand Up @@ -423,6 +423,9 @@ def __init__(self):
self.trayalbumimage = gtk.Image()
self.trayalbumimage.set_size_request(50, 50)
self.trayalbumimage.set_padding(5, 5)
if not self.show_covers:
self.trayalbumimage.set_no_show_all(True)
self.trayalbumimage.hide()
self.tipbox.pack_start(self.trayalbumimage, False, False, 6)
self.tipbox.pack_start(innerbox, True, True, 6)

Expand Down Expand Up @@ -868,7 +871,8 @@ def update_cursong(self):
self.trayalbumimage.hide()
else:
self.trayprogressbar.show()
self.trayalbumimage.show()
if self.show_covers:
self.trayalbumimage.show()

def update_wintitle(self):
if self.conn and self.status and self.status.state in ['play', 'pause']:
Expand Down Expand Up @@ -1524,10 +1528,14 @@ def prefs(self, widget):
self.lastalbumart = None
self.imageeventbox.set_no_show_all(False)
self.imageeventbox.show_all()
self.trayalbumimage.set_no_show_all(False)
self.trayalbumimage.show_all()
self.update_album_art()
elif show_covers_prev == True and self.show_covers == False:
self.imageeventbox.set_no_show_all(True)
self.imageeventbox.hide()
self.trayalbumimage.set_no_show_all(True)
self.trayalbumimage.hide()
self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
while gtk.events_pending():
gtk.main_iteration()
Expand Down

0 comments on commit af688e1

Please sign in to comment.