Anonymous avatar Anonymous committed 42e887d

FIX: partly not working image access.

Comments (0)

Files changed (2)

 pyRad Changelog
 ===============
 
+pyRad 0.5.2
+
+- FIX: non-working image access in eggs.
+
 pyRad 0.5.1
 
 - Added missing image to the source distribution.
 # 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.