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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 CPluginSettings* CPluginSettings::GetInstance() | 87 CPluginSettings* CPluginSettings::GetInstance() |
88 { | 88 { |
89 CPluginSettings* instance = NULL; | 89 CPluginSettings* instance = NULL; |
90 | 90 |
91 s_criticalSectionLocal.Lock(); | 91 s_criticalSectionLocal.Lock(); |
92 { | 92 { |
93 if (!s_instance) | 93 if (!s_instance) |
94 { | 94 { |
95 s_instance = new CPluginSettings(); | 95 s_instance = new CPluginSettings(); |
96 #ifdef USE_CONSOLE | |
97 CONSOLE("Fetching Available Subscription\n"); | |
98 #endif | |
99 CPluginSettings::GetInstance()->m_subscriptions = CPluginClient::GetInstan
ce()->FetchAvailableSubscriptions(); | |
100 } | 96 } |
101 | 97 |
102 instance = s_instance; | 98 instance = s_instance; |
103 } | 99 } |
104 s_criticalSectionLocal.Unlock(); | 100 s_criticalSectionLocal.Unlock(); |
105 | 101 |
106 return instance; | 102 return instance; |
107 } | 103 } |
108 | 104 |
109 | 105 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 146 |
151 } | 147 } |
152 | 148 |
153 | 149 |
154 bool CPluginSettings::IsPluginEnabled() const | 150 bool CPluginSettings::IsPluginEnabled() const |
155 { | 151 { |
156 return m_isPluginEnabledTab; | 152 return m_isPluginEnabledTab; |
157 } | 153 } |
158 | 154 |
159 | 155 |
160 std::map<CString, CString> CPluginSettings::GetFilterLanguageTitleList() const | 156 std::map<CString, CString> CPluginSettings::GetFilterLanguageTitleList() |
161 { | 157 { |
| 158 m_subscriptions = CPluginClient::GetInstance()->FetchAvailableSubscriptions(); |
| 159 |
162 std::map<CString, CString> filterList; | 160 std::map<CString, CString> filterList; |
163 for (size_t i = 0; i < m_subscriptions.size(); i ++) | 161 for (size_t i = 0; i < m_subscriptions.size(); i ++) |
164 { | 162 { |
165 SubscriptionDescription it = m_subscriptions[i]; | 163 SubscriptionDescription it = m_subscriptions[i]; |
166 filterList.insert(std::make_pair(CString(it.url.c_str()), CString(it.title.c
_str()))); | 164 filterList.insert(std::make_pair(CString(it.url.c_str()), CString(it.title.c
_str()))); |
167 } | 165 } |
168 return filterList; | 166 return filterList; |
169 } | 167 } |
170 | 168 |
171 bool CPluginSettings::IsWorkingThread(DWORD dwThreadId) const | 169 bool CPluginSettings::IsWorkingThread(DWORD dwThreadId) const |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 358 } |
361 | 359 |
362 CString CPluginSettings::GetDocumentationLink() | 360 CString CPluginSettings::GetDocumentationLink() |
363 { | 361 { |
364 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); | 362 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); |
365 } | 363 } |
366 | 364 |
367 | 365 |
368 | 366 |
369 #endif // SUPPORT_WHITELIST | 367 #endif // SUPPORT_WHITELIST |
OLD | NEW |