Browse Source

desktop files that specify an absolute path to an icon will use

that path, rather than stripping the path and trying to find a
matching icon. This allows for applications that use an icon in a
non-standard directory.
pull/1/merge
Jeff Woods 12 years ago
parent
commit
bad018f59a
  1. 6
      src/xdgmenumaker

6
src/xdgmenumaker

@ -108,6 +108,12 @@ class MenuEntry:
return repr((self.category, self.name, self.icon, self.command))
def icon_full_path(icon):
# If the icon path is absolute and exists, leave it alone.
# This takes care of software that has its own icons stored
# in non-standard directories
if os.path.exists(icon) == True:
return icon
else:
icon = os.path.basename(icon)
if icon.endswith('.png'):
icon = icon.replace('.png', '')

Loading…
Cancel
Save