GNOME Bugzilla – Bug 706807
Do not leave behind stale .desktop files
Last modified: 2013-08-26 16:00:29 UTC
see patch
Created attachment 253142 [details] [review] Do not leave behind stale .desktop files If the user clicked on Cancel in the Editor dialog, we should remove the .desktop file we just copied to ~/.local/share/applications.
Review of attachment 253142 [details] [review]: ::: Alacarte/MainWindow.py @@ +307,2 @@ if not os.path.isfile(file_path): + self.file_path = file_path Can you not save this to self, but instead make it part of the user_data that you connect to? 'self.file_path' isn't very descriptive, when it actually means 'the file path of a temporary file that we should remove if unmodified if the actual file does not exist'
Created attachment 253148 [details] [review] Do not leave behind stale .desktop files If the user clicked on Cancel in the Editor dialog, we should remove the .desktop file we just copied to ~/.local/share/applications.
Review of attachment 253148 [details] [review]: minor Python nit, otherwise looks good ::: Alacarte/MainWindow.py @@ +314,3 @@ + def on_editor_response(self, editor, modified, file_path): + if not modified and file_path != None: file_path is not None
Attachment 253148 [details] pushed as fab91e9 - Do not leave behind stale .desktop files