Checks how user wants us to encode characters in path. This applies to all plugins. @return Encode parameter.
| 348 | // @return Encode parameter. |
| 349 | // |
| 350 | StringUtils::EncodeParam Settings::GetEncodeParam() const |
| 351 | { |
| 352 | // Perform late-revising. |
| 353 | Revise(); |
| 354 | |
| 355 | std::wstring encodeParamStr; |
| 356 | if (PluginUtils::ReadRegistryStringValue(m_UserKey, SETTING_ENCODE_PARAM, encodeParamStr) != ERROR_SUCCESS) { |
| 357 | encodeParamStr = SETTING_ENCODE_PARAM_DEFAULT; |
| 358 | } |
| 359 | StringUtils::EncodeParam encodeParam = StringUtils::EncodeParam::None; |
| 360 | if (encodeParamStr == SETTING_ENCODE_PARAM_VALUE_WHITESPACE) { |
| 361 | encodeParam = StringUtils::EncodeParam::Whitespace; |
| 362 | } else if (encodeParamStr == SETTING_ENCODE_PARAM_VALUE_ALL) { |
| 363 | encodeParam = StringUtils::EncodeParam::All; |
| 364 | } else { |
| 365 | assert(encodeParamStr == SETTING_ENCODE_PARAM_VALUE_NONE); |
| 366 | } |
| 367 | return encodeParam; |
| 368 | } |
| 369 | |
| 370 | // |
| 371 | // Checks whether to append a separator at the end of paths |