Skip to content

Commit

Permalink
Added a simple "Edit" menu item to the Favorites right click context …
Browse files Browse the repository at this point in the history
…menu to launch gnome-desktop-item-edit in context. Not complete yet, more to do...
  • Loading branch information
icius committed Jan 21, 2010
1 parent 6d6114d commit 5f419d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usr/lib/linuxmint/mintMenu/plugins/applications.py
Expand Up @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5f419d8

Please sign in to comment.