From dd1460d664f7266920b07527f25f87ec8233daaf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Sep 2013 10:58:24 +0000 Subject: valid options initialization git-svn-id: http://svn.miranda-ng.org/main/trunk@6225 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Quotes/src/Forex.cpp | 3 +-- plugins/Quotes/src/QuoteInfoDlg.cpp | 9 +-------- plugins/Quotes/src/QuotesProviderFinance.cpp | 2 +- plugins/Quotes/src/QuotesProviderGoogle.cpp | 10 +--------- 4 files changed, 4 insertions(+), 20 deletions(-) (limited to 'plugins/Quotes/src') diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 32240ea123..4d61bd793b 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -311,8 +311,7 @@ namespace const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr(); const CQuotesProviders::TQuotesProviders& rapProviders = pProviders->GetProviders(); - OPTIONSDIALOGPAGE odp = { 0 }; - odp.cbSize = sizeof(odp); + OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.position = 910000000; odp.hInstance = g_hInstance; odp.ptszTitle = _T(QUOTES_PROTOCOL_NAME); diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index 756a17ad8f..d21b3f2fed 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -120,22 +120,15 @@ int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp) { HANDLE hContact = reinterpret_cast(lp); if(NULL == hContact) - { return 0; - } - if(false == IsMyContact(hContact)) - { return 0; - } g_hContact = hContact; - OPTIONSDIALOGPAGE odp = {0}; - odp.cbSize = sizeof( odp ); + OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = g_hInstance; - odp.hIcon = Quotes_LoadIconEx(ICON_STR_MAIN); odp.pfnDlgProc = QuoteInfoDlgProc; odp.position = -2000000000; diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp index e7c9a16d06..cbd121ea4b 100644 --- a/plugins/Quotes/src/QuotesProviderFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderFinance.cpp @@ -299,7 +299,7 @@ namespace } } -void CQuotesProviderFinance::ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp) +void CQuotesProviderFinance::ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE &odp) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_OPT_FINANCE); odp.pfnDlgProc = GoogleFinanceOptDlgProc; diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp index bc07ec0f80..f2fbc5f8ca 100644 --- a/plugins/Quotes/src/QuotesProviderGoogle.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp @@ -445,19 +445,11 @@ namespace } } -void CQuotesProviderGoogle::ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp) +void CQuotesProviderGoogle::ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE &odp) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_OPT_GOOGLE); odp.pfnDlgProc = GoogleOptDlgProc; -// #if MIRANDA_VER >= 0x0600 - //odp.ptszTab = TranslateTS(const_cast(GetInfo().m_sName.c_str())); odp.ptszTab = const_cast(GetInfo().m_sName.c_str()); -// #else -// tostringstream o; -// o << TranslateTS(QUOTES_PROTOCOL_NAME) << _T(" - ") << TranslateTS(GetInfo().m_sName.c_str()); -// tstring sTitle = o.str(); -// odp.ptszTitle = TranslateTS(const_cast(sTitle.c_str())); -// #endif Options_AddPage(wp, &odp); } -- cgit v1.2.3