* Adds a bunch of settings to the list. * @param settings List of settings. */
| 135 | * @param settings List of settings. |
| 136 | */ |
| 137 | void OptionsAdvancedState::addSettings(const std::vector<OptionInfo> &settings) |
| 138 | { |
| 139 | for (std::vector<OptionInfo>::const_iterator i = settings.begin(); i != settings.end(); ++i) |
| 140 | { |
| 141 | std::wstring name = tr(i->description()); |
| 142 | std::wstring value; |
| 143 | if (i->type() == OPTION_BOOL) |
| 144 | { |
| 145 | value = *i->asBool() ? tr("STR_YES") : tr("STR_NO"); |
| 146 | } |
| 147 | else if (i->type() == OPTION_INT) |
| 148 | { |
| 149 | std::wostringstream ss; |
| 150 | ss << *i->asInt(); |
| 151 | value = ss.str(); |
| 152 | } |
| 153 | _lstOptions->addRow(2, name.c_str(), value.c_str()); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Gets the currently selected setting. |
nothing calls this directly
no test coverage detected