Clean setup file, create launch script
- Setup file: 'entry_point' is used in stead of non-existent 'bin/hackertray' for scripts - hackertray package init file - does not check if it is called as a script (which should not happen) - main() code is now replaced in HackerNewsApp.run() - main() instantiates the app and calls run() on it (previous roles grouped)
This commit is contained in:
parent
3614d1f597
commit
73aa49812e
|
@ -65,6 +65,10 @@ class HackerNewsApp:
|
|||
file.write(json.dumps(l))
|
||||
gtk.main_quit()
|
||||
|
||||
def run(self):
|
||||
gtk.main()
|
||||
return 0
|
||||
|
||||
'''Opens the link in the web browser'''
|
||||
def open(self, widget, event=None, data=None):
|
||||
#We disconnect and reconnect the event in case we have
|
||||
|
@ -107,9 +111,5 @@ def getHomePage():
|
|||
return r.json()
|
||||
|
||||
def main():
|
||||
gtk.main()
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
indicator = HackerNewsApp()
|
||||
main()
|
||||
indicator.run()
|
||||
|
|
Loading…
Reference in New Issue