Do not alert the application for game events when spectating.

Add a configuration toggle to enable alerts when spectating.

Default behavior is to not alert.
This commit is contained in:
Gavin Bises 2015-02-20 20:29:36 -05:00
parent 06e5327595
commit 11bd2444d8
4 changed files with 26 additions and 10 deletions

View file

@ -35,6 +35,7 @@ SettingsCache::SettingsCache()
mainWindowGeometry = settings->value("interface/main_window_geometry").toByteArray();
notificationsEnabled = settings->value("interface/notificationsenabled", true).toBool();
spectatorNotificationsEnabled = settings->value("interface/specnotificationsenabled", false).toBool();
doubleClickToPlay = settings->value("interface/doubleclicktoplay", true).toBool();
playToStack = settings->value("interface/playtostack", false).toBool();
cardInfoMinimized = settings->value("interface/cardinfominimized", 0).toInt();
@ -183,6 +184,11 @@ void SettingsCache::setNotificationsEnabled(int _notificationsEnabled)
settings->setValue("interface/notificationsenabled", notificationsEnabled);
}
void SettingsCache::setSpectatorNotificationsEnabled(int _spectatorNotificationsEnabled) {
spectatorNotificationsEnabled = _spectatorNotificationsEnabled;
settings->setValue("interface/specnotificationsenabled", spectatorNotificationsEnabled);
}
void SettingsCache::setDoubleClickToPlay(int _doubleClickToPlay)
{
doubleClickToPlay = _doubleClickToPlay;