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