diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
commit | 423be683866fd8e305457eb725d8cdbe1f297fbd (patch) | |
tree | c49a7bdaf7f08683b9bfae48f0250050b2bf1872 /plugins/StatusManager | |
parent | 288a07c81370226937d882b7a14fe3b6e3607e9e (diff) |
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/StatusManager')
-rw-r--r-- | plugins/StatusManager/src/keepstatus.cpp | 10 | ||||
-rw-r--r-- | plugins/StatusManager/src/ks_options.cpp | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/plugins/StatusManager/src/keepstatus.cpp b/plugins/StatusManager/src/keepstatus.cpp index fde639d7e2..4d36e4e387 100644 --- a/plugins/StatusManager/src/keepstatus.cpp +++ b/plugins/StatusManager/src/keepstatus.cpp @@ -768,10 +768,10 @@ static VOID CALLBACK CheckContinueslyTimer(HWND, UINT, UINT_PTR, DWORD) static INT_PTR ShowPopup(const wchar_t *msg, HICON hIcon) { - POPUPDATAT ppd = {}; + POPUPDATAW ppd = {}; ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, msg, MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, msg, MAX_SECONDLINE); if (KSPlugin.getByte(SETTING_POPUP_USEWINCOLORS, 0)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); @@ -798,7 +798,7 @@ static INT_PTR ShowPopup(const wchar_t *msg, HICON hIcon) ppd.iSeconds = 0; break; } - return PUAddPopupT(&ppd); + return PUAddPopupW(&ppd); } static wchar_t* GetHumanName(LPARAM lParam) @@ -809,7 +809,7 @@ static wchar_t* GetHumanName(LPARAM lParam) static int ProcessPopup(int reason, LPARAM lParam) { - if (!KSPlugin.getByte(SETTING_SHOWCONNECTIONPOPUPS, FALSE) || !ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!KSPlugin.getByte(SETTING_SHOWCONNECTIONPOPUPS, FALSE) || !ServiceExists(MS_POPUP_ADDPOPUPW)) return -1; HICON hIcon = nullptr; diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/ks_options.cpp index 00fb0ac893..9415772b5f 100644 --- a/plugins/StatusManager/src/ks_options.cpp +++ b/plugins/StatusManager/src/ks_options.cpp @@ -289,14 +289,14 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L } // delay - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPW)); switch (db_get_b(0, KSMODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) { case POPUP_DELAYCUSTOM: CheckDlgButton(hwndDlg, IDC_DELAYCUSTOM, BST_CHECKED); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPW)); break; case POPUP_DELAYPERMANENT: @@ -375,10 +375,10 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_PREV: { - POPUPDATAT ppd = {}; + POPUPDATAW ppd = {}; ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); - wcsncpy(ppd.lptzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE); if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); @@ -402,7 +402,7 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYPERMANENT)) { ppd.iSeconds = -1; } - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } break; } @@ -471,7 +471,7 @@ int KeepStatusOptionsInit(WPARAM wparam, LPARAM) odp.pfnDlgProc = DlgProcKSAdvOpts; KSPlugin.addOptions(wparam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { memset(&odp, 0, sizeof(odp)); odp.position = 150000000; odp.szGroup.a = LPGEN("Popups"); |