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

Side by Side Diff: Shared/PluginUserSettings.cpp

Issue 9843129: Always use the system language for the UI (Closed)
Patch Set: Created March 22, 2013, 2:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« Shared/PluginClientBase.cpp ('K') | « Shared/PluginClientBase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 #include "PluginUserSettings.h" 2 #include "PluginUserSettings.h"
3 #include <algorithm> 3 #include <algorithm>
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #include "PluginClient.h" 5 #include "PluginClient.h"
6 #include "PluginIniFileW.h" 6 #include "PluginIniFileW.h"
7 #include "PluginDictionary.h" 7 #include "PluginDictionary.h"
8 8
9 static const CString s_GetMessage = L"GetMessage"; 9 static const CString s_GetMessage = L"GetMessage";
10 static const CString s_GetLanguageCount = L"GetLanguageCount"; 10 static const CString s_GetLanguageCount = L"GetLanguageCount";
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 { 248 {
249 if (1 != pDispparams->cArgs) 249 if (1 != pDispparams->cArgs)
250 return DISP_E_BADPARAMCOUNT; 250 return DISP_E_BADPARAMCOUNT;
251 251
252 if (VT_BSTR != pDispparams->rgvarg[0].vt) 252 if (VT_BSTR != pDispparams->rgvarg[0].vt)
253 return DISP_E_TYPEMISMATCH; 253 return DISP_E_TYPEMISMATCH;
254 254
255 CComBSTR language = pDispparams->rgvarg[0].bstrVal; 255 CComBSTR language = pDispparams->rgvarg[0].bstrVal;
256 256
257 settings->SetString(SETTING_LANGUAGE, (BSTR)language); 257 settings->SetString(SETTING_LANGUAGE, (BSTR)language);
258 CPluginDictionary* dict = CPluginDictionary::GetInstance();
259 dict->SetLanguage((BSTR)language);
260 settings->Write(); 258 settings->Write();
261
262 settings->CheckFilterAndDownload(); 259 settings->CheckFilterAndDownload();
263 } 260 }
264 else if (s_GetLanguage == method) 261 else if (s_GetLanguage == method)
265 { 262 {
266 if (pDispparams->cArgs) 263 if (pDispparams->cArgs)
267 return DISP_E_BADPARAMCOUNT; 264 return DISP_E_BADPARAMCOUNT;
268 265
269 if (pVarResult) 266 if (pVarResult)
270 { 267 {
271 CString language = settings->GetString(SETTING_LANGUAGE); 268 CString language = settings->GetString(SETTING_LANGUAGE);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 settings->AddWhiteListedDomain((BSTR)domain, 3, true); 324 settings->AddWhiteListedDomain((BSTR)domain, 3, true);
328 CPluginClient::GetInstance()->ClearWhiteListCache(); 325 CPluginClient::GetInstance()->ClearWhiteListCache();
329 } 326 }
330 } 327 }
331 else 328 else
332 return DISP_E_MEMBERNOTFOUND; 329 return DISP_E_MEMBERNOTFOUND;
333 330
334 return S_OK; 331 return S_OK;
335 } 332 }
336 333
OLDNEW
« Shared/PluginClientBase.cpp ('K') | « Shared/PluginClientBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld