Fix popup menus

This commit is contained in:
Clement Lefebvre 2017-04-28 13:44:09 +01:00
parent bf34d718cc
commit ccf9573581

View File

@ -916,6 +916,7 @@ class pluginclass( object ):
mTree.show_all() mTree.show_all()
self.mintMenuWin.stopHiding() self.mintMenuWin.stopHiding()
mTree.attach_to_widget(widget, None)
mTree.popup(None, None, None, None, event.button, event.time) mTree.popup(None, None, None, None, event.button, event.time)
else: else:
mTree = Gtk.Menu() mTree = Gtk.Menu()
@ -935,6 +936,7 @@ class pluginclass( object ):
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore ) insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore ) insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
self.mintMenuWin.stopHiding() self.mintMenuWin.stopHiding()
mTree.attach_to_widget(widget, None)
mTree.popup(None, None, None, None, event.button, event.time) mTree.popup(None, None, None, None, event.button, event.time)
def menuPopup( self, widget, event ): def menuPopup( self, widget, event ):
@ -997,6 +999,7 @@ class pluginclass( object ):
startupMenuItem.connect( "toggled", self.onAddToStartup, widget ) startupMenuItem.connect( "toggled", self.onAddToStartup, widget )
self.mintMenuWin.stopHiding() self.mintMenuWin.stopHiding()
mTree.attach_to_widget(widget, None)
mTree.popup(None, None, None, None, event.button, event.time) mTree.popup(None, None, None, None, event.button, event.time)
@ -1078,9 +1081,9 @@ class pluginclass( object ):
menu.show_all() menu.show_all()
self.mintMenuWin.stopHiding() self.mintMenuWin.stopHiding()
menu.attach_to_widget(self.searchButton, None)
menu.popup(None, None, None, None, event.button, event.time) menu.popup(None, None, None, None, event.button, event.time)
#menu.attach_to_widget(self.searchButton, None)
#menu.reposition() #menu.reposition()
#menu.reposition() #menu.reposition()
#self.mintMenuWin.grab() #self.mintMenuWin.grab()