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
|
mintmenu (4.9.0) helena; urgency=low
|
||||||
|
|
||||||
* Changed hover delay from 150 to 50ms
|
* 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
|
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
|
Package: mintmenu
|
||||||
Architecture: all
|
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
|
Description: Advanced Gnome menu
|
||||||
One of the most advanced menus under Linux. MintMenu supports filtering, favorites, easy-uninstallation, autosession, and many other features.
|
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():
|
for child in menu.directory.get_contents():
|
||||||
if child.get_type() == gmenu.TYPE_DIRECTORY:
|
if child.get_type() == gmenu.TYPE_DIRECTORY:
|
||||||
icon = str(child.icon)
|
icon = str(child.icon)
|
||||||
if (icon == "preferences-system"):
|
#if (icon == "preferences-system"):
|
||||||
self.adminMenu = child.name
|
# self.adminMenu = child.name
|
||||||
if (icon != "applications-system" and icon != "applications-other"):
|
#if (icon != "applications-system" and icon != "applications-other"):
|
||||||
newCategoryList.append( { "name": child.name, "icon": child.icon, "tooltip": child.name, "filter": child.name, "index": num } )
|
newCategoryList.append( { "name": child.name, "icon": child.icon, "tooltip": child.name, "filter": child.name, "index": num } )
|
||||||
num += 1
|
num += 1
|
||||||
|
|
||||||
return newCategoryList
|
return newCategoryList
|
||||||
@ -1210,18 +1210,32 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
newApplicationsList = []
|
newApplicationsList = []
|
||||||
|
|
||||||
for menu in self.menuFiles:
|
def find_applications_recursively(app_list, directory, catName):
|
||||||
for directory in menu.directory.get_contents():
|
for item in directory.get_contents():
|
||||||
if directory.get_type() == gmenu.TYPE_DIRECTORY:
|
if item.get_type() == gmenu.TYPE_ENTRY:
|
||||||
for application in directory.get_contents():
|
print "=======>>> " + str(item.name) + " = " + str(catName)
|
||||||
if application.get_type() == gmenu.TYPE_ENTRY:
|
app_list.append( { "entry": item, "category": catName } )
|
||||||
catName = directory.name
|
elif item.get_type() == gmenu.TYPE_DIRECTORY:
|
||||||
icon = str(directory.icon)
|
find_applications_recursively(app_list, item, catName)
|
||||||
if (icon == "applications-system" or icon == "applications-other"):
|
|
||||||
catName = self.adminMenu
|
|
||||||
newApplicationsList.append( { "entry": application, "category": catName } )
|
|
||||||
else:
|
|
||||||
print "Missing something"
|
|
||||||
|
|
||||||
|
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
|
return newApplicationsList
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user