Added code to determine if the user truly modifed the .desktop file using gnome-desktop-item-edit. If they did not make any changes then the user's local copy is removed.

This commit is contained in:
Icius 2010-01-22 15:54:03 -05:00
parent 18a491a38c
commit 8392acfa8e

View File

@ -12,6 +12,7 @@ import gettext
import gnomevfs
import threading
import commands
import filecmp
from easybuttons import *
from execute import Execute
@ -748,8 +749,14 @@ class pluginclass( object ):
open(file_path, 'w').write(data)
os.system('gnome-desktop-item-edit ' + file_path)
self.mintMenuWin.hide()
if filecmp.cmp(widget.desktopFile, file_path):
try:
os.remove(file_path)
except os.error:
pass
self.mintMenuWin.hide()
def onUninstallApp( self, menu, widget ):
widget.uninstall()