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

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

Issue 11369200: Disable everywhere fix (Closed)
Left Patch Set: Created Aug. 13, 2013, 2:18 p.m.
Right Patch Set: TogglePluginEnabled transfered to engine Created Aug. 20, 2013, 7:34 a.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/PluginSettings.h ('k') | src/shared/Communication.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 2
3 #include <Wbemidl.h> 3 #include <Wbemidl.h>
4 #include <time.h> 4 #include <time.h>
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 #include "PluginClient.h" 6 #include "PluginClient.h"
7 #include "PluginSystem.h" 7 #include "PluginSystem.h"
8 #ifdef SUPPORT_FILTER 8 #ifdef SUPPORT_FILTER
9 #include "PluginFilter.h" 9 #include "PluginFilter.h"
10 #endif 10 #endif
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 m_dwWorkingThreadId = ::GetCurrentThreadId(); 180 m_dwWorkingThreadId = ::GetCurrentThreadId();
181 } 181 }
182 182
183 void CPluginSettings::SetWorkingThreadId(DWORD id) 183 void CPluginSettings::SetWorkingThreadId(DWORD id)
184 { 184 {
185 m_dwWorkingThreadId = id; 185 m_dwWorkingThreadId = id;
186 } 186 }
187 187
188 void CPluginSettings::TogglePluginEnabled() 188 void CPluginSettings::TogglePluginEnabled()
189 { 189 {
190 GetPluginEnabled() ? SetPluginDisabled() : SetPluginEnabled(); 190 CPluginClient::GetInstance()->TogglePluginEnabled();
Wladimir Palant 2013/08/13 14:25:29 The SetPluginEnabled/SetPluginDisabled functions a
191 }
192 void CPluginSettings::SetPluginDisabled()
193 {
194 CPluginClient::GetInstance()->SetPref(L"enabled", false);
195 }
196 void CPluginSettings::SetPluginEnabled()
197 {
198 CPluginClient::GetInstance()->SetPref(L"enabled", true);
199 } 191 }
200 bool CPluginSettings::GetPluginEnabled() const 192 bool CPluginSettings::GetPluginEnabled() const
201 { 193 {
202 return CPluginClient::GetInstance()->GetPref(L"enabled", true); 194 return CPluginClient::GetInstance()->GetPref(L"enabled", true);
203 } 195 }
204 196
205 197
206 void CPluginSettings::AddError(const CString& error, const CString& errorCode) 198 void CPluginSettings::AddError(const CString& error, const CString& errorCode)
207 { 199 {
208 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode) 200 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 331 }
340 332
341 CString CPluginSettings::GetDocumentationLink() 333 CString CPluginSettings::GetDocumentationLink()
342 { 334 {
343 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); 335 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str());
344 } 336 }
345 337
346 338
347 339
348 #endif // SUPPORT_WHITELIST 340 #endif // SUPPORT_WHITELIST
LEFTRIGHT

Powered by Google App Engine
This is Rietveld