changed the os.system command to os.spawnlp. When using os.system, the context menu stays visible while the gnome-desktop-item-edit program is running. Looked a bit strange. This change is at the cost of the cleanup routine to delete idential .desktop files in the users directory.
This commit is contained in:
parent
8050294021
commit
c029e9ac6c
@ -748,14 +748,7 @@ class pluginclass( object ):
|
||||
data = open(widget.desktopFile).read()
|
||||
open(file_path, 'w').write(data)
|
||||
|
||||
os.system('gnome-desktop-item-edit ' + file_path)
|
||||
|
||||
if file_path != widget.desktopFile:
|
||||
if filecmp.cmp(widget.desktopFile, file_path):
|
||||
try:
|
||||
os.remove(file_path)
|
||||
except os.error:
|
||||
pass
|
||||
pid = os.spawnlp(os.P_NOWAIT, "/usr/bin/gnome-desktop-item-edit", "gnome-desktop-item-edit", file_path)
|
||||
|
||||
self.mintMenuWin.hide()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user