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.
This commit is contained in:
Bruno Cauet 2013-11-28 15:47:03 +01:00
parent 73aa49812e
commit a11f7c4507
2 changed files with 4 additions and 2 deletions

View File

@ -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):

View File

@ -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',
],