From fd84cdda4c7ff603e616f66e3a2365a06a12a289 Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 1 Jul 2013 12:28:55 +0200 Subject: [PATCH] Renamed to tray and added exit option --- gui/gui_classic.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gui/gui_classic.py b/gui/gui_classic.py index d2bc64464..5ea98a6ef 100644 --- a/gui/gui_classic.py +++ b/gui/gui_classic.py @@ -245,9 +245,14 @@ class ElectrumWindow(QMainWindow): self.current_account = self.config.get("current_account", None) self.icon = QIcon(os.getcwd() + '/icons/electrum.png') - self.notifier = QSystemTrayIcon(self.icon, self) - self.notifier.setToolTip('Electrum') - self.notifier.show() + self.tray = QSystemTrayIcon(self.icon, self) + self.tray.setToolTip('Electrum') + + m = QMenu() + m.addAction(_("Exit Electrum"), self.close) + self.tray.setContextMenu(m) + + self.tray.show() self.init_plugins() self.create_status_bar() @@ -447,7 +452,7 @@ class ElectrumWindow(QMainWindow): self.notify("New transaction received. %s BTC" % (self.format_amount(v))) def notify(self, message): - self.notifier.showMessage("Electrum", message, QSystemTrayIcon.Information, 20000) + self.tray.showMessage("Electrum", message, QSystemTrayIcon.Information, 20000) # plugins def init_plugins(self):