From f580be3d9dcccb14831d6bed9e7dfca600f5b6f8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2019 16:15:45 +0300 Subject: popups: - internal implementation details & all service declarations moved to m_popup_int.h; - all service calls removed and replaced with function calls; - direct access to popup serttings replaced with Popup_Enable / Popup_Enabled; --- plugins/TabSRMM/src/chat_tools.cpp | 2 +- plugins/TabSRMM/src/msgs.cpp | 2 +- plugins/TabSRMM/src/typingnotify.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index cb22e44284..937c460af7 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -124,7 +124,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa pd.PluginWindowProc = PopupDlgProc; pd.PluginData = si; - return PUAddPopupW(&pd); + return (int)PUAddPopupW(&pd); } BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 694f823531..75e826a44e 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -248,7 +248,7 @@ void CTabBaseDlg::NotifyDeliveryFailure() const if (M.GetByte("adv_noErrorPopups", 0)) return; - if (CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) != 1) + if (!Popup_Enabled()) return; POPUPDATAW ppd = { 0 }; diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index f65d1f8965..353d45f7cb 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -96,8 +96,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode) } int notyping; - POPUPDATAW_V2 ppd = { 0 }; - ppd.cbSize = sizeof(ppd); + POPUPDATAW ppd = { 0 }; if (iMode == PROTOTYPE_CONTACTTYPING_OFF) { if (StopDisabled) @@ -164,7 +163,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode) ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]; ppd.lchContact = hContact; ppd.PluginWindowProc = PopupDlgProc; - PUAddPopupW(&ppd, APF_NEWDATA); + PUAddPopupW(&ppd); } static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -- cgit v1.2.3