LEFT | RIGHT |
(no file at all) | |
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 Loading... |
180 void CPluginSettings::SetWorkingThreadId() | 180 void CPluginSettings::SetWorkingThreadId() |
181 { | 181 { |
182 m_dwWorkingThreadId = ::GetCurrentThreadId(); | 182 m_dwWorkingThreadId = ::GetCurrentThreadId(); |
183 } | 183 } |
184 | 184 |
185 void CPluginSettings::SetWorkingThreadId(DWORD id) | 185 void CPluginSettings::SetWorkingThreadId(DWORD id) |
186 { | 186 { |
187 m_dwWorkingThreadId = id; | 187 m_dwWorkingThreadId = id; |
188 } | 188 } |
189 | 189 |
190 void CPluginSettings::SetFirstRun() | |
191 { | |
192 m_isFirstRun = true; | |
193 } | |
194 | |
195 bool CPluginSettings::IsFirstRun() const | |
196 { | |
197 return m_isFirstRun; | |
198 } | |
199 | |
200 void CPluginSettings::TogglePluginEnabled() | 190 void CPluginSettings::TogglePluginEnabled() |
201 { | 191 { |
202 CPluginSettingsTabLock lock; | 192 CPluginSettingsTabLock lock; |
203 if (lock.IsLocked()) | 193 if (lock.IsLocked()) |
204 { | 194 { |
205 s_criticalSectionLocal.Lock(); | 195 s_criticalSectionLocal.Lock(); |
206 { | 196 { |
207 //TODO: Query if plugin is enabled from the AdblockPlusEngine | 197 //TODO: Query if plugin is enabled from the AdblockPlusEngine |
208 m_isPluginEnabledTab = m_isPluginEnabledTab ? false : true; | 198 m_isPluginEnabledTab = m_isPluginEnabledTab ? false : true; |
209 //TODO: Set plugin enabled/disabled in AdblockPlusEngine | 199 //TODO: Set plugin enabled/disabled in AdblockPlusEngine |
(...skipping 24 matching lines...) Expand all Loading... |
234 m_isPluginEnabledTab = true; | 224 m_isPluginEnabledTab = true; |
235 //TODO: Set plugin enabled in AdblockPlusEngine | 225 //TODO: Set plugin enabled in AdblockPlusEngine |
236 } | 226 } |
237 s_criticalSectionLocal.Unlock(); | 227 s_criticalSectionLocal.Unlock(); |
238 } | 228 } |
239 } | 229 } |
240 bool CPluginSettings::GetPluginEnabled() const | 230 bool CPluginSettings::GetPluginEnabled() const |
241 { | 231 { |
242 //TODO: Query AdblockPlusEngine | 232 //TODO: Query AdblockPlusEngine |
243 return m_isPluginEnabledTab; | 233 return m_isPluginEnabledTab; |
244 } | |
245 | |
246 bool CPluginSettings::GetStatusBarAsked() | |
247 { | |
248 return CPluginClient::GetInstance()->GetPref(L"statusbarasked", false); | |
249 } | |
250 | |
251 void CPluginSettings::SetStatusBarAsked() | |
252 { | |
253 CPluginClient::GetInstance()->SetPref(L"statusbarasked", true); | |
254 } | 234 } |
255 | 235 |
256 | 236 |
257 void CPluginSettings::AddError(const CString& error, const CString& errorCode) | 237 void CPluginSettings::AddError(const CString& error, const CString& errorCode) |
258 { | 238 { |
259 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode) | 239 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode) |
260 } | 240 } |
261 | 241 |
262 | 242 |
263 // ============================================================================ | 243 // ============================================================================ |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc
e()->GetListedSubscriptions(); | 360 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc
e()->GetListedSubscriptions(); |
381 if (subscriptions.size() > 0) | 361 if (subscriptions.size() > 0) |
382 return CString(subscriptions.front().url.c_str()); | 362 return CString(subscriptions.front().url.c_str()); |
383 else | 363 else |
384 return CString(L""); | 364 return CString(L""); |
385 } | 365 } |
386 | 366 |
387 | 367 |
388 | 368 |
389 #endif // SUPPORT_WHITELIST | 369 #endif // SUPPORT_WHITELIST |
LEFT | RIGHT |