Corrected bug preventing "Hover" option changes to be taken into account immediately

This commit is contained in:
Gwendal Le Bihan 2011-08-29 17:55:26 +02:00
parent e719f985d8
commit 01d95a69b3

View File

@ -432,7 +432,7 @@ class pluginclass( object ):
startId = child.connect( "enter", self.StartFilter, child.filter ) startId = child.connect( "enter", self.StartFilter, child.filter )
stopId = child.connect( "leave", self.StopFilter ) stopId = child.connect( "leave", self.StopFilter )
child.mouseOverHandlerIds = ( startId, stopId ) child.mouseOverHandlerIds = ( startId, stopId )
elif self.categories_mouse_over and child.mouseOverHandlerIds: elif not self.categories_mouse_over and child.mouseOverHandlerIds:
child.disconnect( child.mouseOverHandlerIds[0] ) child.disconnect( child.mouseOverHandlerIds[0] )
child.disconnect( child.mouseOverHandlerIds[1] ) child.disconnect( child.mouseOverHandlerIds[1] )
child.mouseOverHandlerIds = None child.mouseOverHandlerIds = None
@ -1617,6 +1617,8 @@ class pluginclass( object ):
startId = item["button"].connect( "enter", self.StartFilter, item["filter"] ) startId = item["button"].connect( "enter", self.StartFilter, item["filter"] )
stopId = item["button"].connect( "leave", self.StopFilter ) stopId = item["button"].connect( "leave", self.StopFilter )
item["button"].mouseOverHandlerIds = ( startId, stopId ) item["button"].mouseOverHandlerIds = ( startId, stopId )
else:
item["button"].mouseOverHandlerIds = None
item["button"].connect( "clicked", self.Filter, item["filter"] ) item["button"].connect( "clicked", self.Filter, item["filter"] )
item["button"].connect( "focus-in-event", self.categoryBtnFocus, item["filter"] ) item["button"].connect( "focus-in-event", self.categoryBtnFocus, item["filter"] )