show 'Connected' notification when going from red to green status also #148

Merged
Atheros1 merged 1 commits from master into master 2013-05-14 18:04:21 +02:00
Showing only changes of commit 28a9d4741c - Show all commits

View File

@ -909,7 +909,7 @@ class MyForm(QtGui.QMainWindow):
shared.statusIconColor = 'red' shared.statusIconColor = 'red'
# if the connection is lost then show a notification # if the connection is lost then show a notification
if self.connected: if self.connected:
self.notifierShow('PyBitmessage','Connection lost') self.notifierShow('Bitmessage','Connection lost')
self.connected = False self.connected = False
if self.actionStatus != None: if self.actionStatus != None:
@ -923,7 +923,7 @@ class MyForm(QtGui.QMainWindow):
shared.statusIconColor = 'yellow' shared.statusIconColor = 'yellow'
# if a new connection has been established then show a notification # if a new connection has been established then show a notification
if not self.connected: if not self.connected:
self.notifierShow('PyBitmessage','Connected') self.notifierShow('Bitmessage','Connected')
self.connected = True self.connected = True
if self.actionStatus != None: if self.actionStatus != None:
@ -934,6 +934,8 @@ class MyForm(QtGui.QMainWindow):
self.statusBar().showMessage('') self.statusBar().showMessage('')
self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/greenicon.png")) self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/greenicon.png"))
shared.statusIconColor = 'green' shared.statusIconColor = 'green'
if not self.connected:
self.notifierShow('Bitmessage','Connected')
self.connected = True self.connected = True
if self.actionStatus != None: if self.actionStatus != None: