From 35b65928f82442da44739bd70f80019a74b1204c Mon Sep 17 00:00:00 2001 From: Abhay Rana Date: Thu, 28 Nov 2013 17:57:25 +0530 Subject: [PATCH] Adds an about button. Fixes #3 --- hackertray/__init__.py | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hackertray/__init__.py b/hackertray/__init__.py index 117faa6..8fefebe 100644 --- a/hackertray/__init__.py +++ b/hackertray/__init__.py @@ -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): diff --git a/setup.py b/setup.py index 46c5b44..4412880 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='hackertray', - version='1.2', + version='1.3', description='Hacker News app that sits in your System Tray', long_description='HackerTray is a simple Hacker News Linux application that lets you view top HN stories in your System Tray. It relies on appindicator, so it is not guaranteed to work on all systems. It also provides a StatusIcon fallback but it has not been tested.', keywords='hacker news hn tray system tray icon hackertray',