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/Alarms/src/alarms.cpp | |
parent | 8a1ff32e54b39ceef22df61bda17bbfda94918fc (diff) |
Popup:
- wiping out checks for service presence;
- code cleaning
Diffstat (limited to 'plugins/Alarms/src/alarms.cpp')
-rw-r--r-- | plugins/Alarms/src/alarms.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index d75f9688c4..3985bd50fc 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -60,23 +60,19 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA void ShowPopup(MCONTACT hContact, const wchar_t *msg)
{
- if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
- wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact);
-
- POPUPDATAW ppd = { 0 };
- ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
- ppd.lchIcon = hIconList1;
- mir_wstrncpy(ppd.lpwzContactName, lpzContactName, MAX_CONTACTNAME);
- mir_wstrncpy(ppd.lpwzText, msg, MAX_SECONDLINE);
- ppd.colorBack = GetSysColor(COLOR_BTNFACE);
- ppd.colorText = RGB(0, 0, 0);
- ppd.PluginWindowProc = PopupDlgProc;
- ppd.PluginData = nullptr;
- ppd.iSeconds = 3;
-
- // Now that every field has been filled, we want to see the popup.
- PUAddPopupW(&ppd);
- }
+ wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact);
+
+ POPUPDATAW ppd = { 0 };
+ ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
+ ppd.lchIcon = hIconList1;
+ mir_wstrncpy(ppd.lpwzContactName, lpzContactName, MAX_CONTACTNAME);
+ mir_wstrncpy(ppd.lpwzText, msg, MAX_SECONDLINE);
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = RGB(0, 0, 0);
+ ppd.PluginWindowProc = PopupDlgProc;
+ ppd.PluginData = nullptr;
+ ppd.iSeconds = 3;
+ PUAddPopupW(&ppd);
}
HBITMAP LoadBmpFromIcon(int IdRes)
|