From e4a18237887b11b94d2443fb68b0071c7557b2a1 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 24 May 2010 15:23:39 -0400 Subject: [PATCH] Added system tray icon... it'll do for now, even though it doesn't do anything yet --- README.markdown | 5 +++++ hrafn.py | 6 +++++- default.glade => ui/default.glade | 0 ui/icon.svg | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) rename default.glade => ui/default.glade (100%) create mode 100644 ui/icon.svg diff --git a/README.markdown b/README.markdown index d7cd8b3..443805b 100644 --- a/README.markdown +++ b/README.markdown @@ -32,3 +32,8 @@ To search for a user, prepend the search with 'user: '. After the first run, the program will write a file called ~/.hrafn.conf, with default configuration. Feel free to edit this file if needed. If things get really mucked up, deleting ~/.hrafn.db will reset the application to a pristine state. You will have to re-authenticate, though. + + +### Notes + +The system tray icon is Public Domain from: http://commons.wikimedia.org/wiki/File:Capi_x_Raven.svg diff --git a/hrafn.py b/hrafn.py index fc6110e..24c9343 100755 --- a/hrafn.py +++ b/hrafn.py @@ -48,7 +48,7 @@ class Hrafn(): # Init the glade stuff here, so we don't have a race condition with # the lists-ready signal - self.init_user_interface('./default.glade') + self.init_user_interface('./ui/default.glade') self.first_account_item = None # And init the DB stuff here @@ -126,6 +126,10 @@ class Hrafn(): self.help_menu.append(menu_item) menu_item.show() + # Add a system tray icon + self.tray_icon = gtk.status_icon_new_from_file('ui/icon.svg') + + # Set the account label self.update_account_label() diff --git a/default.glade b/ui/default.glade similarity index 100% rename from default.glade rename to ui/default.glade diff --git a/ui/icon.svg b/ui/icon.svg new file mode 100644 index 0000000..38d659d --- /dev/null +++ b/ui/icon.svg @@ -0,0 +1,19 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + \ No newline at end of file