Add configuration option to send desktop notification on buddy presence (#3886)

This commit is contained in:
Phillip Wheatley 2020-03-17 01:49:11 +00:00 committed by GitHub
parent 63b4f9b2f0
commit 91dc8b3b08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 83 additions and 15 deletions

View file

@ -227,6 +227,7 @@ SettingsCache::SettingsCache()
tokenDialogGeometry = settings->value("interface/token_dialog_geometry").toByteArray();
notificationsEnabled = settings->value("interface/notificationsenabled", true).toBool();
spectatorNotificationsEnabled = settings->value("interface/specnotificationsenabled", false).toBool();
buddyConnectNotificationsEnabled = settings->value("interface/buddyconnectnotificationsenabled", true).toBool();
doubleClickToPlay = settings->value("interface/doubleclicktoplay", true).toBool();
playToStack = settings->value("interface/playtostack", true).toBool();
startingHandSize = settings->value("interface/startinghandsize", 7).toInt();
@ -438,6 +439,12 @@ void SettingsCache::setSpectatorNotificationsEnabled(int _spectatorNotifications
settings->setValue("interface/specnotificationsenabled", spectatorNotificationsEnabled);
}
void SettingsCache::setBuddyConnectNotificationsEnabled(int _buddyConnectNotificationsEnabled)
{
buddyConnectNotificationsEnabled = static_cast<bool>(_buddyConnectNotificationsEnabled);
settings->setValue("interface/buddyconnectnotificationsenabled", buddyConnectNotificationsEnabled);
}
void SettingsCache::setDoubleClickToPlay(int _doubleClickToPlay)
{
doubleClickToPlay = static_cast<bool>(_doubleClickToPlay);