From 09482c46c4dbb45ade526e4cb7fecdde15d530d6 Mon Sep 17 00:00:00 2001 From: Vikas Date: Sun, 1 Dec 2013 02:58:02 +0530 Subject: [PATCH] Link to the Hacker News Website --- hackertray/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hackertray/__init__.py b/hackertray/__init__.py index 78f92b5..8f91014 100644 --- a/hackertray/__init__.py +++ b/hackertray/__init__.py @@ -41,6 +41,13 @@ class HackerNewsApp: menuSeparator = gtk.SeparatorMenuItem() menuSeparator.show() self.menu.append(menuSeparator) + + #open hacker news + btnHnLink = gtk.MenuItem("Hacker News") + btnHnLink.show() + btnHnLink.connect("activate", self.showHnLink) + self.menu.append(btnHnLink) + btnAbout = gtk.MenuItem("About") btnAbout.show() @@ -66,6 +73,9 @@ class HackerNewsApp: def showAbout(self, widget): webbrowser.open("https://github.com/captn3m0/hackertray/") + def showHnLink(self, widget): + webbrowser.open("https://news.ycombinator.com/") + ''' Handler for the quit button''' #ToDo: Handle keyboard interrupt properly def quit(self, widget, data=None):