- 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:
thunder2 2014-07-24 20:01:12 +00:00
parent d355e8dd88
commit 6792348402
19 changed files with 79 additions and 387 deletions

View file

@ -35,37 +35,14 @@ FeedReaderUserNotify::FeedReaderUserNotify(FeedReaderDialog *feedReaderDialog, R
connect(mNotify, SIGNAL(msgChanged(QString,QString,int)), this, SLOT(updateIcon()), Qt::QueuedConnection);
}
bool FeedReaderUserNotify::hasSetting(QString &name)
bool FeedReaderUserNotify::hasSetting(QString *name, QString *group)
{
name = tr("FeedReader Message");
if (name) *name = tr("FeedReader Message");
if (group) *group = "FeedReader";
return true;
}
bool FeedReaderUserNotify::notifyEnabled()
{
return Settings->valueFromGroup("FeedReader", "TrayNotifyEnable", true).toBool();
}
bool FeedReaderUserNotify::notifyCombined()
{
return Settings->valueFromGroup("FeedReader", "TrayNotifyCombined", false).toBool();
}
bool FeedReaderUserNotify::notifyBlink()
{
return Settings->valueFromGroup("FeedReader", "TrayNotifyBlink", false).toBool();
}
void FeedReaderUserNotify::setNotifyEnabled(bool enabled, bool combined, bool blink)
{
Settings->beginGroup("FeedReader");
Settings->setValue("TrayNotifyEnable", enabled);
Settings->setValue("TrayNotifyCombined", combined);
Settings->setValue("TrayNotifyBlink", blink);
Settings->endGroup();
}
QIcon FeedReaderUserNotify::getIcon()
{
return QIcon(":/images/Feed.png");