summaryrefslogtreecommitdiff
path: root/plugins/CurrencyRates
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
commit423be683866fd8e305457eb725d8cdbe1f297fbd (patch)
treec49a7bdaf7f08683b9bfae48f0250050b2bf1872 /plugins/CurrencyRates
parent288a07c81370226937d882b7a14fe3b6e3607e9e (diff)
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/CurrencyRates')
-rw-r--r--plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp10
-rw-r--r--plugins/CurrencyRates/src/SettingsDlg.cpp4
2 files changed, 7 insertions, 7 deletions
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<WPARAM>(&ppd), lp));
+ return (0 == CallService(MS_POPUP_ADDPOPUPW, reinterpret_cast<WPARAM>(&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));