diff --git a/debian/changelog b/debian/changelog index c80c9e5..738ad4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 30 Nov 2009 14:59:00 +0000 + mintmenu (4.9.0) helena; urgency=low * Changed hover delay from 150 to 50ms - -- Clement Lefebvre Fri, 29 Nov 2009 14:59:00 +0000 + -- Clement Lefebvre Fri, 27 Nov 2009 14:59:00 +0000 mintmenu (4.8.9) helena; urgency=low diff --git a/debian/control b/debian/control index 4996e5c..833c8cd 100644 --- a/debian/control +++ b/debian/control @@ -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. diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 16b62fa..28c1a9e 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -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