Adds an about button. Fixes #3

This commit is contained in:
Abhay Rana 2013-11-28 17:57:25 +05:30
parent cff96cb98b
commit 80a3b0d624
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,11 @@ class HackerNewsApp:
menuSeparator.show()
self.menu.append(menuSeparator)
btnAbout = gtk.MenuItem("About")
btnAbout.show()
btnAbout.connect("activate", self.showAbout)
self.menu.append(btnAbout)
btnRefresh = gtk.MenuItem("Refresh")
btnRefresh.show()
btnRefresh.connect("activate", self.refresh)
@ -55,6 +60,10 @@ class HackerNewsApp:
self.ind.set_menu(self.menu)
self.refresh()
'''Handle the about btn'''
def showAbout(self, widget):
webbrowser.open("https://github.com/captn3m0/hackertray/")
''' Handler for the quit button'''
#ToDo: Handle keyboard interrupt properly
def quit(self, widget, data=None):