From: allfro Date: Tue, 12 Mar 2013 17:47:45 +0000 (-0300) Subject: Fixed `imageicon` to work with Windows X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=bf2041551576861439b6be6438b5c0f65fcbf361;p=get-hack-src.git Fixed `imageicon` to work with Windows --- diff --git a/src/canari/resource.py b/src/canari/resource.py index 982ab01..1667e58 100644 --- a/src/canari/resource.py +++ b/src/canari/resource.py @@ -19,7 +19,10 @@ etc = 'canari.resources.etc' def imageicon(pkg, name): - return 'file://%s' % resource_filename(pkg, name) + name = resource_filename(pkg, name)) + if name[0] != '/': + return 'file:///%s' % name + return 'file://%s' % name def imagepath(pkg, name): @@ -45,4 +48,4 @@ def icon_resource(name, pkg=None): # etc -conf = resource_filename(etc, 'canari.conf') \ No newline at end of file +conf = resource_filename(etc, 'canari.conf')