#include "Button.hpp"
#include "CtxPopup.hpp"
#include "Singleton.hpp"
+#include "VConf.hpp"
#include "setting-accessibility.h"
#include "utils.hpp"
break;
}
- cursorColor_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL", str, [this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::RADIOS, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL"));
- setValuePage_->addRadioItemChangedCb([this](auto val) { this->cursorColorListItemChangedCb(val); });
+ cursorColor_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL",
+ str,
+ [this](auto item) {
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::RADIOS, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL"));
+ setValuePage_->addRadioItemChangedCb([this](auto val) {
+ this->cursorColorListItemChangedCb(val);
+ });
- for (auto i = 0u; i < CURSOR_COLORS_COUNT; i++)
- setValuePage_->addRadioItem(
- _cursor_color[i].key, i, _cursor_color[i].id == context_.us_configuration.cursor_color);
- }});
+ for (auto i = 0u; i < CURSOR_COLORS_COUNT; i++)
+ setValuePage_->addRadioItem(_cursor_color[i].key, i, _cursor_color[i].id == context_.us_configuration.cursor_color);
+ }});
- str = getBoleanText(context_.us_configuration.feedback_sound_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getBoleanText(context_.us_configuration.feedback_sound_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
feedbackSound_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND",
[this](auto item) {
context_.us_configuration.feedback_sound_state = item->getState();
- item->setDescription(context_.us_configuration.feedback_sound_state
- ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"
- : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
+ item->setDescription(context_.us_configuration.feedback_sound_state ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.feedback_sound_state)
feedbackSound_->setState(true);
- str = getBoleanText(context_.us_configuration.feedback_voice_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getBoleanText(context_.us_configuration.feedback_voice_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
feedbackVoice_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE",
[this](auto item) {
context_.us_configuration.feedback_voice_state = item->getState();
- item->setDescription(context_.us_configuration.feedback_voice_state
- ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"
- : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
+ item->setDescription(context_.us_configuration.feedback_voice_state ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
feedbackVoice_->setState(context_.us_configuration.feedback_voice_state);
}
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST",
str,
[this](auto item) {
- char str[512] = {
- 0,
- };
- auto ret = snprintf(str,
- sizeof(str),
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_PAUSE_ON_FIRST"),
- context_.us_configuration.auto_scan_interval,
- context_.us_configuration.auto_scan_interval + context_.us_configuration.pause_on_first_value);
+ char str[512] = {0,};
+ auto ret = snprintf(str, sizeof(str), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_PAUSE_ON_FIRST"), context_.us_configuration.auto_scan_interval, context_.us_configuration.auto_scan_interval + context_.us_configuration.pause_on_first_value);
if (ret > 511) {
ERROR("snprintf failed");
return;
}
- setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"));
setValuePage_->setSwitch(context_.us_configuration.pause_on_first_state);
- setValuePage_->addValueChangedCb([this](auto val) { this->pauseOnFirstValueChangedCb(val); });
- setValuePage_->addSwitchChangedCb([this](auto state) { this->pauseOnFirstSwitchChangedCb(state); });
+ setValuePage_->addValueChangedCb([this](auto val) {
+ this->pauseOnFirstValueChangedCb(val);
+ });
+ setValuePage_->addSwitchChangedCb([this](auto state) {
+ this->pauseOnFirstSwitchChangedCb(state);
+ });
setValuePage_->setDescription(str);
setValuePage_->setRange(RANGE_MIN_PAUSE_ON_FIRST, RANGE_MAX_PAUSE_ON_FIRST, STEP_PAUSE_ON_FIRST);
- setValuePage_->setValue(context_.us_configuration.pause_on_first_value, "seconds");
- },
+ setValuePage_->setValue(context_.us_configuration.pause_on_first_value, "seconds"); },
[this](auto item) {
context_.us_configuration.pause_on_first_state = item->getState();
auto str = getValueUnitText(NULL,
_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
item->setDescription(str);
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.pause_on_first_state) {
pauseOnFirst_->setState(true);
if (!context_.us_configuration.auto_scan)
pauseOnFirst_->disable();
- str = getValueUnitText(NULL,
- &context_.us_configuration.tap_duration_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.tap_duration_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getValueUnitText(NULL, &context_.us_configuration.tap_duration_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), !context_.us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
tapDuration_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION",
str,
[this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"));
setValuePage_->setSwitch(context_.us_configuration.tap_duration_state);
- setValuePage_->addValueChangedCb([this](auto val) { this->tapDurationValueChangedCb(val); });
- setValuePage_->addSwitchChangedCb([this](auto state) { this->tapDurationSwitchChangedCb(state); });
+ setValuePage_->addValueChangedCb([this](auto val) {
+ this->tapDurationValueChangedCb(val);
+ });
+ setValuePage_->addSwitchChangedCb([this](auto state) {
+ this->tapDurationSwitchChangedCb(state);
+ });
setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_TAP_DURATION"));
setValuePage_->setRange(RANGE_MIN_TAP_DURATION, RANGE_MAX_TAP_DURATION, STEP_TAP_DURATION);
- setValuePage_->setValue(context_.us_configuration.tap_duration_value, "seconds");
- },
+ setValuePage_->setValue(context_.us_configuration.tap_duration_value, "seconds"); },
[this](auto item) {
context_.us_configuration.tap_duration_state = item->getState();
auto str = getValueUnitText(NULL,
_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
item->setDescription(str);
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.tap_duration_state) {
tapDuration_->update();
}
- str = getValueUnitText(NULL,
- &context_.us_configuration.sgl_iaction_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.sgl_iaction_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getValueUnitText(NULL, &context_.us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), !context_.us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
singleInteractionInterval_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT",
str,
[this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"));
setValuePage_->setSwitch(context_.us_configuration.sgl_iaction_int_state);
- setValuePage_->addValueChangedCb([this](auto val) { this->sglInactionIntervalValueChangedCb(val); });
- setValuePage_->addSwitchChangedCb([this](auto state) { this->sglInactionIntervalSwitchChangedCb(state); });
+ setValuePage_->addValueChangedCb([this](auto val) {
+ this->sglInactionIntervalValueChangedCb(val);
+ });
+ setValuePage_->addSwitchChangedCb([this](auto state) {
+ this->sglInactionIntervalSwitchChangedCb(state);
+ });
setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SGL_IACTION_INT"));
setValuePage_->setRange(RANGE_MIN_SGL_IACTION_INT, RANGE_MAX_SGL_IACTION_INT, STEP_SGL_IACTION_INT);
- setValuePage_->setValue(context_.us_configuration.sgl_iaction_int_value, "seconds");
- },
+ setValuePage_->setValue(context_.us_configuration.sgl_iaction_int_value, "seconds"); },
[this](auto item) {
context_.us_configuration.sgl_iaction_int_state = item->getState();
auto str = getValueUnitText(NULL,
_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
item->setDescription(str);
item->update();
- vconf_set_bool(
- VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.sgl_iaction_int_state) {
singleInteractionInterval_->update();
}
- str = getValueUnitText(NULL,
- &context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.auto_tap_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getValueUnitText(NULL, &context_.us_configuration.auto_tap_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), !context_.us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
autoTap_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP",
str,
[this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP"));
setValuePage_->setSwitch(context_.us_configuration.auto_tap_state);
- setValuePage_->addSwitchChangedCb([this](auto val) { this->autoTapSwitchChangedCb(val); });
- setValuePage_->addValueChangedCb([this](auto val) { this->autoTapValueChangedCb(val); });
+ setValuePage_->addSwitchChangedCb([this](auto val) {
+ this->autoTapSwitchChangedCb(val);
+ });
+ setValuePage_->addValueChangedCb([this](auto val) {
+ this->autoTapValueChangedCb(val);
+ });
setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_TAP"));
setValuePage_->setRange(RANGE_MIN_AUTO_TAP, RANGE_MAX_AUTO_TAP, STEP_AUTO_TAP);
- setValuePage_->setValue(context_.us_configuration.auto_tap_value, "seconds");
- },
+ setValuePage_->setValue(context_.us_configuration.auto_tap_value, "seconds"); },
[this](auto item) {
context_.us_configuration.auto_tap_state = item->getState();
auto str = getValueUnitText(NULL,
_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
item->setDescription(str);
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.auto_tap_state) {
autoTap_->update();
}
- str = getValueUnitText(NULL,
- &context_.us_configuration.auto_move_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.auto_move_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ str = getValueUnitText(NULL, &context_.us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), !context_.us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
autoMoveInterval_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT",
str,
[this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT"));
setValuePage_->setSwitch(context_.us_configuration.auto_move_int_state);
- setValuePage_->addValueChangedCb([this](auto val) { this->autoMoveIntervalValueChangedCb(val); });
- setValuePage_->addSwitchChangedCb([this](auto state) { this->autoMoveIntervalSwitchChangedCb(state); });
+ setValuePage_->addValueChangedCb([this](auto val) {
+ this->autoMoveIntervalValueChangedCb(val);
+ });
+ setValuePage_->addSwitchChangedCb([this](auto state) {
+ this->autoMoveIntervalSwitchChangedCb(state);
+ });
setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_MOVE_INT"));
setValuePage_->setRange(RANGE_MIN_AUTO_MOVE_INT, RANGE_MAX_AUTO_MOVE_INT, STEP_AUTO_MOVE_INT);
- setValuePage_->setValue(context_.us_configuration.auto_move_int_value, "seconds");
- },
+ setValuePage_->setValue(context_.us_configuration.auto_move_int_value, "seconds"); },
[this](auto item) {
context_.us_configuration.auto_move_int_state = item->getState();
- auto str = getValueUnitText(NULL,
- &context_.us_configuration.auto_move_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.auto_move_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ auto str = getValueUnitText(NULL, &context_.us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ !context_.us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
item->setDescription(str);
item->update();
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, item->getState());
- },
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, item->getState()); },
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.auto_move_int_state) {
autoMoveInterval_->setState(true);
[this](auto item) {
auto state = item->getState();
context_.us_configuration.auto_tap_kbd_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_KBD_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_KBD_STATE, state);
},
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.auto_tap_kbd_state)
scansNum_->disable();
}
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_ENABLED, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_ENABLED, state);
},
GenlistItem::WidgetType::toggle});
if (context_.us_configuration.auto_scan)
item->setState(true);
- str = getValueUnitText(
- NULL, &context_.us_configuration.auto_scan_interval, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), false, NULL);
- autoScanInterval_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT", str, [this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT"));
- setValuePage_->addValueChangedCb([this](auto val) { this->autoScanIntervalChangedCb(val); });
- setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_SCAN_INT"));
- setValuePage_->setRange(RANGE_MIN_AUTO_SCAN_INTERVAL, RANGE_MAX_AUTO_SCAN_INTERVAL, STEP_AUTO_SCAN_INTERVAL);
- setValuePage_->setValue(context_.us_configuration.auto_scan_interval, "seconds");
- }});
+ str = getValueUnitText(NULL, &context_.us_configuration.auto_scan_interval, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), false, NULL);
+ autoScanInterval_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT",
+ str,
+ [this](auto item) {
+ setValuePage_ = std::make_unique<SetValuePage>(
+ ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT"));
+ setValuePage_->addValueChangedCb([this](auto val) { this->autoScanIntervalChangedCb(val); });
+ setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_SCAN_INT"));
+ setValuePage_->setRange(RANGE_MIN_AUTO_SCAN_INTERVAL, RANGE_MAX_AUTO_SCAN_INTERVAL, STEP_AUTO_SCAN_INTERVAL);
+ setValuePage_->setValue(context_.us_configuration.auto_scan_interval, "seconds");
+ }});
if (!context_.us_configuration.auto_scan)
autoScanInterval_->disable();
str = getValueUnitText(&context_.us_configuration.auto_scan_num, NULL, NULL, false, NULL);
- scansNum_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS", str, [this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS"));
- setValuePage_->addValueChangedCb([this](auto val) { this->scanNumberChangedCb(val); });
- setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_NUM_OF_SCANS"));
- setValuePage_->setRange(RANGE_MIN_SCANS_NUM, RANGE_MAX_SCANS_NUM, STEP_SCANS_NUM);
- setValuePage_->setValue(context_.us_configuration.auto_scan_num, "times");
- }});
+ scansNum_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS",
+ str,
+ [this](auto item) {
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS"));
+ setValuePage_->addValueChangedCb([this](auto val) { this->scanNumberChangedCb(val); });
+ setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_NUM_OF_SCANS"));
+ setValuePage_->setRange(RANGE_MIN_SCANS_NUM, RANGE_MAX_SCANS_NUM, STEP_SCANS_NUM);
+ setValuePage_->setValue(context_.us_configuration.auto_scan_num, "times");
+ }});
if (!context_.us_configuration.auto_scan)
scansNum_->disable();
str = getScanMethodText(context_.us_configuration.scan_method).str();
- scanMethod_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD", str, [this](auto item) {
- this->createScanMethodCtxPopup();
- }});
+ scanMethod_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD",
+ str,
+ [this](auto item) {
+ this->createScanMethodCtxPopup();
+ }});
str = getScanDirectionText(context_.us_configuration.scan_dir).str();
- scanDirection_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR", str, [this](auto item) {
- this->createScanDirectionCtxPopup();
- }});
+ scanDirection_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR",
+ str,
+ [this](auto item) {
+ this->createScanDirectionCtxPopup();
+ }});
str = getValueUnitText(&context_.us_configuration.scan_pt_speed, NULL, NULL, false, NULL);
- scanSpeed_ = genlist_->appendItem(
- {"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED", str, [this](auto item) {
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED"));
- setValuePage_->addValueChangedCb([this](auto val) { this->scanSpeedChangedCb(val); });
- setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SCAN_SPEED"));
- setValuePage_->setRange(RANGE_MIN_SCAN_SPEED, RANGE_MAX_SCAN_SPEED, STEP_SCAN_SPEED);
- setValuePage_->setValue(context_.us_configuration.scan_pt_speed, "");
- }});
+ scanSpeed_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED",
+ str,
+ [this](auto item) {
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::NUMERIC, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED"));
+ setValuePage_->addValueChangedCb([this](auto val) { this->scanSpeedChangedCb(val); });
+ setValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SCAN_SPEED"));
+ setValuePage_->setRange(RANGE_MIN_SCAN_SPEED, RANGE_MAX_SCAN_SPEED, STEP_SCAN_SPEED);
+ setValuePage_->setValue(context_.us_configuration.scan_pt_speed, "");
+ }});
}
void UniversalSwitchSettingsPage::createSwitchesGroup()
{
- switchesItem_ = genlist_->appendItem({"type1", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES", {}, [this](auto item) {
- switchesPage_ = std::make_unique<SwitchesPage>();
- switchesPage_->attachCallback(updateSwitchesCount, this);
- }});
+ switchesItem_ = genlist_->appendItem({"type1",
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES",
+ {},
+ [this](auto item) {
+ switchesPage_ = std::make_unique<SwitchesPage>();
+ switchesPage_->attachCallback(updateSwitchesCount, this);
+ }});
updateSwitchesCount(this);
}
return f_str;
}
-std::string UniversalSwitchSettingsPage::getValueUnitText(
- int *ivalue, double *dvalue, const char *units, bool def_trigger, const char *def)
+std::string UniversalSwitchSettingsPage::getValueUnitText(int *ivalue, double *dvalue, const char *units, bool def_trigger, const char *def)
{
if (def_trigger)
return def ? def : std::string{};
return value * 100;
}
-bool UniversalSwitchSettingsPage::updateVconfValue(const char *key, bool *bvalue, int *ivalue, double *dvalue)
-{
- int ret = VCONF_ERROR;
- RETURN_DEFAULT_IF(key == NULL, "Key input argument is nullptr");
- DEBUG("KEY: %s, %d, %d, %f", key, bvalue ? *bvalue : 0, ivalue ? *ivalue : 0, dvalue ? *dvalue : 0);
-
- if (bvalue) {
- bool b;
- getVconfValue(key, &b, NULL, NULL);
- RETURN_DEFAULT_IF(b == *bvalue, "Value already set");
- ret = vconf_set_bool(key, *bvalue);
- PRINT_ERROR_MESSAGE_IF(ret != VCONF_OK, "Failed to update %s value.", key);
- } else if (ivalue) {
- int i;
- getVconfValue(key, NULL, &i, NULL);
- RETURN_DEFAULT_IF(i == *ivalue, "Value already set");
- ret = vconf_set_int(key, *ivalue);
- PRINT_ERROR_MESSAGE_IF(ret != VCONF_OK, "Failed to update %s value.", key);
- } else if (dvalue) {
- double d;
- getVconfValue(key, NULL, NULL, &d);
- RETURN_DEFAULT_IF(d == *dvalue, "Value already set");
- ret = vconf_set_dbl(key, *dvalue);
- PRINT_ERROR_MESSAGE_IF(ret != VCONF_OK, "Failed to update %s value.", key);
- } else {
- PRINT_ERROR_MESSAGE_IF(ret != VCONF_OK, "One of the input arguments must not be NULL");
- }
-
- return (ret == VCONF_OK);
-}
-
bool UniversalSwitchSettingsPage::getVconfValue(const char *key, bool *bvalue, int *ivalue, double *dvalue)
{
int ret = VCONF_ERROR;
self->feedbackVoice_->setState(state);
self->feedbackVoice_->update();
self->context_.us_configuration.feedback_voice_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, state);
});
;
- int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE,
- SetValuePage::syncPageWithVconf,
- self->nestedSetValuePage_.get());
+ int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, SetValuePage::syncPageWithVconf, self->nestedSetValuePage_.get());
if (vconf_ret)
ERROR("FAIL: "
"vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE)");
context_.us_configuration.feedback_voice_speech_volume = _media_level[item_id].id;
double media_level = _media_level[item_id].id / 100.0;
- updateVconfValue(
- VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_VOLUME, NULL, NULL, &media_level);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_VOLUME, media_level);
feedbackVoiceSpeechVolume_->setDescription(_media_level[item_id].key ? _media_level[item_id].key : std::string{});
feedbackVoiceSpeechVolume_->update();
context_.us_configuration.feedback_voice_speech_rate = _media_level[item_id].id;
double media_level = _media_level[item_id].id / 100.0;
- updateVconfValue(
- VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_RATE, NULL, NULL, &media_level);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_RATE, media_level);
feedbackVoiceSpeechRate_->setDescription(_media_level[item_id].key ? _media_level[item_id].key : std::string{});
feedbackVoiceSpeechRate_->update();
context_.us_configuration.feedback_sound_volume = _media_level[item_id].id;
double media_level = _media_level[item_id].id / 100.0;
- updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_VOLUME, NULL, NULL, &media_level);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_VOLUME, media_level);
feedbackSoundVolume_->setDescription(_media_level[item_id].key ? _media_level[item_id].key : std::string{});
feedbackSoundVolume_->update();
void UniversalSwitchSettingsPage::feedbackSoundSwitchChangedCb(bool state)
{
context_.us_configuration.feedback_sound_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, state);
feedbackSound_->setState(state);
feedbackSound_->setDescription(state ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
feedbackSound_->update();
PRINT_ERROR_MESSAGE_IF(item_id < 0 || item_id >= CURSOR_COLORS_COUNT, "Invalid cursor color id");
context_.us_configuration.cursor_color = _cursor_color[item_id].id;
- updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_CURSOR_COLOR,
- NULL,
- &context_.us_configuration.cursor_color,
- NULL);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_CURSOR_COLOR, context_.us_configuration.cursor_color);
cursorColor_->setDescription(_cursor_color[item_id].key ? _cursor_color[item_id].key : std::string{});
cursorColor_->update();
void UniversalSwitchSettingsPage::autoMoveIntervalSwitchChangedCb(bool state)
{
context_.us_configuration.auto_move_int_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, state);
autoMoveInterval_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_move_int_value,
void UniversalSwitchSettingsPage::autoTapSwitchChangedCb(bool state)
{
context_.us_configuration.auto_tap_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, state);
autoTap_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
autoTap_->setDescription(str);
autoTap_->update();
- vconf_set_dbl(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, value);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, value);
}
void UniversalSwitchSettingsPage::sglInactionIntervalSwitchChangedCb(bool state)
{
context_.us_configuration.sgl_iaction_int_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, state);
singleInteractionInterval_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.sgl_iaction_int_value,
void UniversalSwitchSettingsPage::sglInactionIntervalValueChangedCb(double value)
{
context_.us_configuration.sgl_iaction_int_value = value;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE, value);
- auto str = getValueUnitText(NULL,
- &context_.us_configuration.sgl_iaction_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
- !context_.us_configuration.sgl_iaction_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE, value);
+ auto str = getValueUnitText(NULL, &context_.us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), !context_.us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
singleInteractionInterval_->setDescription(str);
singleInteractionInterval_->update();
}
void UniversalSwitchSettingsPage::tapDurationSwitchChangedCb(bool state)
{
context_.us_configuration.tap_duration_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, state);
tapDuration_->setState(state);
auto str = getValueUnitText(NULL,
void UniversalSwitchSettingsPage::tapDurationValueChangedCb(double value)
{
context_.us_configuration.tap_duration_value = value;
- vconf_set_dbl(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE, value);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE, value);
auto str = getValueUnitText(NULL,
&context_.us_configuration.tap_duration_value,
void UniversalSwitchSettingsPage::pauseOnFirstSwitchChangedCb(bool state)
{
context_.us_configuration.pause_on_first_state = state;
- vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, state);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, state);
pauseOnFirst_->setState(state);
auto str = getValueUnitText(NULL,
void UniversalSwitchSettingsPage::pauseOnFirstValueChangedCb(double value)
{
context_.us_configuration.pause_on_first_value = value;
- vconf_set_dbl(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_VALUE, value);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_VALUE, value);
auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
int int_value = (int)value;
context_.us_configuration.scan_pt_speed = (int)value;
- updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_PT_SPEED, NULL, &int_value, NULL);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_PT_SPEED, int_value);
scanSpeed_->setDescription(getValueUnitText(&int_value, NULL, NULL, false, NULL));
scanSpeed_->update();
void UniversalSwitchSettingsPage::scanDirectionCtxPopupItemClicked(ScanDirection scan_dir)
{
- vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL, static_cast<int>(scan_dir));
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL, static_cast<int>(scan_dir));
context_.us_configuration.scan_dir = scan_dir;
scanDirection_->setDescription(getScanDirectionText(scan_dir));
scanDirection_->update();
void UniversalSwitchSettingsPage::scanMethodCtxPopupItemClicked(ScanMethod scan_method)
{
- vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD, static_cast<int>(scan_method));
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD, static_cast<int>(scan_method));
context_.us_configuration.scan_method = scan_method;
scanMethod_->setDescription(getScanMethodText(scan_method));
scanMethod_->update();
int int_value = (int)value;
context_.us_configuration.auto_scan_num = (int)value;
- updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_NUM_OF_SCANS, NULL, &int_value, NULL);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_NUM_OF_SCANS, int_value);
scansNum_->setDescription(getValueUnitText(&int_value, NULL, NULL, false, NULL));
scansNum_->update();
void UniversalSwitchSettingsPage::autoScanIntervalChangedCb(double value)
{
context_.us_configuration.auto_scan_interval = value;
- updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_INT, NULL, NULL, &value);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_INT, value);
autoScanInterval_->setDescription(
getValueUnitText(NULL, &value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"), false, NULL));
void UniversalSwitchSettingsPage::autoMoveIntervalValueChangedCb(double value)
{
context_.us_configuration.auto_move_int_value = value;
- vconf_set_dbl(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE, value);
+ Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE, value);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_move_int_value,
for (auto i = 0u; i < utils::lenOf(_manage_options); ++i) {
auto it = genlist->appendItem({"multiline",
_manage_options[i].first,
- (i == UniversalSwitchConfiguration::MANAGE_OPTIONS_COUNT - 1)
- ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC"
- : "",
+ (i == UniversalSwitchConfiguration::MANAGE_OPTIONS_COUNT - 1) ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC" : "",
[=](auto item) {
auto state = item->getState();
context_.us_configuration.manage_options_state[i] = state;
- vconf_set_bool(_manage_options_key_array[i], state);
+ Singleton<VConfInterface>::instance().set(_manage_options_key_array[i], state);
},
GenlistItem::WidgetType::toggle});