From 423be683866fd8e305457eb725d8cdbe1f297fbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Feb 2019 12:43:20 +0300 Subject: popup code cleaning (cause we have no tchar.h) --- plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp | 10 +++++----- plugins/CurrencyRates/src/SettingsDlg.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/CurrencyRates') diff --git a/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp b/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp index 93f904b28a..592fd551ba 100644 --- a/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp +++ b/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp @@ -443,10 +443,10 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, const tstring& rsFormat, const CPopupSettings& ps) { - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) return false; - POPUPDATAT ppd; + POPUPDATAW ppd; memset(&ppd, 0, sizeof(ppd)); ppd.lchContact = hContact; @@ -460,11 +460,11 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, ppd.lchIcon = CurrencyRates_LoadIconEx(IDI_ICON_DOWN); } - mir_wstrncpy(ppd.lptzContactName, pProvider->FormatSymbol(hContact, 's').c_str(), MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzContactName, pProvider->FormatSymbol(hContact, 's').c_str(), MAX_CONTACTNAME); { ptrW ss(variables_parsedup((wchar_t*)rsFormat.c_str(), nullptr, hContact)); tstring sText = format_rate(pProvider, hContact, tstring(ss)); - mir_wstrncpy(ppd.lptzText, sText.c_str(), MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzText, sText.c_str(), MAX_SECONDLINE); } if (CPopupSettings::colourDefault == ps.GetColourMode()) { @@ -494,7 +494,7 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, if (false == ps.GetHistoryFlag()) lp |= 0x08; - return (0 == CallService(MS_POPUP_ADDPOPUPT, reinterpret_cast(&ppd), lp)); + return (0 == CallService(MS_POPUP_ADDPOPUPW, reinterpret_cast(&ppd), lp)); } void CCurrencyRatesProviderBase::WriteContactRate(MCONTACT hContact, double dRate, const tstring& rsSymbol/* = ""*/) diff --git a/plugins/CurrencyRates/src/SettingsDlg.cpp b/plugins/CurrencyRates/src/SettingsDlg.cpp index 164367450e..0d919d76a0 100644 --- a/plugins/CurrencyRates/src/SettingsDlg.cpp +++ b/plugins/CurrencyRates/src/SettingsDlg.cpp @@ -40,7 +40,7 @@ void update_popup_controls(HWND hDlg) bool enable_popup_controls(HWND hDlg) { - bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPT); + bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPW); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP), bIsPopupServiceEnabled); ::EnableWindow(::GetDlgItem(hDlg, IDC_EDIT_POPUP_FORMAT), bIsPopupServiceEnabled); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP_ONLY_VALUE_CHANGED), bIsPopupServiceEnabled); @@ -72,7 +72,7 @@ void update_all_controls(HWND hDlg) ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_HISTORY_DESCRIPTION), (bIsCheckedContactSpec&&bIsCheckedHistory)); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_HISTORY_CONDITION), (bIsCheckedContactSpec&&bIsCheckedHistory)); - bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPT); + bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPW); bool bIsCheckedShowPopup = (1 == ::IsDlgButtonChecked(hDlg, IDC_CHECK_SHOW_POPUP)); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP), (bIsCheckedContactSpec&&bIsPopupServiceEnabled)); ::EnableWindow(::GetDlgItem(hDlg, IDC_EDIT_POPUP_FORMAT), (bIsCheckedContactSpec&&bIsPopupServiceEnabled&&bIsCheckedShowPopup)); -- cgit v1.2.3