From a11f7c45073ae004fe4534cb5b8b709357f1049d Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Thu, 28 Nov 2013 15:47:03 +0100 Subject: [PATCH] image: correct declaration + usage - Declaration: setup.py declares the image a 'hackertray' data, gives its location and asks its inclusion - appindicator looks for the picture in folders near itself, instead of /usr/bin (near the main executable) or the first entry of path. --- hackertray/appindicator_replacement.py | 4 ++-- setup.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hackertray/appindicator_replacement.py b/hackertray/appindicator_replacement.py index 0a0ab72..1167c99 100644 --- a/hackertray/appindicator_replacement.py +++ b/hackertray/appindicator_replacement.py @@ -25,8 +25,8 @@ STATUS_ATTENTION = 1 # Locations to search for the given icon search_locations = [ os.path.join(os.path.dirname(sys.executable), "images"), - os.path.join(os.path.dirname(sys.path[0]), "images"), - os.path.join(os.path.dirname(sys.path[0]), "../images"), + os.path.join(os.path.dirname(__file__), "images"), + os.path.join(os.path.dirname(__file__), "../images"), '/usr/share/pixmaps' ] def get_icon_filename(icon_name): diff --git a/setup.py b/setup.py index 50413b0..2bbbcbf 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,8 @@ setup(name='hackertray', author_email='me@captnemo.in', license='MIT', packages=['hackertray'], + package_data={'hackertray': ['../images/hacker-tray.png']}, + include_package_data=True, install_requires=[ 'requests', ],