Added settings for the blinking icons

- private chat window/tab
- chat lobby tab
- all tray notifier

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5729 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-10-27 15:59:12 +00:00
parent 03e521c024
commit af2257b1a9
28 changed files with 217 additions and 29 deletions

View file

@ -49,9 +49,15 @@ bool MessageUserNotify::notifyCombined()
return (Settings->getTrayNotifyFlags() & TRAYNOTIFY_MESSAGES_COMBINED);
}
void MessageUserNotify::setNotifyEnabled(bool enabled, bool combined)
bool MessageUserNotify::notifyBlink()
{
return (Settings->getTrayNotifyBlinkFlags() & TRAYNOTIFY_BLINK_MESSAGES);
}
void MessageUserNotify::setNotifyEnabled(bool enabled, bool combined, bool blink)
{
uint notifyFlags = Settings->getTrayNotifyFlags();
uint blinkFlags = Settings->getTrayNotifyBlinkFlags();
if (enabled) {
notifyFlags |= TRAYNOTIFY_MESSAGES;
@ -65,7 +71,14 @@ void MessageUserNotify::setNotifyEnabled(bool enabled, bool combined)
notifyFlags &= ~TRAYNOTIFY_MESSAGES_COMBINED;
}
if (blink) {
blinkFlags |= TRAYNOTIFY_BLINK_MESSAGES;
} else {
blinkFlags &= ~TRAYNOTIFY_BLINK_MESSAGES;
}
Settings->setTrayNotifyFlags(notifyFlags);
Settings->setTrayNotifyBlinkFlags(blinkFlags);
}
QIcon MessageUserNotify::getIcon()

View file

@ -34,7 +34,8 @@ public:
virtual bool hasSetting(QString &name);
virtual bool notifyEnabled();
virtual bool notifyCombined();
virtual void setNotifyEnabled(bool enabled, bool combined);
virtual bool notifyBlink();
virtual void setNotifyEnabled(bool enabled, bool combined, bool blink);
private:
virtual QIcon getIcon();