Fixed button highlight problem

This commit is contained in:
Clement Lefebvre 2009-11-06 12:28:41 +00:00
parent 692e5495cc
commit 85a44e7fc2

View File

@ -170,12 +170,16 @@ class easyButton( gtk.Button ):
self.add( Align1 ) self.add( Align1 )
self.connectSelf( "destroy", self.onDestroy ) self.connectSelf( "destroy", self.onDestroy )
self.connect( "released", self.onRelease )
# Reload icons when the theme changed # Reload icons when the theme changed
self.themeChangedHandlerId = iconManager.connect("changed", self.themeChanged ) self.themeChangedHandlerId = iconManager.connect("changed", self.themeChanged )
def connectSelf( self, event, callback ): def connectSelf( self, event, callback ):
self.connections.append( self.connect( event, callback ) ) self.connections.append( self.connect( event, callback ) )
def onRelease( self, widget ):
widget.set_state(gtk.STATE_NORMAL)
def onDestroy( self, widget ): def onDestroy( self, widget ):
self.buttonImage.clear() self.buttonImage.clear()
iconManager.disconnect( self.themeChangedHandlerId ) iconManager.disconnect( self.themeChangedHandlerId )