Skip to content

Instantly share code, notes, and snippets.

@anaselli
Created June 26, 2019 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anaselli/b71da5ec2376efb5999f2e3d16b2e676 to your computer and use it in GitHub Desktop.
Save anaselli/b71da5ec2376efb5999f2e3d16b2e676 to your computer and use it in GitHub Desktop.
Patch to overrideicon theme if option is passed to command line
diff --git a/dnfdragora/updater.py b/dnfdragora/updater.py
index 8e2ba89..ed67074 100644
--- a/dnfdragora/updater.py
+++ b/dnfdragora/updater.py
@@ -57,7 +57,8 @@ class Updater:
else:
icon_path = icon_path + '/dnfdragora.png'
- theme_icon_pathname = self.__get_theme_icon_pathname() or icon_path
+ theme_icon_pathname = icon_path if 'icon-path' in options.keys() else self.__get_theme_icon_pathname() or icon_path
+
print("Icon: %s"%(theme_icon_pathname))
#empty icon as last chance
self.__icon = Image.Image()
@@ -92,7 +93,7 @@ class Updater:
print ("Error: module xdg.IconTheme is missing")
return None
else:
- pathname = xdg.IconTheme.getIconPath("dnfdragora", 128)
+ pathname = xdg.IconTheme.getIconPath("dnfdragora", 256)
return pathname
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment