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

Delta Between Two Patch Sets: src/plugin/PluginUserSettings.cpp

Issue 11043057: First run page triggering (Closed)
Left Patch Set: Injecting an object for localization Created July 20, 2013, 10:41 p.m.
Right Patch Set: Minor refactoring. Renaming and a small cleanup. Created July 26, 2013, 12:05 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginTabBase.cpp ('k') | src/plugin/PluginUtil.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 "../shared/Dictionary.h" 6 #include "../shared/Dictionary.h"
7 7
8 static const CString s_GetMessage = L"GetMessage"; 8 static const CString s_GetMessage = L"GetMessage";
9 static const CString s_GetLanguageCount = L"GetLanguageCount"; 9 static const CString s_GetLanguageCount = L"GetLanguageCount";
10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex"; 10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex";
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 static CString sGetLanguage() 93 static CString sGetLanguage()
94 { 94 {
95 CPluginSettings* settings = CPluginSettings::GetInstance(); 95 CPluginSettings* settings = CPluginSettings::GetInstance();
96 return settings->GetSubscription(); 96 return settings->GetSubscription();
97 } 97 }
98 98
99 99
100 CStringW sGetMessage(const CString& section, const CString& key) 100 CStringW sGetMessage(const CString& section, const CString& key)
101 { 101 {
102 Dictionary* dictionary = Dictionary::GetInstance(); 102 Dictionary* dictionary = Dictionary::GetInstance();
103 return CString(dictionary->Lookup(std::string(CW2A(section)), std::string(CW2A (key))).c_str()); 103 return CStringW(dictionary->Lookup(std::string(CW2A(section)), std::string(CW2 A(key))).c_str());
Wladimir Palant 2013/07/22 06:11:44 Since you didn't address that comment in http://co
104 } 104 }
105 105
106 std::wstring sGetMessage(const std::string& section, const std::string& key) 106 std::wstring sGetMessage(const std::string& section, const std::string& key)
107 { 107 {
108 Dictionary* dictionary = Dictionary::GetInstance(); 108 Dictionary* dictionary = Dictionary::GetInstance();
109 return dictionary->Lookup(section, key); 109 return dictionary->Lookup(section, key);
110 } 110 }
111 111
112 112
113 STDMETHODIMP CPluginUserSettings::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispparams, VARIANT* pVarResult, 113 STDMETHODIMP CPluginUserSettings::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispparams, VARIANT* pVarResult,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 { 304 {
305 settings->RemoveWhiteListedDomain((BSTR)domain); 305 settings->RemoveWhiteListedDomain((BSTR)domain);
306 } 306 }
307 } 307 }
308 else 308 else
309 return DISP_E_MEMBERNOTFOUND; 309 return DISP_E_MEMBERNOTFOUND;
310 310
311 return S_OK; 311 return S_OK;
312 } 312 }
313 313
LEFTRIGHT

Powered by Google App Engine
This is Rietveld