Browse Source

Add svg icon support for icewm

Well... apparently IceWM has had support for svg icons since 2017 and I
had totally missed that. Thanks to SteelT1 for reporting this.

Fixes #29.
pull/30/head
George Vlahavas 2 months ago
parent
commit
b9011504a5
  1. 8
      src/xdgmenumaker

8
src/xdgmenumaker

@ -295,8 +295,8 @@ def icon_full_path(icon):
ext = os.path.splitext(icon)[1].lower() ext = os.path.splitext(icon)[1].lower()
if os.path.exists(icon): if os.path.exists(icon):
if ext == ".svg" or ext == ".svgz": if ext == ".svg" or ext == ".svgz":
# only jwm supports svg icons # only jwm and icewm support svg icons
if desktop == "jwm" and not nosvg: if (desktop == "jwm" or desktop == "icewm") and not nosvg:
return icon return icon
else: else:
# icon is not svg # icon is not svg
@ -308,8 +308,8 @@ def icon_full_path(icon):
icon = icon_strip(icon) icon = icon_strip(icon)
icon_theme = gtk.icon_theme_get_default() icon_theme = gtk.icon_theme_get_default()
try: try:
# JWM supports svg icons # JWM and IceWM support svg icons
if desktop == "jwm" and not nosvg: if (desktop == "jwm" or desktop == "icewm") and not nosvg:
icon = icon_theme.lookup_icon(icon, iconsize, gtk.ICON_LOOKUP_FORCE_SVG) icon = icon_theme.lookup_icon(icon, iconsize, gtk.ICON_LOOKUP_FORCE_SVG)
# but none of the other WMs does # but none of the other WMs does
else: else:

Loading…
Cancel
Save