diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index b95a789570..ceef87f97b 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -311,9 +311,10 @@ Menu::Menu() { }); // Settings > Notifications > Tablet action = addCheckableActionToQMenuAndActionHash(notificationsMenu, "Tablet", 0, - settings->getValue("play_notification_sounds_type_5").toBool()); + settings->getValue(MenuOption::NotificationSoundsTablet).toBool()); connect(action, &QAction::triggered, [action, settings] { - settings->setValue("play_notification_sounds_type_5", action->isChecked()); + settings->setValue(MenuOption::NotificationSoundsTablet, action->isChecked()); + qDebug() << "vladest. tablet sound check up" << settings->getValue(MenuOption::NotificationSoundsTablet).toBool(); }); // Settings > Notifications > Wallet addActionToQMenuAndActionHash(notificationsMenu, "Wallet"); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index dc833be173..496368c30b 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -218,6 +218,7 @@ namespace MenuOption { const QString Shadows = "Shadows"; const QString AmbientOcclusion = "Ambient Occlusion"; const QString NotificationSoundsSnapshot = "play_notification_sounds_snapshot"; + const QString NotificationSoundsTablet = "play_notification_sounds_tablet"; } #endif // hifi_Menu_h diff --git a/libraries/ui/src/ui/TabletScriptingInterface.cpp b/libraries/ui/src/ui/TabletScriptingInterface.cpp index a079609bb7..89751b142e 100644 --- a/libraries/ui/src/ui/TabletScriptingInterface.cpp +++ b/libraries/ui/src/ui/TabletScriptingInterface.cpp @@ -441,7 +441,10 @@ void TabletProxy::emitWebEvent(const QVariant& msg) { void TabletProxy::onTabletShown() { if (_tabletShown) { - static_cast(parent())->playSound(TabletScriptingInterface::TabletOpen); + Setting::Handle notificationSoundTablet{ "play_notification_sounds_tablet", true}; + if (notificationSoundTablet.get()) { + static_cast(parent())->playSound(TabletScriptingInterface::TabletOpen); + } if (_showRunningScripts) { _showRunningScripts = false; pushOntoStack("hifi/dialogs/TabletRunningScripts.qml");