popups and focus working now
This commit is contained in:
parent
614764a7e8
commit
8812475eac
@ -460,16 +460,15 @@ class MainWindow( object ):
|
||||
def grab( self ):
|
||||
gdk.gdk_pointer_grab (hash(self.window.window), True, Gdk.EventMask.BUTTON_PRESS_MASK, None, None, 0)
|
||||
Gdk.keyboard_grab( self.window.window, False, Gdk.CURRENT_TIME )
|
||||
# Gtk.grab_add(self.window)
|
||||
Gtk.grab_add(self.window)
|
||||
|
||||
def ungrab( self ):
|
||||
# Gtk.grab_remove(self.window)
|
||||
Gtk.grab_remove(self.window)
|
||||
self.window.hide()
|
||||
Gdk.pointer_ungrab(Gdk.CURRENT_TIME)
|
||||
Gdk.keyboard_ungrab(Gdk.CURRENT_TIME)
|
||||
|
||||
def onMap( self, widget, event ):
|
||||
return
|
||||
self.grab()
|
||||
|
||||
def onShow( self, widget ):
|
||||
@ -506,11 +505,13 @@ class MainWindow( object ):
|
||||
return True
|
||||
|
||||
def onGrabBroken( self, widget, event ):
|
||||
return
|
||||
if event.grab_broken.grab_window:
|
||||
try:
|
||||
theft = event.grab_broken.grab_window.get_user_data()
|
||||
theft.connect( "event", self.onGrabTheftEvent )
|
||||
except:
|
||||
except Exception, detail:
|
||||
print detail
|
||||
self.window.hide( True )
|
||||
|
||||
def onGrabTheftEvent( self, widget, event ):
|
||||
|
@ -922,7 +922,7 @@ class pluginclass( object ):
|
||||
mTree.show_all()
|
||||
|
||||
gtk.gtk_menu_popup(hash(mTree), None, None, None, ev.button, ev.time)
|
||||
# self.mintMenuWin.grab()
|
||||
self.mintMenuWin.grab()
|
||||
|
||||
else:
|
||||
mTree = Gtk.Menu()
|
||||
@ -942,8 +942,7 @@ class pluginclass( object ):
|
||||
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
|
||||
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
|
||||
gtk.gtk_menu_popup(hash(mTree), None, None, None, ev.button, ev.time)
|
||||
# self.mintMenuWin.grab()
|
||||
return True
|
||||
self.mintMenuWin.grab()
|
||||
|
||||
def menuPopup( self, widget, event ):
|
||||
if event.button == 3:
|
||||
@ -1008,8 +1007,7 @@ class pluginclass( object ):
|
||||
gtk.gtk_menu_popup(hash(mTree), None, None, None, None, 0, 0)
|
||||
|
||||
def onMenuPopupDeactivate( self, widget):
|
||||
pass
|
||||
#self.mintMenuWin.grab()
|
||||
self.mintMenuWin.grab()
|
||||
|
||||
def searchPopup( self, widget=None, event=None ):
|
||||
menu = Gtk.Menu()
|
||||
@ -1090,7 +1088,7 @@ class pluginclass( object ):
|
||||
#menu.attach_to_widget(self.searchButton, None)
|
||||
#menu.reposition()
|
||||
#menu.reposition()
|
||||
# self.mintMenuWin.grab()
|
||||
self.mintMenuWin.grab()
|
||||
self.focusSearchEntry()
|
||||
return True
|
||||
|
||||
|
@ -259,9 +259,7 @@ class pluginclass( object ):
|
||||
trashMenu.show_all()
|
||||
emptyTrashMenuItem.connect ( "activate", self.emptyTrash, widget )
|
||||
gtk.gtk_menu_popup(hash(trashMenu), None, None, None, None, 3, 0)
|
||||
#self.mintMenuWin.grab()
|
||||
return True
|
||||
|
||||
self.mintMenuWin.grab()
|
||||
|
||||
def emptyTrash( self, menu, widget):
|
||||
os.system("rm -rf " + home + "/.local/share/Trash/info/*")
|
||||
|
Loading…
Reference in New Issue
Block a user