summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-06 16:15:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-06 16:15:55 +0300
commitf580be3d9dcccb14831d6bed9e7dfca600f5b6f8 (patch)
tree468913d477b9d2a9fb430df9a886d24a8cf41887 /plugins/UserInfoEx/src
parent827dbce0a554ccc313fd0b14b45bd57dffeead95 (diff)
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;
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp6
-rw-r--r--plugins/UserInfoEx/src/init.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp6
-rw-r--r--plugins/UserInfoEx/src/stdafx.h1
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp5
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp2
6 files changed, 6 insertions, 16 deletions
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 4adbd1fdeb..8e67dff833 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -490,8 +490,7 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam)
MoveWindow(hDlg, -10, -10, 0, 0, FALSE);
LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA));
if (pmpd) {
- POPUPDATAW_V2 pd = { 0 };
- pd.cbSize = sizeof(pd);
+ POPUPDATAW pd = { 0 };
pd.lchContact = NULL; //(HANDLE)wParam;
// icon
pd.lchIcon = MsgLoadIcon(pMsgBox);
@@ -567,7 +566,7 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam)
}
// create popup
- PUAddPopupW(&pd, APF_NEWDATA);
+ PUAddPopupW(&pd);
if (MB_TYPE(pMsgBox->uType) == MB_OK)
EndDialog(hDlg, IDOK);
}
@@ -642,7 +641,6 @@ INT_PTR MsgBoxService(WPARAM, LPARAM lParam)
if (PtrIsValid(pMsgBox) && pMsgBox->cbSize == sizeof(MSGBOX)) {
// Shall the MessageBox displayed as popup?
if (!(pMsgBox->uType & (MB_INFOBAR | MB_NOPOPUP)) // message box can be a popup?
- && myGlobals.PopupActionsExist == 1 // popup support ext stuct?
&& (db_get_dw(0, "Popup", "Actions", 0) & 1) // popup++ actions on?
&& g_plugin.getByte(SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX)) // user likes popups?
return DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_MSGBOXDUMMI), pMsgBox->hParent, MsgBoxPop, lParam);
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index 2259a892b0..6d017b966f 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -94,8 +94,6 @@ static int OnTopToolBarLoaded(WPARAM, LPARAM)
**/
static int OnModulesLoaded(WPARAM, LPARAM)
{
- myGlobals.PopupActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS);
-
// create services to receive string lists of languages and timezones
SvcConstantsLoadModule();
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index ca4830974c..f173ec77c9 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -784,11 +784,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
DBGetCheckBtn(hDlg, CHECK_OPT_POPUP_MSGBOX, SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX);
DBGetCheckBtn(hDlg, CHECK_OPT_POPUP_PROGRESS, "PopupProgress", FALSE);
// disable if popup plugin dos not sopport buttons inside popop
- if (!myGlobals.PopupActionsExist) {
- EnableDlgItem(hDlg, CHECK_OPT_POPUP_MSGBOX, FALSE);
- EnableDlgItem(hDlg, CHECK_OPT_POPUP_PROGRESS, FALSE);
- }
- else if (!(db_get_dw(0, "Popup","Actions", 0) & 1))
+ if (!(db_get_dw(0, "Popup","Actions", 0) & 1))
EnableDlgItem(hDlg, CHECK_OPT_POPUP_MSGBOX, FALSE);
// enable/disable popups
diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h
index c15c141fe9..34d81f6cec 100644
--- a/plugins/UserInfoEx/src/stdafx.h
+++ b/plugins/UserInfoEx/src/stdafx.h
@@ -165,7 +165,6 @@ typedef struct _MGLOBAL
{
BYTE CanChangeDetails : 1; // is service to upload own contact information for icq present?
BYTE TzIndexExist : 1; // Win Reg has Timzone Index Info
- BYTE PopupActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist
BYTE ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value
BYTE WantAeroAdaption : 1; // reserved for later use
} MGLOBAL, *LPMGLOBAL;
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index f7a11d62c4..533989a1ab 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -393,8 +393,7 @@ public:
**/
virtual HWND Create(LPCTSTR szTitle, PUpdCallback pFnCallBack)
{
- POPUPDATAW_V2 pd = { 0 };
- pd.cbSize = sizeof(pd);
+ POPUPDATAW pd = { 0 };
pd.lchIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
pd.iSeconds = -1;
pd.PluginData = this;
@@ -409,7 +408,7 @@ public:
mir_wstrcpy(pd.lpwzText, L" ");
_pFnCallBack = pFnCallBack;
- _hWnd = (HWND)PUAddPopupW(&pd, APF_RETURN_HWND | APF_NEWDATA);
+ _hWnd = PUAddPopupW(&pd, APF_RETURN_HWND);
return _hWnd;
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 4dc19b4602..7b9a57e0e0 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -291,7 +291,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT
break;
}
}
- return PUAddPopupW(&ppd);
+ return (INT_PTR)PUAddPopupW(&ppd);
}
/**