summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraPopUp.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-17 12:46:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-17 12:46:06 +0300
commit3146b42058bccddb648c2a5d8bfc189ae6ad1dd2 (patch)
tree96ef516183d5ba739b0265bfed4764f622ca0513 /protocols/MRA/src/MraPopUp.cpp
parentfd6bd7db83b60fc9e9e2c34038831cf454215f93 (diff)
CMraProto::MraPopupShowW: unused parameter dwFlags removed
Diffstat (limited to 'protocols/MRA/src/MraPopUp.cpp')
-rw-r--r--protocols/MRA/src/MraPopUp.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index 5bb872dd86..10d6599e9d 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -68,7 +68,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
case IDC_PREVIEW:
for (int i = 0; i < POPUPS_TYPES_COUNT; i++)
- ppro->MraPopupShowFromAgentW(i, 0, TranslateW(lpcwszPopupsTypes[i]));
+ ppro->MraPopupShowFromAgentW(i, TranslateW(lpcwszPopupsTypes[i]));
break;
case IDC_CHK_ENABLE:
@@ -98,9 +98,9 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
DWORD dwType = GET_CURRENT_COMBO_DATA(hWndDlg, IDC_COMBO_POPUP_TYPE);
DWORD dwPopupsEventFilter = ppro->getDword("PopupsEventFilter", MRA_DEFAULT_POPUPS_EVENT_FILTER);
if (IsDlgButtonChecked(hWndDlg, IDC_CHK_ENABLE))
- dwPopupsEventFilter |= (1<<dwType);
+ dwPopupsEventFilter |= (1 << dwType);
else
- dwPopupsEventFilter &= ~(1<<dwType);
+ dwPopupsEventFilter &= ~(1 << dwType);
ppro->setDword("PopupsEventFilter", dwPopupsEventFilter);
@@ -125,7 +125,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
int CMraProto::OnPopupOptInit(WPARAM wParam, LPARAM)
{
- if ( ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.dwInitParam = (LPARAM)this;
odp.position = 100000000;
@@ -195,7 +195,7 @@ LRESULT CALLBACK MraPopupDlgProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM l
return DefWindowProc(hWndDlg, msg, wParam, lParam);
}
-void CMraProto::MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage)
+void CMraProto::MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, LPCWSTR lpszMessage)
{
WCHAR szTitle[MAX_CONTACTNAME];
CMStringW szNick, szEmail;
@@ -206,22 +206,21 @@ void CMraProto::MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, DWORD
else
mir_snwprintf(szTitle, L"%s: %s <%s>", m_tszUserName, szNick.c_str(), szEmail.c_str());
- MraPopupShowW(hContact, dwType, dwFlags, szTitle, lpszMessage);
+ MraPopupShowW(hContact, dwType, szTitle, lpszMessage);
}
-void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage)
+void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, LPWSTR lpszTitle, LPCWSTR lpszMessage)
{
if (getByte("PopupsEnabled", MRA_DEFAULT_POPUPS_ENABLED))
if (GetBit(getDword("PopupsEventFilter", MRA_DEFAULT_POPUPS_EVENT_FILTER), dwType))
- if ( ServiceExists(MS_POPUP_ADDPOPUPW)) {
- POPUPDATAT ppd = { 0 };
-
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
// delete old email popup
if (dwType == MRA_POPUP_TYPE_EMAIL_STATUS && hWndEMailPopupStatus) {
PUDeletePopup(hWndEMailPopupStatus);
hWndEMailPopupStatus = NULL;
}
+ POPUPDATAT ppd = { 0 };
// load icon
switch (dwType) {
case MRA_POPUP_TYPE_NONE:// proto icon
@@ -247,7 +246,7 @@ void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LP
break;
}
- MraPopupData *dat = (MraPopupData*)mir_calloc( sizeof(MraPopupData));
+ MraPopupData *dat = (MraPopupData*)mir_calloc(sizeof(MraPopupData));
dat->iPopupType = dwType;
dat->ppro = this;
@@ -282,6 +281,4 @@ void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LP
else
PUAddPopupW(&ppd);
}
- else if (dwFlags & MRA_POPUP_ALLOW_MSGBOX)
- MessageBox(NULL, lpszMessage, lpszTitle, MB_OK+(dwType == MRA_POPUP_TYPE_WARNING)?MB_ICONERROR:MB_ICONINFORMATION);
}