diff options
author | George Hazan <george.hazan@gmail.com> | 2016-02-25 13:36:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-02-25 13:36:37 +0000 |
commit | 42095fb5cb7228f9dfb94965988029fd7f47b793 (patch) | |
tree | 6185ec5d7450fb474ed80b0ce95d0d1c0e0b26a8 /plugins/Quotes/src/Forex.cpp | |
parent | 8e891173c74ceaa0964f32be247f380fd5f8bcd1 (diff) |
Quotes: major code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/Forex.cpp')
-rw-r--r-- | plugins/Quotes/src/Forex.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 2ce2a1d7db..b92535800b 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -66,9 +66,8 @@ INT_PTR QuotesMenu_EnableDisable(WPARAM, LPARAM) const CQuotesProviders::TQuotesProviders& rapProviders = pProviders->GetProviders();
std::for_each(std::begin(rapProviders), std::end(rapProviders), [](const CQuotesProviders::TQuotesProviderPtr& pProvider) {
pProvider->RefreshSettings();
- if (g_bAutoUpdate) {
+ if (g_bAutoUpdate)
pProvider->RefreshAllContacts();
- }
});
UpdateMenu(g_bAutoUpdate);
@@ -191,12 +190,19 @@ int Quotes_OnToolbarLoaded(WPARAM, LPARAM) return 0;
}
+static void WorkingThread(void *pParam)
+{
+ IQuotesProvider *pProvider = reinterpret_cast<IQuotesProvider*>(pParam);
+ assert(pProvider);
+
+ if (pProvider)
+ pProvider->Run();
+}
+
int QuotesEventFunc_OnModulesLoaded(WPARAM, LPARAM)
{
CHTTPSession::Init();
- // HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY,QuotesEventFunc_onExtraImageApply);
-
g_hEventWorkThreadStop = ::CreateEvent(NULL, TRUE, FALSE, NULL);
HookEvent(ME_USERINFO_INITIALISE, QuotesEventFunc_OnUserInfoInit);
@@ -227,10 +233,8 @@ int QuotesEventFunc_OnContactDeleted(WPARAM wParam, LPARAM) const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
- if (pProvider) {
+ if (pProvider)
pProvider->DeleteContact(hContact);
- }
-
return 0;
}
@@ -267,7 +271,7 @@ int QuotesEventFunc_OptInitialise(WPARAM wp, LPARAM/* lp*/) odp.hInstance = g_hInstance;
odp.ptszTitle = _T(QUOTES_PROTOCOL_NAME);
odp.ptszGroup = LPGENT("Network");
- odp.hIcon = Quotes_LoadIconEx(ICON_STR_MAIN);
+ odp.hIcon = Quotes_LoadIconEx(IDI_ICON_MAIN);
odp.flags = ODPF_USERINFOTAB | ODPF_TCHAR;
std::for_each(rapProviders.begin(), rapProviders.end(), boost::bind(&IQuotesProvider::ShowPropertyPage, _1, wp, boost::ref(odp)));
|