mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
- Moved settings for user notify into the base class
- Removed defines TRAYNOTIFY_... git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7470 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d355e8dd88
commit
6792348402
19 changed files with 79 additions and 387 deletions
|
@ -20,7 +20,6 @@
|
|||
****************************************************************/
|
||||
|
||||
#include "GxsForumUserNotify.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/MainWindow.h"
|
||||
|
||||
GxsForumUserNotify::GxsForumUserNotify(RsGxsIfaceHelper *ifaceImpl, QObject *parent) :
|
||||
|
@ -28,55 +27,14 @@ GxsForumUserNotify::GxsForumUserNotify(RsGxsIfaceHelper *ifaceImpl, QObject *par
|
|||
{
|
||||
}
|
||||
|
||||
bool GxsForumUserNotify::hasSetting(QString &name)
|
||||
bool GxsForumUserNotify::hasSetting(QString *name, QString *group)
|
||||
{
|
||||
name = tr("Forum Post");
|
||||
if (name) *name = tr("Forum Post");
|
||||
if (group) *group = "Forum";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GxsForumUserNotify::notifyEnabled()
|
||||
{
|
||||
return (Settings->getTrayNotifyFlags() & TRAYNOTIFY_FORUMS);
|
||||
}
|
||||
|
||||
bool GxsForumUserNotify::notifyCombined()
|
||||
{
|
||||
return (Settings->getTrayNotifyFlags() & TRAYNOTIFY_FORUMS_COMBINED);
|
||||
}
|
||||
|
||||
bool GxsForumUserNotify::notifyBlink()
|
||||
{
|
||||
return (Settings->getTrayNotifyBlinkFlags() & TRAYNOTIFY_BLINK_FORUMS);
|
||||
}
|
||||
|
||||
void GxsForumUserNotify::setNotifyEnabled(bool enabled, bool combined, bool blink)
|
||||
{
|
||||
uint notifyFlags = Settings->getTrayNotifyFlags();
|
||||
uint blinkFlags = Settings->getTrayNotifyBlinkFlags();
|
||||
|
||||
if (enabled) {
|
||||
notifyFlags |= TRAYNOTIFY_FORUMS;
|
||||
} else {
|
||||
notifyFlags &= ~TRAYNOTIFY_FORUMS;
|
||||
}
|
||||
|
||||
if (combined) {
|
||||
notifyFlags |= TRAYNOTIFY_FORUMS_COMBINED;
|
||||
} else {
|
||||
notifyFlags &= ~TRAYNOTIFY_FORUMS_COMBINED;
|
||||
}
|
||||
|
||||
if (blink) {
|
||||
blinkFlags |= TRAYNOTIFY_BLINK_FORUMS;
|
||||
} else {
|
||||
blinkFlags &= ~TRAYNOTIFY_BLINK_FORUMS;
|
||||
}
|
||||
|
||||
Settings->setTrayNotifyFlags(notifyFlags);
|
||||
Settings->setTrayNotifyBlinkFlags(blinkFlags);
|
||||
}
|
||||
|
||||
QIcon GxsForumUserNotify::getIcon()
|
||||
{
|
||||
return QIcon(":/images/konversation16.png");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue