commit fd84cdda4c7ff603e616f66e3a2365a06a12a289
parent 13e5caf2ea5dc5aa54e7ce178dd266454989b271
Author: Maran <maran.hidskes@gmail.com>
Date: Mon, 1 Jul 2013 12:28:55 +0200
Renamed to tray and added exit option
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git 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):