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...
This commit is contained in:
parent
6d6114d344
commit
5f419d81f7
@ -633,6 +633,7 @@ class pluginclass( object ):
|
|||||||
mTree = gtk.glade.XML( self.gladefile, "favoritesMenu" )
|
mTree = gtk.glade.XML( self.gladefile, "favoritesMenu" )
|
||||||
#i18n
|
#i18n
|
||||||
launchMenuItem = gtk.MenuItem(_("Launch"))
|
launchMenuItem = gtk.MenuItem(_("Launch"))
|
||||||
|
editMenuItem = gtk.MenuItem(_("Edit"))
|
||||||
removeFromFavMenuItem = gtk.MenuItem(_("Remove from favorites"))
|
removeFromFavMenuItem = gtk.MenuItem(_("Remove from favorites"))
|
||||||
startupMenuItem = gtk.CheckMenuItem(_("Launch when I log in"))
|
startupMenuItem = gtk.CheckMenuItem(_("Launch when I log in"))
|
||||||
separator = gtk.SeparatorMenuItem()
|
separator = gtk.SeparatorMenuItem()
|
||||||
@ -641,11 +642,13 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
|
|
||||||
launchMenuItem.connect( "activate", self.onLaunchApp, widget)
|
launchMenuItem.connect( "activate", self.onLaunchApp, widget)
|
||||||
|
editMenuItem.connect( "activate", self.onEditApp, widget)
|
||||||
removeFromFavMenuItem.connect( "activate", self.onFavoritesRemove, widget )
|
removeFromFavMenuItem.connect( "activate", self.onFavoritesRemove, widget )
|
||||||
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
|
insertSpaceMenuItem.connect( "activate", self.onFavoritesInsertSpace, widget, insertBefore )
|
||||||
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
|
insertSeparatorMenuItem.connect( "activate", self.onFavoritesInsertSeparator, widget, insertBefore )
|
||||||
|
|
||||||
mTree.get_widget("favoritesMenu").append(launchMenuItem)
|
mTree.get_widget("favoritesMenu").append(launchMenuItem)
|
||||||
|
mTree.get_widget("favoritesMenu").append(editMenuItem)
|
||||||
mTree.get_widget("favoritesMenu").append(removeFromFavMenuItem)
|
mTree.get_widget("favoritesMenu").append(removeFromFavMenuItem)
|
||||||
mTree.get_widget("favoritesMenu").append(startupMenuItem)
|
mTree.get_widget("favoritesMenu").append(startupMenuItem)
|
||||||
mTree.get_widget("favoritesMenu").append(separator)
|
mTree.get_widget("favoritesMenu").append(separator)
|
||||||
@ -718,6 +721,11 @@ class pluginclass( object ):
|
|||||||
widget.execute()
|
widget.execute()
|
||||||
self.mintMenuWin.hide()
|
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 ):
|
def onUninstallApp( self, menu, widget ):
|
||||||
widget.uninstall()
|
widget.uninstall()
|
||||||
self.mintMenuWin.hide()
|
self.mintMenuWin.hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user