OLD | NEW |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void CPluginSettings::SetWorkingThreadId() | 181 void CPluginSettings::SetWorkingThreadId() |
182 { | 182 { |
183 m_dwWorkingThreadId = ::GetCurrentThreadId(); | 183 m_dwWorkingThreadId = ::GetCurrentThreadId(); |
184 } | 184 } |
185 | 185 |
186 void CPluginSettings::SetWorkingThreadId(DWORD id) | 186 void CPluginSettings::SetWorkingThreadId(DWORD id) |
187 { | 187 { |
188 m_dwWorkingThreadId = id; | 188 m_dwWorkingThreadId = id; |
189 } | 189 } |
190 | 190 |
191 void CPluginSettings::SetFirstRun() | |
192 { | |
193 m_isFirstRun = true; | |
194 } | |
195 | |
196 bool CPluginSettings::IsFirstRun() const | |
197 { | |
198 return m_isFirstRun; | |
199 } | |
200 | |
201 void CPluginSettings::TogglePluginEnabled() | 191 void CPluginSettings::TogglePluginEnabled() |
202 { | 192 { |
203 CPluginSettingsTabLock lock; | 193 CPluginSettingsTabLock lock; |
204 if (lock.IsLocked()) | 194 if (lock.IsLocked()) |
205 { | 195 { |
206 s_criticalSectionLocal.Lock(); | 196 s_criticalSectionLocal.Lock(); |
207 { | 197 { |
208 //TODO: Query if plugin is enabled from the AdblockPlusEngine | 198 //TODO: Query if plugin is enabled from the AdblockPlusEngine |
209 m_isPluginEnabledTab = m_isPluginEnabledTab ? false : true; | 199 m_isPluginEnabledTab = m_isPluginEnabledTab ? false : true; |
210 //TODO: Set plugin enabled/disabled in AdblockPlusEngine | 200 //TODO: Set plugin enabled/disabled in AdblockPlusEngine |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc
e()->GetListedSubscriptions(); | 372 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc
e()->GetListedSubscriptions(); |
383 if (subscriptions.size() > 0) | 373 if (subscriptions.size() > 0) |
384 return CString(subscriptions.front().url.c_str()); | 374 return CString(subscriptions.front().url.c_str()); |
385 else | 375 else |
386 return CString(L""); | 376 return CString(L""); |
387 } | 377 } |
388 | 378 |
389 | 379 |
390 | 380 |
391 #endif // SUPPORT_WHITELIST | 381 #endif // SUPPORT_WHITELIST |
OLD | NEW |