diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn index 6099302..283e0e9 100644 --- a/CHANGELOG.mkdn +++ b/CHANGELOG.mkdn @@ -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] diff --git a/convo.py b/convo.py index 4e010d1..8fe6099 100644 --- a/convo.py +++ b/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(): diff --git a/pesterchum.py b/pesterchum.py index 598bbcc..913bc5d 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -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)',