1. Arne Babenhauserheide
  2. pyrad

Commits

Arne Babenhauserheide  committed 42e887d

FIX: partly not working image access.

  • Participants
  • Parent commits d0632ad
  • Branches default

Comments (0)

Files changed (2)

File Changelog.txt

View file
  • Ignore whitespace
 pyRad Changelog
 ===============
 
+pyRad 0.5.2
+
+- FIX: non-working image access in eggs.
+
 pyRad 0.5.1
 
 - Added missing image to the source distribution.

File rad.py

View file
  • Ignore whitespace
 # and parsing a command string into words for Popen
 from shlex import split as split_action
 # Finally some path tools for loading a config file
-from os.path import join, isfile
+from os.path import join, isfile, dirname
 
 # and system independent home folder location
 from user import home
         loader = KIconLoader()
         flattr_pix = loader.loadIcon(join(sys.prefix, "share", "pyrad", "Wikimedia_Flattr_Button.png"), 0)
         if flattr_pix.isNull():
-            flattr_pix = loader.loadIcon(join("images", "Wikimedia_Flattr_Button.png"), 0)
+            flattr_pix = loader.loadIcon(join(dirname(__file__), "images", "Wikimedia_Flattr_Button.png"), 0)
+        if flattr_pix.isNull():
+            flattr_pix = loader.loadIcon(join(dirname(__file__), "share", "pyrad", "Wikimedia_Flattr_Button.png"), 0)
         ic = QIcon(flattr_pix) # for a QPushButten
         self.flattr_icon = QPushButton()
         self.flattr_icon.setIcon(ic)