Notification when minimizing Pesterchum to systray
This commit is contained in:
parent
e580fc4b11
commit
9e47811aea
2 changed files with 22 additions and 6 deletions
|
@ -18,10 +18,8 @@ Features
|
||||||
* Customizable name alerts
|
* Customizable name alerts
|
||||||
* When 'banned' make impossible to connect using timestamp banned under
|
* When 'banned' make impossible to connect using timestamp banned under
|
||||||
* Explain why a chumhandle is invalid
|
* Explain why a chumhandle is invalid
|
||||||
* Make some kind of notification when the program is 'closed' but is
|
* Notify on sign on/offs in chumroll (toasts)
|
||||||
still running in the system tray, like how MSN does it. ("MSN is still
|
* Resizable memo userlist
|
||||||
running in the system tray. Right click it to close it. Click here not
|
|
||||||
to show this message again.")
|
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
|
|
|
@ -526,6 +526,8 @@ class userConfig(object):
|
||||||
return self.config.get('nameSound', True)
|
return self.config.get('nameSound', True)
|
||||||
def volume(self):
|
def volume(self):
|
||||||
return self.config.get('volume', 100)
|
return self.config.get('volume', 100)
|
||||||
|
def trayMessage(self):
|
||||||
|
return self.config.get('traymsg', True)
|
||||||
def set(self, item, setting):
|
def set(self, item, setting):
|
||||||
self.config[item] = setting
|
self.config[item] = setting
|
||||||
try:
|
try:
|
||||||
|
@ -3070,12 +3072,16 @@ class MainProgram(QtCore.QObject):
|
||||||
QtCore.SLOT('changeTrayIcon(int)'))
|
QtCore.SLOT('changeTrayIcon(int)'))
|
||||||
self.trayicon.connect(self.widget,
|
self.trayicon.connect(self.widget,
|
||||||
QtCore.SIGNAL('closeToTraySignal()'),
|
QtCore.SIGNAL('closeToTraySignal()'),
|
||||||
self.trayicon,
|
self,
|
||||||
QtCore.SLOT('show()'))
|
QtCore.SLOT('trayiconShow()'))
|
||||||
self.trayicon.connect(self.widget,
|
self.trayicon.connect(self.widget,
|
||||||
QtCore.SIGNAL('closeSignal()'),
|
QtCore.SIGNAL('closeSignal()'),
|
||||||
self.trayicon,
|
self.trayicon,
|
||||||
QtCore.SLOT('mainWindowClosed()'))
|
QtCore.SLOT('mainWindowClosed()'))
|
||||||
|
self.connect(self.trayicon,
|
||||||
|
QtCore.SIGNAL('messageClicked()'),
|
||||||
|
self,
|
||||||
|
QtCore.SLOT('trayMessageClick()'))
|
||||||
|
|
||||||
self.attempts = 0
|
self.attempts = 0
|
||||||
|
|
||||||
|
@ -3128,6 +3134,18 @@ class MainProgram(QtCore.QObject):
|
||||||
def alertWindow(self, widget):
|
def alertWindow(self, widget):
|
||||||
self.app.alert(widget)
|
self.app.alert(widget)
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def trayiconShow(self):
|
||||||
|
self.trayicon.show()
|
||||||
|
if self.widget.config.trayMessage():
|
||||||
|
self.trayicon.showMessage("Pesterchum", "Pesterchum is still running in the system tray.\n\
|
||||||
|
Right click to close it.\n\
|
||||||
|
Click this message to never see this again.")
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def trayMessageClick(self):
|
||||||
|
self.widget.config.set('traymsg', False)
|
||||||
|
|
||||||
widget2irc = [('sendMessage(QString, QString)',
|
widget2irc = [('sendMessage(QString, QString)',
|
||||||
'sendMessage(QString, QString)'),
|
'sendMessage(QString, QString)'),
|
||||||
('sendNotice(QString, QString)',
|
('sendNotice(QString, QString)',
|
||||||
|
|
Loading…
Reference in a new issue