Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7f920dfb72 | ||
|
cb9d4875f3 | ||
|
20a98cd287 | ||
|
df1460d7c5 | ||
|
02f49184ed | ||
|
30579e0b41 | ||
|
dfa0758153 |
20
debian/changelog
vendored
20
debian/changelog
vendored
@ -1,3 +1,23 @@
|
|||||||
|
mintmenu (5.9.1.2) debbie; urgency=medium
|
||||||
|
|
||||||
|
[ gm10 ]
|
||||||
|
* Places: Don't hardcode file browser (#204)
|
||||||
|
* Applications: Fix keypress event handler (#205)
|
||||||
|
|
||||||
|
[ Andrew ]
|
||||||
|
* Fix broke running with "xdg-su" in exec field (#200)
|
||||||
|
|
||||||
|
[ Clement Lefebvre ]
|
||||||
|
* Fix launching pkexec applications (#248)
|
||||||
|
|
||||||
|
-- Clement Lefebvre <root@linuxmint.com> Tue, 31 Mar 2020 12:37:33 +0100
|
||||||
|
|
||||||
|
mintmenu (5.9.1.1) debbie; urgency=medium
|
||||||
|
|
||||||
|
* Inject the app version during the build
|
||||||
|
|
||||||
|
-- Clement Lefebvre <root@linuxmint.com> Thu, 19 Mar 2020 11:04:38 +0000
|
||||||
|
|
||||||
mintmenu (5.9.1) tessa; urgency=medium
|
mintmenu (5.9.1) tessa; urgency=medium
|
||||||
|
|
||||||
* Change default menu icon
|
* Change default menu icon
|
||||||
|
11
debian/rules
vendored
11
debian/rules
vendored
@ -1,4 +1,13 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh ${@} --with python2
|
dh ${@} --with-python2
|
||||||
|
|
||||||
|
# Inject version number in the code
|
||||||
|
override_dh_installdeb:
|
||||||
|
dh_installdeb
|
||||||
|
for pkg in $$(dh_listpackages -i); do \
|
||||||
|
find debian/$$pkg -type f -exec sed -i -e s/__DEB_VERSION__/$(DEB_VERSION)/g {} +; \
|
||||||
|
done
|
||||||
|
@ -679,9 +679,7 @@ class MenuWin( object ):
|
|||||||
|
|
||||||
about = Gtk.AboutDialog()
|
about = Gtk.AboutDialog()
|
||||||
about.set_name("mintMenu")
|
about.set_name("mintMenu")
|
||||||
import commands
|
about.set_version("__DEB_VERSION__")
|
||||||
version = commands.getoutput("/usr/lib/linuxmint/common/version.py mintmenu")
|
|
||||||
about.set_version(version)
|
|
||||||
try:
|
try:
|
||||||
h = open('/usr/share/common-licenses/GPL','r')
|
h = open('/usr/share/common-licenses/GPL','r')
|
||||||
s = h.readlines()
|
s = h.readlines()
|
||||||
|
@ -215,7 +215,7 @@ class pluginclass( object ):
|
|||||||
self.filterTimer = None
|
self.filterTimer = None
|
||||||
self.menuChangedTimer = None
|
self.menuChangedTimer = None
|
||||||
# Hookup for text input
|
# Hookup for text input
|
||||||
self.content_holder.connect( "key-press-event", self.keyPress )
|
self.keyPress_handler = self.mintMenuWin.window.connect( "key-press-event", self.keyPress )
|
||||||
|
|
||||||
self.favoritesBox.connect( "drag-data-received", self.ReceiveCallback )
|
self.favoritesBox.connect( "drag-data-received", self.ReceiveCallback )
|
||||||
|
|
||||||
@ -324,6 +324,8 @@ class pluginclass( object ):
|
|||||||
self.categoriesBox.destroy()
|
self.categoriesBox.destroy()
|
||||||
self.favoritesBox.destroy()
|
self.favoritesBox.destroy()
|
||||||
|
|
||||||
|
self.mintMenuWin.window.disconnect(self.keyPress_handler)
|
||||||
|
|
||||||
self.settings.notifyRemoveAll()
|
self.settings.notifyRemoveAll()
|
||||||
|
|
||||||
def changePluginSize( self, settings, key, args ):
|
def changePluginSize( self, settings, key, args ):
|
||||||
@ -843,23 +845,11 @@ class pluginclass( object ):
|
|||||||
self.searchEntry.set_text( "" )
|
self.searchEntry.set_text( "" )
|
||||||
self.Filter( widget, category )
|
self.Filter( widget, category )
|
||||||
|
|
||||||
# Forward all text to the search box
|
|
||||||
def keyPress( self, widget, event ):
|
def keyPress( self, widget, event ):
|
||||||
|
""" Forward all text to the search box """
|
||||||
if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace:
|
if event.string.strip() or event.keyval == Gdk.KEY_space:
|
||||||
self.searchEntry.grab_focus()
|
|
||||||
self.searchEntry.set_position( -1 )
|
|
||||||
self.searchEntry.event( event )
|
self.searchEntry.event( event )
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
if event.keyval == Gdk.KEY_space:
|
|
||||||
self.searchEntry.event( event )
|
|
||||||
return True
|
|
||||||
|
|
||||||
if event.keyval == Gdk.KEY_Down and self.searchEntry.is_focus():
|
|
||||||
self.applicationsBox.get_children()[0].grab_focus()
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def favPopup( self, widget, event ):
|
def favPopup( self, widget, event ):
|
||||||
|
@ -377,7 +377,7 @@ class ApplicationLauncher( easyButton ):
|
|||||||
cmd = "mate-terminal -e \"" + self.appExec + "\""
|
cmd = "mate-terminal -e \"" + self.appExec + "\""
|
||||||
Execute(cmd, self.appPath)
|
Execute(cmd, self.appPath)
|
||||||
else:
|
else:
|
||||||
Execute(self.appExec, self.appPath)
|
Execute(None, desktopFile=self.desktopFile)
|
||||||
|
|
||||||
def uninstall (self, *args ):
|
def uninstall (self, *args ):
|
||||||
Execute("mint-remove-application " + self.desktopFile)
|
Execute("mint-remove-application " + self.desktopFile)
|
||||||
|
@ -1,46 +1,49 @@
|
|||||||
#!/usr/bin/python2
|
#!/usr/bin/python2
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from gi.repository import Gio, GLib
|
||||||
|
|
||||||
def RemoveArgs(Execline):
|
def RemoveArgs(Execline):
|
||||||
NewExecline = []
|
if isinstance(Execline, list):
|
||||||
Specials=["\"%c\"", "%f","%F","%u","%U","%d","%D","%n","%N","%i","%c","%k","%v","%m","%M", "-caption", "/bin/sh", "sh", "-c", "STARTED_FROM_MENU=yes"]
|
Execline = ' '.join(Execline)
|
||||||
for elem in Execline:
|
|
||||||
elem = elem.replace("'","")
|
Specials = ["%f", "%F", "%u", "%U", "%d", "%D", "%n", "%N", "%i", "%c", "%k", "%v", "%m", "%M",
|
||||||
elem = elem.replace("\"", "")
|
"STARTED_FROM_MENU=yes"]
|
||||||
if elem not in Specials:
|
for spec in Specials:
|
||||||
print elem
|
if spec in Execline:
|
||||||
NewExecline.append(elem)
|
Execline = Execline.replace(spec, "")
|
||||||
return NewExecline
|
|
||||||
|
return Execline
|
||||||
|
|
||||||
|
def dummy_child_watch (pid, status, data):
|
||||||
|
# Do nothing, this is just to ensure we don't double fork
|
||||||
|
# and break pkexec: https://bugzilla.gnome.org/show_bug.cgi?id=675789
|
||||||
|
pass
|
||||||
|
|
||||||
|
def gather_pid_callback(appinfo, pid, data):
|
||||||
|
GLib.child_watch_add(pid, dummy_child_watch, None)
|
||||||
|
|
||||||
# Actually execute the command
|
# Actually execute the command
|
||||||
def Execute( cmd , commandCwd=None):
|
def Execute(cmd , commandCwd=None, desktopFile=None):
|
||||||
if not commandCwd:
|
if desktopFile:
|
||||||
cwd = os.path.expanduser( "~" );
|
launcher = Gio.DesktopAppInfo.new_from_filename(desktopFile)
|
||||||
else:
|
retval = launcher.launch_uris_as_manager(uris=[], launch_context=None, spawn_flags=GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.DO_NOT_REAP_CHILD, \
|
||||||
tmpCwd = os.path.expanduser( commandCwd );
|
user_setup=None, user_setup_data=None, pid_callback=gather_pid_callback, pid_callback_data=None)
|
||||||
|
return retval
|
||||||
|
|
||||||
|
cwd = os.path.expanduser("~")
|
||||||
|
|
||||||
|
if commandCwd:
|
||||||
|
tmpCwd = os.path.expanduser(commandCwd)
|
||||||
if (os.path.exists(tmpCwd)):
|
if (os.path.exists(tmpCwd)):
|
||||||
cwd = tmpCwd
|
cwd = tmpCwd
|
||||||
|
|
||||||
if isinstance( cmd, str ) or isinstance( cmd, unicode):
|
|
||||||
if (cmd.find("ubiquity") >= 0) or (cmd.find("/home/") >= 0) or (cmd.find("su-to-root") >= 0) or (cmd.find("xdg-su") >= 0) or (cmd.find("\"") >= 0):
|
|
||||||
print "running manually..."
|
|
||||||
try:
|
|
||||||
os.chdir(cwd)
|
|
||||||
os.system(cmd + " &")
|
|
||||||
return True
|
|
||||||
except Exception, detail:
|
|
||||||
print detail
|
|
||||||
return False
|
|
||||||
cmd = cmd.split()
|
|
||||||
cmd = RemoveArgs(cmd)
|
cmd = RemoveArgs(cmd)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.chdir( cwd )
|
os.chdir(cwd)
|
||||||
string = ' '.join(cmd)
|
os.system(cmd + " &")
|
||||||
string = string + " &"
|
|
||||||
os.system(string)
|
|
||||||
return True
|
return True
|
||||||
except Exception, detail:
|
except Exception as err:
|
||||||
print detail
|
print err
|
||||||
return False
|
return False
|
||||||
|
@ -135,20 +135,14 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
if ( self.showcomputer == True ):
|
if ( self.showcomputer == True ):
|
||||||
Button1 = easyButton( "computer", self.iconsize, [_("Computer")], -1, -1 )
|
Button1 = easyButton( "computer", self.iconsize, [_("Computer")], -1, -1 )
|
||||||
if self.de == "mate":
|
Button1.connect( "clicked", self.ButtonClicked, "xdg-open computer:" )
|
||||||
Button1.connect( "clicked", self.ButtonClicked, "caja computer:" )
|
|
||||||
else:
|
|
||||||
Button1.connect( "clicked", self.ButtonClicked, "xdg-open /" )
|
|
||||||
Button1.show()
|
Button1.show()
|
||||||
self.placesBtnHolder.pack_start( Button1, False, False, 0)
|
self.placesBtnHolder.pack_start( Button1, False, False, 0)
|
||||||
self.mintMenuWin.setTooltip( Button1, _("Browse all local and remote disks and folders accessible from this computer") )
|
self.mintMenuWin.setTooltip( Button1, _("Browse all local and remote disks and folders accessible from this computer") )
|
||||||
|
|
||||||
if ( self.showhomefolder == True ):
|
if ( self.showhomefolder == True ):
|
||||||
Button2 = easyButton( "user-home", self.iconsize, [_("Home Folder")], -1, -1 )
|
Button2 = easyButton( "user-home", self.iconsize, [_("Home Folder")], -1, -1 )
|
||||||
if self.de == "mate":
|
Button2.connect( "clicked", self.ButtonClicked, "xdg-open %s " % home )
|
||||||
Button2.connect( "clicked", self.ButtonClicked, "caja %s " % home )
|
|
||||||
else:
|
|
||||||
Button2.connect( "clicked", self.ButtonClicked, "xdg-open %s " % home )
|
|
||||||
Button2.show()
|
Button2.show()
|
||||||
self.placesBtnHolder.pack_start( Button2, False, False, 0)
|
self.placesBtnHolder.pack_start( Button2, False, False, 0)
|
||||||
self.mintMenuWin.setTooltip( Button2, _("Open your personal folder") )
|
self.mintMenuWin.setTooltip( Button2, _("Open your personal folder") )
|
||||||
@ -160,10 +154,7 @@ class pluginclass( object ):
|
|||||||
Button3 = easyButton( "notification-network-ethernet-connected", self.iconsize, [_("Network")], -1, -1)
|
Button3 = easyButton( "notification-network-ethernet-connected", self.iconsize, [_("Network")], -1, -1)
|
||||||
else:
|
else:
|
||||||
Button3 = easyButton( "network-workgroup", self.iconsize, [_("Network")], -1, -1)
|
Button3 = easyButton( "network-workgroup", self.iconsize, [_("Network")], -1, -1)
|
||||||
if self.de == "mate":
|
Button3.connect( "clicked", self.ButtonClicked, "xdg-open network:" )
|
||||||
Button3.connect( "clicked", self.ButtonClicked, "caja network:" )
|
|
||||||
else:
|
|
||||||
Button3.connect( "clicked", self.ButtonClicked, "xdg-open network:" )
|
|
||||||
Button3.show()
|
Button3.show()
|
||||||
self.placesBtnHolder.pack_start( Button3, False, False, 0)
|
self.placesBtnHolder.pack_start( Button3, False, False, 0)
|
||||||
self.mintMenuWin.setTooltip( Button3, _("Browse bookmarked and local network locations") )
|
self.mintMenuWin.setTooltip( Button3, _("Browse bookmarked and local network locations") )
|
||||||
@ -182,22 +173,14 @@ class pluginclass( object ):
|
|||||||
except Exception, detail:
|
except Exception, detail:
|
||||||
print detail
|
print detail
|
||||||
Button4 = easyButton( "desktop", self.iconsize, [_("Desktop")], -1, -1 )
|
Button4 = easyButton( "desktop", self.iconsize, [_("Desktop")], -1, -1 )
|
||||||
if self.de == "mate":
|
Button4.connect( "clicked", self.ButtonClicked, "xdg-open \"" + desktopDir + "\"")
|
||||||
Button4.connect( "clicked", self.ButtonClicked, "caja \"" + desktopDir + "\"")
|
|
||||||
else:
|
|
||||||
Button4.connect( "clicked", self.ButtonClicked, "xdg-open \"" + desktopDir + "\"")
|
|
||||||
Button4.show()
|
Button4.show()
|
||||||
self.placesBtnHolder.pack_start( Button4, False, False, 0)
|
self.placesBtnHolder.pack_start( Button4, False, False, 0)
|
||||||
self.mintMenuWin.setTooltip( Button4, _("Browse items placed on the desktop") )
|
self.mintMenuWin.setTooltip( Button4, _("Browse items placed on the desktop") )
|
||||||
|
|
||||||
if ( self.showtrash == True ):
|
if ( self.showtrash == True ):
|
||||||
self.trashButton = easyButton( "user-trash", self.iconsize, [_("Trash")], -1, -1 )
|
self.trashButton = easyButton( "user-trash", self.iconsize, [_("Trash")], -1, -1 )
|
||||||
if self.de == "xfce":
|
self.trashButton.connect( "clicked", self.ButtonClicked, "xdg-open trash:" )
|
||||||
self.trashButton.connect( "clicked", self.ButtonClicked, "thunar trash:" )
|
|
||||||
elif self.de == "mate":
|
|
||||||
self.trashButton.connect( "clicked", self.ButtonClicked, "caja trash:" )
|
|
||||||
else:
|
|
||||||
self.trashButton.connect( "clicked", self.ButtonClicked, "xdg-open trash:" )
|
|
||||||
self.trashButton.show()
|
self.trashButton.show()
|
||||||
self.trashButton.connect( "button-release-event", self.trashPopup )
|
self.trashButton.connect( "button-release-event", self.trashPopup )
|
||||||
self.refreshTrash()
|
self.refreshTrash()
|
||||||
@ -208,10 +191,7 @@ class pluginclass( object ):
|
|||||||
for index in range( len(self.custompaths) ):
|
for index in range( len(self.custompaths) ):
|
||||||
path = self.custompaths[index]
|
path = self.custompaths[index]
|
||||||
path = path.replace("~", home)
|
path = path.replace("~", home)
|
||||||
if self.de == "mate":
|
command = ( "xdg-open \"" + path + "\"")
|
||||||
command = ( "caja \"" + path + "\"")
|
|
||||||
else:
|
|
||||||
command = ( "xdg-open \"" + path + "\"")
|
|
||||||
currentbutton = easyButton( "folder", self.iconsize, [self.customnames[index]], -1, -1 )
|
currentbutton = easyButton( "folder", self.iconsize, [self.customnames[index]], -1, -1 )
|
||||||
currentbutton.connect( "clicked", self.ButtonClicked, command )
|
currentbutton.connect( "clicked", self.ButtonClicked, command )
|
||||||
currentbutton.show()
|
currentbutton.show()
|
||||||
@ -249,10 +229,7 @@ class pluginclass( object ):
|
|||||||
|
|
||||||
def launch_gtk_bookmark (self, widget, path):
|
def launch_gtk_bookmark (self, widget, path):
|
||||||
self.mintMenuWin.hide()
|
self.mintMenuWin.hide()
|
||||||
if self.de == "mate":
|
os.system("xdg-open \"%s\" &" % path)
|
||||||
os.system("caja \"%s\" &" % path)
|
|
||||||
else:
|
|
||||||
os.system("xdg-open \"%s\" &" % path)
|
|
||||||
|
|
||||||
def trashPopup( self, widget, event ):
|
def trashPopup( self, widget, event ):
|
||||||
if event.button == 3:
|
if event.button == 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user