GNOME Bugzilla – Bug 593736
play button is empty
Last modified: 2009-09-04 15:31:04 UTC
Created attachment 142177 [details] screenshot of the problem Thanks, gtk devs (bug #583352).
hmm.... so what shall we do for this ?
This kind of play/pause combo seems to work well in Totem and Banshee, regardless of what the gconf-key is set to. How does that code differ?
grrr... just installed latest gtk+ on my system... and there's indeed a lot of screwups. This is our code for the play/pause button. Any idea on what we're doing wrong is more than welcome. class PlayPauseButton(gtk.Button, Loggable): """ Double state gtk.Button which displays play/pause """ __gsignals__ = { "play" : ( gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_BOOLEAN, )) } def __init__(self): gtk.Button.__init__(self, label="") Loggable.__init__(self) self.playing = True self.setPlay() self.connect('clicked', self._clickedCb) def set_sensitive(self, value): gtk.Button.set_sensitive(self, value) def _clickedCb(self, unused): self.emit("play", self.playing) def setPlay(self): """ display the play image """ self.log("setPlay") if self.playing: self.set_image(gtk.image_new_from_stock(gtk.STOCK_MEDIA_PLAY, gtk.ICON_SIZE_BUTTON)) self.playing = False def setPause(self): self.log("setPause") """ display the pause image """ if not self.playing: self.set_image(gtk.image_new_from_stock(gtk.STOCK_MEDIA_PAUSE, gtk.ICON_SIZE_BUTTON)) self.playing = True
commit 24a13dae34de9c70bd51c39f1568454c4257dece Author: Alessandro Decina <alessandro.d@gmail.com> Date: Fri Sep 4 17:28:26 2009 +0200 Force the play button to be visible, regardless of the gtk-button-images set ting.