Fix add to desktop
This commit is contained in:
parent
916ad7b731
commit
65fb842a81
2
debian/control
vendored
2
debian/control
vendored
@ -19,7 +19,7 @@ Depends:
|
|||||||
mate-menus,
|
mate-menus,
|
||||||
gvfs-bin,
|
gvfs-bin,
|
||||||
python-xlib,
|
python-xlib,
|
||||||
gir1.2-mate-panel, gir1.2-gtk-2.0,
|
gir1.2-mate-panel, gir1.2-gtk-2.0, gir1.2-mate-desktop
|
||||||
mozo
|
mozo
|
||||||
Description: Advanced MATE menu
|
Description: Advanced MATE menu
|
||||||
One of the most advanced menus under Linux. MintMenu supports filtering,
|
One of the most advanced menus under Linux. MintMenu supports filtering,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
from gi.repository import Gtk, Gdk, GLib
|
from gi.repository import Gtk, Gdk, GLib
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
|
from gi.repository import MateDesktop
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
import re
|
import re
|
||||||
@ -399,11 +400,11 @@ class ApplicationLauncher( easyButton ):
|
|||||||
shutil.copyfile( self.desktopFile, self.startupFilePath )
|
shutil.copyfile( self.desktopFile, self.startupFilePath )
|
||||||
|
|
||||||
# Remove %u, etc. from Exec entry, because MATE will not replace them when it starts the app
|
# Remove %u, etc. from Exec entry, because MATE will not replace them when it starts the app
|
||||||
item = matedesktop.item_new_from_uri( self.startupFilePath, matedesktop.LOAD_ONLY_IF_EXISTS )
|
item = MateDesktop.DesktopItem.new_from_uri(self.startupFilePath, MateDesktop.DesktopItemLoadFlags.ONLY_IF_EXISTS)
|
||||||
if item:
|
if item:
|
||||||
r = re.compile("%[A-Za-z]");
|
r = re.compile("%[A-Za-z]");
|
||||||
tmp = r.sub("", item.get_string( matedesktop.KEY_EXEC ) ).strip()
|
tmp = r.sub("", item.get_string( MateDesktop.DESKTOP_ITEM_EXEC ) ).strip()
|
||||||
item.set_string( matedesktop.KEY_EXEC, tmp )
|
item.set_string( MateDesktop.DESKTOP_ITEM_EXEC, tmp )
|
||||||
item.save( self.startupFilePath, 0 )
|
item.save( self.startupFilePath, 0 )
|
||||||
|
|
||||||
def removeFromStartup( self ):
|
def removeFromStartup( self ):
|
||||||
|
Loading…
Reference in New Issue
Block a user