Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginSettings.cpp

Issue 4772743157383168: Issue #276 - eliminate CString from GetBrowserLanguage (Closed)
Patch Set: Created July 30, 2014, 8:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginSettings.h ('k') | src/plugin/PluginSystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -99,43 +99,17 @@
return hasInstance;
}
-
-
CString CPluginSettings::GetDataPath(const CString& filename)
{
std::wstring path = ::GetAppDataPath() + L"\\" + static_cast<LPCWSTR>(filename);
return CString(path.c_str());
}
-CString CPluginSettings::GetSystemLanguage()
-{
- CString language;
- CString country;
-
- DWORD bufSize = 256;
- int ccBuf = GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SISO639LANGNAME, language.GetBufferSetLength(bufSize), bufSize);
- ccBuf = GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SISO3166CTRYNAME, country.GetBufferSetLength(bufSize), bufSize);
-
- if ((country.IsEmpty()) || (language.IsEmpty()))
- {
- return CString();
- }
- CString lang;
- lang.Append(language);
- lang.Append(L"-");
- lang.Append(country);
-
- return lang;
-
-}
-
-
bool CPluginSettings::IsPluginEnabled() const
{
return GetPluginEnabled();
}
-
std::map<CString, CString> CPluginSettings::GetFilterLanguageTitleList() const
{
std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstance()->FetchAvailableSubscriptions();
@@ -316,7 +290,7 @@
CString CPluginSettings::GetAppLocale()
{
- return CPluginSystem::GetInstance()->GetBrowserLanguage();
+ return to_CString(GetBrowserLanguage());
}
CString CPluginSettings::GetDocumentationLink()
« no previous file with comments | « src/plugin/PluginSettings.h ('k') | src/plugin/PluginSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld