Adds an about button. Fixes #3
This commit is contained in:
parent
cff96cb98b
commit
80a3b0d624
|
@ -40,6 +40,11 @@ class HackerNewsApp:
|
||||||
menuSeparator.show()
|
menuSeparator.show()
|
||||||
self.menu.append(menuSeparator)
|
self.menu.append(menuSeparator)
|
||||||
|
|
||||||
|
btnAbout = gtk.MenuItem("About")
|
||||||
|
btnAbout.show()
|
||||||
|
btnAbout.connect("activate", self.showAbout)
|
||||||
|
self.menu.append(btnAbout)
|
||||||
|
|
||||||
btnRefresh = gtk.MenuItem("Refresh")
|
btnRefresh = gtk.MenuItem("Refresh")
|
||||||
btnRefresh.show()
|
btnRefresh.show()
|
||||||
btnRefresh.connect("activate", self.refresh)
|
btnRefresh.connect("activate", self.refresh)
|
||||||
|
@ -55,6 +60,10 @@ class HackerNewsApp:
|
||||||
self.ind.set_menu(self.menu)
|
self.ind.set_menu(self.menu)
|
||||||
self.refresh()
|
self.refresh()
|
||||||
|
|
||||||
|
'''Handle the about btn'''
|
||||||
|
def showAbout(self, widget):
|
||||||
|
webbrowser.open("https://github.com/captn3m0/hackertray/")
|
||||||
|
|
||||||
''' Handler for the quit button'''
|
''' Handler for the quit button'''
|
||||||
#ToDo: Handle keyboard interrupt properly
|
#ToDo: Handle keyboard interrupt properly
|
||||||
def quit(self, widget, data=None):
|
def quit(self, widget, data=None):
|
||||||
|
|
Loading…
Reference in New Issue