Improved gmenu sub-category items detection, added python-gnomeapplet dependency, split other, administration and system tools categories
This commit is contained in:
parent
61273ca28d
commit
7ef7521e44
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -1,8 +1,16 @@
|
||||
mintmenu (4.9.1) helena; urgency=low
|
||||
|
||||
* Split Others, Administration and System tools categories (if we do it again we have to patch Alacarte to reflect this)
|
||||
* Improved gmenu detection (didn't detect applications in sub-categories)
|
||||
* Added dependency on python-gnomeapplet, needed by mintmenu
|
||||
|
||||
-- Clement Lefebvre <root@linuxmint.com> Mon, 30 Nov 2009 14:59:00 +0000
|
||||
|
||||
mintmenu (4.9.0) helena; urgency=low
|
||||
|
||||
* Changed hover delay from 150 to 50ms
|
||||
|
||||
-- Clement Lefebvre <root@linuxmint.com> Fri, 29 Nov 2009 14:59:00 +0000
|
||||
-- Clement Lefebvre <root@linuxmint.com> Fri, 27 Nov 2009 14:59:00 +0000
|
||||
|
||||
mintmenu (4.8.9) helena; urgency=low
|
||||
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -7,6 +7,6 @@ Standards-Version: 3.7.2
|
||||
|
||||
Package: mintmenu
|
||||
Architecture: all
|
||||
Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, deskbar-applet, mint-common, python-gmenu
|
||||
Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, deskbar-applet, mint-common, python-gmenu, python-gnomeapplet
|
||||
Description: Advanced Gnome menu
|
||||
One of the most advanced menus under Linux. MintMenu supports filtering, favorites, easy-uninstallation, autosession, and many other features.
|
||||
|
@ -1197,10 +1197,10 @@ class pluginclass( object ):
|
||||
for child in menu.directory.get_contents():
|
||||
if child.get_type() == gmenu.TYPE_DIRECTORY:
|
||||
icon = str(child.icon)
|
||||
if (icon == "preferences-system"):
|
||||
self.adminMenu = child.name
|
||||
if (icon != "applications-system" and icon != "applications-other"):
|
||||
newCategoryList.append( { "name": child.name, "icon": child.icon, "tooltip": child.name, "filter": child.name, "index": num } )
|
||||
#if (icon == "preferences-system"):
|
||||
# self.adminMenu = child.name
|
||||
#if (icon != "applications-system" and icon != "applications-other"):
|
||||
newCategoryList.append( { "name": child.name, "icon": child.icon, "tooltip": child.name, "filter": child.name, "index": num } )
|
||||
num += 1
|
||||
|
||||
return newCategoryList
|
||||
@ -1210,18 +1210,32 @@ class pluginclass( object ):
|
||||
|
||||
newApplicationsList = []
|
||||
|
||||
for menu in self.menuFiles:
|
||||
for directory in menu.directory.get_contents():
|
||||
if directory.get_type() == gmenu.TYPE_DIRECTORY:
|
||||
for application in directory.get_contents():
|
||||
if application.get_type() == gmenu.TYPE_ENTRY:
|
||||
catName = directory.name
|
||||
icon = str(directory.icon)
|
||||
if (icon == "applications-system" or icon == "applications-other"):
|
||||
catName = self.adminMenu
|
||||
newApplicationsList.append( { "entry": application, "category": catName } )
|
||||
else:
|
||||
print "Missing something"
|
||||
def find_applications_recursively(app_list, directory, catName):
|
||||
for item in directory.get_contents():
|
||||
if item.get_type() == gmenu.TYPE_ENTRY:
|
||||
print "=======>>> " + str(item.name) + " = " + str(catName)
|
||||
app_list.append( { "entry": item, "category": catName } )
|
||||
elif item.get_type() == gmenu.TYPE_DIRECTORY:
|
||||
find_applications_recursively(app_list, item, catName)
|
||||
|
||||
for menu in self.menuFiles:
|
||||
directory = menu.directory
|
||||
for entry in directory.get_contents():
|
||||
if entry.get_type() == gmenu.TYPE_DIRECTORY and len(entry.get_contents()):
|
||||
#Entry is a top-level category
|
||||
#catName = entry.name
|
||||
#icon = str(entry.icon)
|
||||
#if (icon == "applications-system" or icon == "applications-other"):
|
||||
# catName = self.adminMenu
|
||||
for item in entry.get_contents():
|
||||
if item.get_type() == gmenu.TYPE_DIRECTORY:
|
||||
find_applications_recursively(newApplicationsList, item, entry.name)
|
||||
elif item.get_type() == gmenu.TYPE_ENTRY:
|
||||
newApplicationsList.append( { "entry": item, "category": entry.name } )
|
||||
#elif entry.get_type() == gmenu.TYPE_ENTRY:
|
||||
# if not (entry.get_is_excluded() or entry.get_is_nodisplay()):
|
||||
# print "=======>>> " + item.name + " = top level"
|
||||
# newApplicationsList.append( { "entry": item, "category": "" } )
|
||||
|
||||
return newApplicationsList
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user