commit
ac407379d0
@ -54,8 +54,11 @@ ICON = "/usr/lib/linuxmint/mintMenu/visualisation-logo.png"
|
|||||||
|
|
||||||
sys.path.append( os.path.join( PATH , "plugins") )
|
sys.path.append( os.path.join( PATH , "plugins") )
|
||||||
|
|
||||||
# FIXME: Get the windowmanager from somewhere, don't take GNOME for granted
|
# FIX: Get the window manager from the GDMSESSION environment variable, fallback to GNOME if it's not set
|
||||||
xdg.Config.setWindowManager( "GNOME" )
|
windowManager = os.getenv("GDMSESSION")
|
||||||
|
if not windowManager:
|
||||||
|
windowManager = "GNOME"
|
||||||
|
xdg.Config.setWindowManager( windowManager.upper() )
|
||||||
|
|
||||||
from easybuttons import iconManager
|
from easybuttons import iconManager
|
||||||
from easygconf import EasyGConf
|
from easygconf import EasyGConf
|
||||||
|
@ -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
|
||||||
@ -821,13 +821,16 @@ class pluginclass( object ):
|
|||||||
#print "CATFILTER"
|
#print "CATFILTER"
|
||||||
self.activeFilter = (1, category)
|
self.activeFilter = (1, category)
|
||||||
if category == "":
|
if category == "":
|
||||||
|
listedDesktopFiles = []
|
||||||
for i in self.applicationsBox.get_children():
|
for i in self.applicationsBox.get_children():
|
||||||
i.show_all()
|
if not i.desktop_file_path in listedDesktopFiles:
|
||||||
|
listedDesktopFiles.append( i.desktop_file_path )
|
||||||
|
i.show_all()
|
||||||
|
else:
|
||||||
|
i.hide()
|
||||||
else:
|
else:
|
||||||
for i in self.applicationsBox.get_children():
|
for i in self.applicationsBox.get_children():
|
||||||
i.filterCategory( category )
|
i.filterCategory( category )
|
||||||
for i in self.applicationsBox.get_children():
|
|
||||||
i.filterCategory( category )
|
|
||||||
|
|
||||||
for i in self.categoriesBox.get_children():
|
for i in self.categoriesBox.get_children():
|
||||||
i.set_relief( gtk.RELIEF_NONE )
|
i.set_relief( gtk.RELIEF_NONE )
|
||||||
@ -983,8 +986,11 @@ class pluginclass( object ):
|
|||||||
startupMenuItem.set_active( False )
|
startupMenuItem.set_active( False )
|
||||||
startupMenuItem.connect( "toggled", self.onAddToStartup, widget )
|
startupMenuItem.connect( "toggled", self.onAddToStartup, widget )
|
||||||
|
|
||||||
|
mTree.get_widget( "applicationsMenu" ).connect( 'deactivate', self.onMenuPopupDeactivate)
|
||||||
mTree.get_widget( "applicationsMenu" ).popup( None, None, None, event.button, event.time )
|
mTree.get_widget( "applicationsMenu" ).popup( None, None, None, event.button, event.time )
|
||||||
self.mintMenuWin.grab()
|
|
||||||
|
def onMenuPopupDeactivate( self, widget):
|
||||||
|
self.mintMenuWin.grab()
|
||||||
|
|
||||||
def searchPopup( self, widget=None, event=None ):
|
def searchPopup( self, widget=None, event=None ):
|
||||||
menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
@ -1617,6 +1623,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"] )
|
||||||
@ -1675,13 +1683,14 @@ class pluginclass( object ):
|
|||||||
item["button"] = MenuApplicationLauncher( item["entry"].get_desktop_file_path(), self.iconSize, item["category"], self.showapplicationcomments, highlight=(True and menu_has_changed) )
|
item["button"] = MenuApplicationLauncher( item["entry"].get_desktop_file_path(), self.iconSize, item["category"], self.showapplicationcomments, highlight=(True and menu_has_changed) )
|
||||||
if item["button"].appExec:
|
if item["button"].appExec:
|
||||||
self.mintMenuWin.setTooltip( item["button"], item["button"].getTooltip() )
|
self.mintMenuWin.setTooltip( item["button"], item["button"].getTooltip() )
|
||||||
item["button"].connect( "button-release-event", self.menuPopup )
|
item["button"].connect( "button-press-event", self.menuPopup )
|
||||||
item["button"].connect( "focus-in-event", self.scrollItemIntoView )
|
item["button"].connect( "focus-in-event", self.scrollItemIntoView )
|
||||||
item["button"].connect( "clicked", lambda w: self.mintMenuWin.hide() )
|
item["button"].connect( "clicked", lambda w: self.mintMenuWin.hide() )
|
||||||
if self.activeFilter[0] == 0:
|
if self.activeFilter[0] == 0:
|
||||||
item["button"].filterText( self.activeFilter[1] )
|
item["button"].filterText( self.activeFilter[1] )
|
||||||
else:
|
else:
|
||||||
item["button"].filterCategory( self.activeFilter[1] )
|
item["button"].filterCategory( self.activeFilter[1] )
|
||||||
|
item["button"].desktop_file_path = item["entry"].get_desktop_file_path()
|
||||||
sortedApplicationList.append( ( item["button"].appName.upper(), item["button"] ) )
|
sortedApplicationList.append( ( item["button"].appName.upper(), item["button"] ) )
|
||||||
self.applicationList.append( item )
|
self.applicationList.append( item )
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user