Skip to content

Commit

Permalink
cinnamon-desktop-editor.py: Check for item_path before modifying it.
Browse files Browse the repository at this point in the history
The 'nemo-launcher' mode of the desktop editor doesn't use an original
file location, only a destination.

Fixes #8275
  • Loading branch information
mtwebster committed Jan 9, 2019
1 parent dc58713 commit c42a03a
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -223,7 +223,8 @@ def pick_exec(self, button):
chooser.destroy()

def check_custom_path(self):
self.item_path = os.path.join(util.getUserItemPath(), os.path.split(self.item_path)[1])
if self.item_path:
self.item_path = os.path.join(util.getUserItemPath(), os.path.split(self.item_path)[1])

class DirectoryEditor(ItemEditor):
ui_file = '/usr/share/cinnamon/cinnamon-desktop-editor/directory-editor.ui'
Expand Down

1 comment on commit c42a03a

@SaintDanbert
Copy link

@SaintDanbert SaintDanbert commented on c42a03a Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have Linux Mint 19.1 Cinnamon DE installed in early January 2019. My copy of cinnamon-desktop-editor.py contains
def check_custom_path(self): raise NotImplementedError()
Because I cannot add launchers to my Cinnamon desktop, I have altered it to contain as suggested.
def check_custom_path(self): #??? Bug fix #8275 near 19-Feb-2019 #??? raise NotImplementedError() #??? Rev by D.St.A--19-FEB-2019 if self.item_path: self.item_path = os.path.join(util.getUsserItemPath(), os.path.split(self.item_path)[1])
I remain unable to add a launcher to the desktop using right-click.

Please sign in to comment.