From 5f419d81f72eda682a3f1591d56e432f7ba92939 Mon Sep 17 00:00:00 2001 From: Icius Date: Thu, 21 Jan 2010 17:59:19 -0500 Subject: [PATCH] Added a simple "Edit" menu item to the Favorites right click context menu to launch gnome-desktop-item-edit in context. Not complete yet, more to do... --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index 28c1a9e..dfc1051 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -633,6 +633,7 @@ def favPopup( self, widget, ev ): mTree = gtk.glade.XML( self.gladefile, "favoritesMenu" ) #i18n launchMenuItem = gtk.MenuItem(_("Launch")) + editMenuItem = gtk.MenuItem(_("Edit")) removeFromFavMenuItem = gtk.MenuItem(_("Remove from favorites")) startupMenuItem = gtk.CheckMenuItem(_("Launch when I log in")) separator = gtk.SeparatorMenuItem() @@ -641,11 +642,13 @@ def favPopup( self, widget, ev ): launchMenuItem.connect( "activate", self.onLaunchApp, widget) + editMenuItem.connect( "activate", self.onEditApp, widget) removeFromFavMenuItem.connect( "activate", self.onFavoritesRemove, widget ) insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore ) insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore ) mTree.get_widget("favoritesMenu").append(launchMenuItem) + mTree.get_widget("favoritesMenu").append(editMenuItem) mTree.get_widget("favoritesMenu").append(removeFromFavMenuItem) mTree.get_widget("favoritesMenu").append(startupMenuItem) mTree.get_widget("favoritesMenu").append(separator) @@ -718,6 +721,11 @@ def onLaunchApp( self, menu, widget ): widget.execute() self.mintMenuWin.hide() + def onEditApp( self, menu, widget ): + # print u"Location of favorite is: " + widget.desktopFile + os.system('gnome-desktop-item-edit ' + widget.desktopFile) + self.mintMenuWin.hide() + def onUninstallApp( self, menu, widget ): widget.uninstall() self.mintMenuWin.hide()