diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-05 21:10:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-05 21:10:22 +0300 |
commit | d9fddc0cfa9066eb1b5ad3f4807b37426ae6ca88 (patch) | |
tree | f09baaf9b91477d009cedc5bd77449b0fa3e3af7 /plugins/BuddyExpectator/src | |
parent | 8a1ff32e54b39ceef22df61bda17bbfda94918fc (diff) |
Popup:
- wiping out checks for service presence;
- code cleaning
Diffstat (limited to 'plugins/BuddyExpectator/src')
-rw-r--r-- | plugins/BuddyExpectator/src/BuddyExpectator.cpp | 4 | ||||
-rw-r--r-- | plugins/BuddyExpectator/src/options.cpp | 20 |
2 files changed, 9 insertions, 15 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 03e7537982..57b73cecbc 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -243,7 +243,7 @@ bool isContactGoneFor(MCONTACT hContact, int days) ppd.lpActions = hideactions;
ppd.actionCount = 2;
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA);
+ PUAddPopupW(&ppd, APF_NEWDATA);
Skin_PlaySound("buddyExpectatorHide");
}
@@ -497,7 +497,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) ppd.lpActions = missyouactions;
ppd.actionCount = 1;
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA);
+ PUAddPopupW(&ppd, APF_NEWDATA);
Skin_PlaySound("buddyExpectatorMissYou");
}
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index 48d768140b..96e2dd0856 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -94,10 +94,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- if (!ServiceExists(MS_POPUP_ADDPOPUPW))
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_POPUP), FALSE);
-
- //iAbsencePeriod
+ // iAbsencePeriod
SendDlgItemMessage(hwndDlg, IDC_COMBO_PERIOD, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_COMBO_PERIOD, CB_ADDSTRING, 0, (LPARAM)TranslateT("days"));
SendDlgItemMessage(hwndDlg, IDC_COMBO_PERIOD, CB_ADDSTRING, 0, (LPARAM)TranslateT("weeks"));
@@ -344,12 +341,12 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.PluginData = nullptr;
ppd.iSeconds = options.iPopupDelay;
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY);
+ PUAddPopupW(&ppd, APF_NO_HISTORY);
wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY);
+ PUAddPopupW(&ppd, APF_NO_HISTORY);
}
else {
if ((HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == CBN_SELCHANGE) || ((HIWORD(wParam) == EN_CHANGE) && !ChangeLock))
@@ -439,13 +436,10 @@ int OptionsInit(WPARAM wParam, LPARAM) odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
g_plugin.addOptions(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
- odp.szGroup.w = LPGENW("Popups");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPPANEL);
- odp.pfnDlgProc = PopupOptionsFrameProc;
- g_plugin.addOptions(wParam, &odp);
- }
-
+ odp.szGroup.w = LPGENW("Popups");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPPANEL);
+ odp.pfnDlgProc = PopupOptionsFrameProc;
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
|