Fix menu refresh

This commit is contained in:
Michael Webster 2013-03-08 17:56:45 -05:00
parent a90cb0ac19
commit c36cbfe690
2 changed files with 4 additions and 4 deletions

View File

@ -586,7 +586,7 @@ class pluginclass( object ):
def buildButtonList( self ):
if self.buildingButtonList:
self.stopBuildingButtonList = True
gobject.timeout_add( 100, self.buildButtonList )
GObject.timeout_add( 100, self.buildButtonList )
return
self.stopBuildingButtonList = False
@ -1579,9 +1579,9 @@ class pluginclass( object ):
def menuChanged( self, x, y ):
# wait some miliseconds because there a multiple events send at the same time and we don't want to rebuild the menu for each
if self.menuChangedTimer:
Gobject.source_remove( self.menuChangedTimer )
GObject.source_remove( self.menuChangedTimer )
self.menuChangedTimer = Gobject.timeout_add( 100, self.updateBoxes, True )
self.menuChangedTimer = GObject.timeout_add( 100, self.updateBoxes, True )
def updateBoxes( self, menu_has_changed ):
# FIXME: This is really bad!

View File

@ -392,7 +392,7 @@ class ApplicationLauncher( easyButton ):
icon = self.getIcon( Gtk.IconSize.DND )
if icon:
self.drag_source_set_icon_pixbuf( icon )
gtk.gtk_drag_source_set_icon_pixbuf( hash(self), hash(icon) )
del icon
def startupFileChanged( self, *args ):