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

Unified Diff: src/plugin/PluginUserSettings.cpp

Issue 11043057: First run page triggering (Closed)
Patch Set: All changes Created July 25, 2013, 2:02 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
Index: src/plugin/PluginUserSettings.cpp
===================================================================
--- a/src/plugin/PluginUserSettings.cpp
+++ b/src/plugin/PluginUserSettings.cpp
@@ -97,16 +97,16 @@
}
-CStringW sGetMessage(const CString& key)
+CStringW sGetMessage(const CString& section, const CString& key)
{
Dictionary* dictionary = Dictionary::GetInstance();
- return CString(dictionary->Lookup("settings", std::string(CW2A(key))).c_str());
+ return CStringW(dictionary->Lookup(std::string(CW2A(section)), std::string(CW2A(key))).c_str());
}
-std::wstring sGetMessage(const std::string& key)
+std::wstring sGetMessage(const std::string& section, const std::string& key)
{
Dictionary* dictionary = Dictionary::GetInstance();
- return dictionary->Lookup("settings", key);
+ return dictionary->Lookup(section, key);
}
@@ -131,7 +131,7 @@
if (s_GetMessage == method)
{
- if (1 != pDispparams->cArgs)
+ if (2 != pDispparams->cArgs)
return DISP_E_BADPARAMCOUNT;
if (VT_BSTR != pDispparams->rgvarg[0].vt)
@@ -140,7 +140,8 @@
if (pVarResult)
{
CComBSTR key = pDispparams->rgvarg[0].bstrVal;
- CStringW message = sGetMessage((BSTR)key);
+ CComBSTR section = pDispparams->rgvarg[1].bstrVal;
+ CStringW message = sGetMessage((BSTR)section, (BSTR)key);
pVarResult->vt = VT_BSTR;
pVarResult->bstrVal = SysAllocString(message);

Powered by Google App Engine
This is Rietveld