Merge pull request #7 from brunal/statusicon
Closes #5 Closes #6 Thanks to @brunal
This commit is contained in:
commit
1949ca8db5
|
@ -65,6 +65,10 @@ class HackerNewsApp:
|
||||||
file.write(json.dumps(l))
|
file.write(json.dumps(l))
|
||||||
gtk.main_quit()
|
gtk.main_quit()
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
gtk.main()
|
||||||
|
return 0
|
||||||
|
|
||||||
'''Opens the link in the web browser'''
|
'''Opens the link in the web browser'''
|
||||||
def open(self, widget, event=None, data=None):
|
def open(self, widget, event=None, data=None):
|
||||||
#We disconnect and reconnect the event in case we have
|
#We disconnect and reconnect the event in case we have
|
||||||
|
@ -107,9 +111,5 @@ def getHomePage():
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
gtk.main()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
indicator = HackerNewsApp()
|
indicator = HackerNewsApp()
|
||||||
main()
|
indicator.run()
|
||||||
|
|
|
@ -25,8 +25,8 @@ STATUS_ATTENTION = 1
|
||||||
|
|
||||||
# Locations to search for the given icon
|
# Locations to search for the given icon
|
||||||
search_locations = [ os.path.join(os.path.dirname(sys.executable), "images"),
|
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(__file__), "images"),
|
||||||
os.path.join(os.path.dirname(sys.path[0]), "../images"),
|
os.path.join(os.path.dirname(__file__), "../images"),
|
||||||
'/usr/share/pixmaps' ]
|
'/usr/share/pixmaps' ]
|
||||||
|
|
||||||
def get_icon_filename(icon_name):
|
def get_icon_filename(icon_name):
|
||||||
|
|
8
setup.py
8
setup.py
|
@ -8,8 +8,12 @@ setup(name='hackertray',
|
||||||
author_email='me@captnemo.in',
|
author_email='me@captnemo.in',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
packages=['hackertray'],
|
packages=['hackertray'],
|
||||||
|
package_data={'hackertray': ['../images/hacker-tray.png']},
|
||||||
|
include_package_data=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'requests',
|
'requests',
|
||||||
],
|
],
|
||||||
scripts=['bin/hackertray'],
|
entry_points={
|
||||||
zip_safe=False)
|
'console_scripts': ['hackertray = hackertray:main'],
|
||||||
|
},
|
||||||
|
zip_safe=False)
|
||||||
|
|
Loading…
Reference in New Issue