Flash in taskbar on new messages
This commit is contained in:
parent
c13be58b49
commit
903a12010f
3 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,7 @@ CHANGELOG
|
|||
* Quirk tester in quirk window - Kiooeht [evacipatedBox] (Idea: [alGore])
|
||||
* Show and support giving kick reasons - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
|
||||
* Make adding quirks into multi-page wizard - Kiooeht [evacipatedBox]
|
||||
* Flash the taskbar on new messages - Kiooeht [evacipatedBox]
|
||||
* Bug fixes
|
||||
* Logviewer updates - Kiooeht [evacipatedBox]
|
||||
* Memo scrollbar thing - Kiooeht [evacipatedBox]
|
||||
|
|
2
convo.py
2
convo.py
|
@ -605,6 +605,7 @@ class PesterConvo(QtGui.QFrame):
|
|||
# ok if it has a tabconvo parent, send that the notify.
|
||||
if self.parent():
|
||||
self.parent().notifyNewMessage(self.title())
|
||||
self.mainwindow.gainAttention.emit(self.parent())
|
||||
# if not change the window title and update system tray
|
||||
else:
|
||||
self.newmessage = True
|
||||
|
@ -612,6 +613,7 @@ class PesterConvo(QtGui.QFrame):
|
|||
def func():
|
||||
self.showChat()
|
||||
self.mainwindow.waitingMessages.addMessage(self.title(), func)
|
||||
self.mainwindow.gainAttention.emit(self)
|
||||
|
||||
def clearNewMessage(self):
|
||||
if self.parent():
|
||||
|
|
|
@ -2853,6 +2853,7 @@ class PesterWindow(MovingWindow):
|
|||
inviteOnlyChan = QtCore.pyqtSignal(QtCore.QString)
|
||||
closeSignal = QtCore.pyqtSignal()
|
||||
reconnectIRC = QtCore.pyqtSignal()
|
||||
gainAttention = QtCore.pyqtSignal(QtGui.QWidget)
|
||||
|
||||
class PesterTray(QtGui.QSystemTrayIcon):
|
||||
def __init__(self, icon, mainwindow, parent):
|
||||
|
@ -2935,6 +2936,9 @@ class MainProgram(QtCore.QObject):
|
|||
self.irc = PesterIRC(self.widget.config, self.widget)
|
||||
self.connectWidgets(self.irc, self.widget)
|
||||
|
||||
self.connect(self.widget, QtCore.SIGNAL('gainAttention(QWidget*)'),
|
||||
self, QtCore.SLOT('alertWindow(QWidget*)'))
|
||||
|
||||
# 0 Once a day
|
||||
# 1 Once a week
|
||||
# 2 Only on start
|
||||
|
@ -2974,6 +2978,10 @@ class MainProgram(QtCore.QObject):
|
|||
return
|
||||
QtCore.QTimer.singleShot(1000*seconds, self, QtCore.SLOT('runUpdateSlot()'))
|
||||
|
||||
@QtCore.pyqtSlot(QtGui.QWidget)
|
||||
def alertWindow(self, widget):
|
||||
self.app.alert(widget)
|
||||
|
||||
widget2irc = [('sendMessage(QString, QString)',
|
||||
'sendMessage(QString, QString)'),
|
||||
('sendNotice(QString, QString)',
|
||||
|
|
Loading…
Reference in a new issue