mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 02:44:29 +02:00
Tablet opening notification sound settings added
This commit is contained in:
parent
c7ab1f3dbf
commit
ac413c8854
3 changed files with 8 additions and 3 deletions
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -441,7 +441,10 @@ void TabletProxy::emitWebEvent(const QVariant& msg) {
|
|||
|
||||
void TabletProxy::onTabletShown() {
|
||||
if (_tabletShown) {
|
||||
static_cast<TabletScriptingInterface*>(parent())->playSound(TabletScriptingInterface::TabletOpen);
|
||||
Setting::Handle<bool> notificationSoundTablet{ "play_notification_sounds_tablet", true};
|
||||
if (notificationSoundTablet.get()) {
|
||||
static_cast<TabletScriptingInterface*>(parent())->playSound(TabletScriptingInterface::TabletOpen);
|
||||
}
|
||||
if (_showRunningScripts) {
|
||||
_showRunningScripts = false;
|
||||
pushOntoStack("hifi/dialogs/TabletRunningScripts.qml");
|
||||
|
|
Loading…
Reference in a new issue