void UniversalSwitchSettingsPage::createAdditionalSettingsGroup()
{
- std::string str;
genlist_->appendItem({"group_index", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS"});
- str = getValueUnitText(NULL,
+ auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.pause_on_first_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_ = genlist_->appendItem({"type1",
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST",
str,
[this](auto item) {
- 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);
context_.us_configuration.pause_on_first_state = item->getState();
auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.pause_on_first_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->setDescription(str);
item->update();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, item->getState()); },
pauseOnFirst_->setState(true);
auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.pause_on_first_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
pauseOnFirst_->update();
}
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_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_TAP_DURATION"));
+ 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"); },
[this](auto item) {
context_.us_configuration.tap_duration_state = item->getState();
auto str = getValueUnitText(NULL,
&context_.us_configuration.tap_duration_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.tap_duration_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->setDescription(str);
item->update();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, item->getState()); },
tapDuration_->setState(true);
auto str = getValueUnitText(NULL,
&context_.us_configuration.tap_duration_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.tap_duration_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
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_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SGL_IACTION_INT"));
+ 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"); },
[this](auto item) {
context_.us_configuration.sgl_iaction_int_state = item->getState();
auto str = getValueUnitText(NULL,
&context_.us_configuration.sgl_iaction_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.sgl_iaction_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->setDescription(str);
item->update();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, item->getState()); },
singleInteractionInterval_->setState(true);
auto str = getValueUnitText(NULL,
&context_.us_configuration.sgl_iaction_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.sgl_iaction_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
singleInteractionInterval_->setDescription(str);
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_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_TAP"));
+ 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"); },
[this](auto item) {
context_.us_configuration.auto_tap_state = item->getState();
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_tap_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
item->setDescription(str);
item->update();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, item->getState()); },
autoTap_->setState(true);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_tap_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
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_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_MOVE_INT"));
+ 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"); },
[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();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, item->getState()); },
autoMoveInterval_->setState(true);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_move_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
autoMoveInterval_->update();
}
void UniversalSwitchSettingsPage::createScanningGroup()
{
- std::string str;
genlist_->appendItem({"group_index", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING"});
auto item = genlist_->appendItem({"type1",
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, {});
+ auto str = getValueUnitText(NULL, &context_.us_configuration.auto_scan_interval, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", false, {});
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"));
+ 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_->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");
}});
"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_ = 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_->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");
}});
"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_ = 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_->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, "");
}});
}
}
-std::string UniversalSwitchSettingsPage::getValueUnitText(int *ivalue, double *dvalue, const std::string &units, bool def_trigger, const std::string &def)
+TranslatedString UniversalSwitchSettingsPage::getValueUnitText(int *ivalue, double *dvalue, const TranslatedString &units, bool def_trigger, const TranslatedString &def)
{
if (def_trigger)
return def;
}
if (!units.empty())
- ss << " " << units;
+ ss << " " << units.str();
return ss.str();
}
int switch_count = setting_accessibility_universal_switch_dbus_config_get_switch_count(&self->context_.config);
- self->switchesItem_->setDescription(
- getValueUnitText(&switch_count, NULL, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES"), false, {}));
+ self->switchesItem_->setDescription(getValueUnitText(&switch_count, NULL, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", false, {}));
self->switchesItem_->update();
}
std::string str = std::to_string(self->context_.us_configuration.feedback_sound_volume) + "%";
self->nestedSetValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::LIST_SWITCH, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND"));
+ ValueEditorType::LIST_SWITCH, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND");
self->nestedSetValuePage_->setSwitch(self->context_.us_configuration.feedback_sound_state);
- self->nestedSetValuePage_->setDescription(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_SOUND"));
+ self->nestedSetValuePage_->setDescription("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_SOUND");
self->nestedSetValuePage_->addSwitchChangedCb([self](auto state) { self->feedbackSoundSwitchChangedCb(state); });
- self->feedbackSoundVolume_ = self->nestedSetValuePage_->addRadioListItem(
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"), str.c_str(), 0);
+ self->feedbackSoundVolume_ = self->nestedSetValuePage_->addRadioListItem("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME", str.c_str(), 0);
self->nestedSetValuePage_->addListItemOptionsRequestCb([self](auto val) { self->feedbackSoundItemOptionsRequestCb(val); });
int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE,
SetValuePage::syncPageWithVconf,
void UniversalSwitchSettingsPage::feedbackSoundItemOptionsRequestCb(int option_id)
{
- setValuePage_ = std::make_unique<SetValuePage>(
- ValueEditorType::RADIOS, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"));
+ setValuePage_ = std::make_unique<SetValuePage>(ValueEditorType::RADIOS, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME");
setValuePage_->addRadioItemChangedCb([this](auto val) { this->feedbackSoundVolumeChangedCb(val); });
for (auto i = 0u; i < mediaLevel.size(); i++)
autoMoveInterval_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_move_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_move_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
autoMoveInterval_->update();
}
autoTap_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_tap_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
autoTap_->update();
}
context_.us_configuration.auto_tap_value = value;
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_tap_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_tap_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoTap_->setDescription(str);
autoTap_->update();
Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, value);
singleInteractionInterval_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.sgl_iaction_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.sgl_iaction_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
singleInteractionInterval_->setDescription(str);
singleInteractionInterval_->update();
}
{
context_.us_configuration.sgl_iaction_int_value = value;
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"));
+ 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();
}
tapDuration_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.tap_duration_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.tap_duration_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
tapDuration_->update();
}
auto str = getValueUnitText(NULL,
&context_.us_configuration.tap_duration_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.tap_duration_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
tapDuration_->setDescription(str);
tapDuration_->update();
}
pauseOnFirst_->setState(state);
auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.pause_on_first_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
pauseOnFirst_->update();
}
auto str = getValueUnitText(NULL,
&context_.us_configuration.pause_on_first_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.pause_on_first_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
pauseOnFirst_->setDescription(str);
pauseOnFirst_->update();
}
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, {}));
+ getValueUnitText(NULL, &value, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", false, {}));
autoScanInterval_->update();
}
auto str = getValueUnitText(NULL,
&context_.us_configuration.auto_move_int_value,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS",
!context_.us_configuration.auto_move_int_state,
- _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+ "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
autoMoveInterval_->setDescription(str);
autoMoveInterval_->update();
}