From f8f8028f21082433a2ac43ff2787d01ccce5a29a Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 22 Mar 2014 19:51:45 +0000 Subject: -Metacontacts: removed obsolete message -Account Manager: Made messageboxes modal git-svn-id: http://svn.miranda-ng.org/main/trunk@8693 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/protocols/protoopts.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/modules/protocols') diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 0b7b18ace9..724684609a 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -127,7 +127,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam if (buf[0]) { for (int i=0; i < accounts.getCount(); i++) if (_stricmp(buf, accounts[i]->szModuleName) == 0) { - MessageBox(NULL, TranslateT("Account name has to be unique. Please enter unique name."), TranslateT("Account error"), MB_ICONERROR | MB_OK); + MessageBox(hwndDlg, TranslateT("Account name has to be unique. Please enter unique name."), TranslateT("Account error"), MB_ICONERROR | MB_OK); return FALSE; } } @@ -136,11 +136,10 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam switch(param->action) { case PRAC_UPGRADED: { - int idx; BOOL oldProto = pa->bOldProto; TCHAR szPlugin[MAX_PATH]; mir_sntprintf(szPlugin, SIZEOF(szPlugin), _T("%s.dll"), StrConvT(pa->szProtoName)); - idx = accounts.getIndex(pa); + int idx = accounts.getIndex(pa); UnloadAccount(pa, false, false); accounts.remove(idx); if (oldProto && UnloadPlugin(szPlugin, SIZEOF(szPlugin))) { @@ -855,11 +854,11 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM TCHAR buf[ 200 ]; mir_sntprintf(buf, SIZEOF(buf), TranslateT("Account %s is being deleted"), pa->tszAccountName); if (pa->bOldProto) { - MessageBox(NULL, TranslateT("You need to disable plugin to delete this account"), buf, + MessageBox(hwndDlg, TranslateT("You need to disable plugin to delete this account"), buf, MB_ICONERROR | MB_OK); break; } - if (IDYES == MessageBox(NULL, errMsg, buf, MB_ICONWARNING | MB_DEFBUTTON2 | MB_YESNO)) { + if (IDYES == MessageBox(hwndDlg, errMsg, buf, MB_ICONWARNING | MB_DEFBUTTON2 | MB_YESNO)) { // lock controls to avoid changes during remove process ListBox_SetCurSel(hList, -1); sttUpdateAccountInfo(hwndDlg, dat); @@ -973,10 +972,9 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: { - int i; PSHNOTIFY pshn = {0}; pshn.hdr.code = PSN_APPLY; - for (i=0; i < accounts.getCount(); i++) { + for (int i=0; i < accounts.getCount(); i++) { if (accounts[i]->hwndAccMgrUI && accounts[i]->bAccMgrUIChanged) { pshn.hdr.hwndFrom = accounts[i]->hwndAccMgrUI; SendMessage(accounts[i]->hwndAccMgrUI, WM_NOTIFY, 0, (LPARAM)&pshn); @@ -987,10 +985,9 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM } case PSN_RESET: { - int i; PSHNOTIFY pshn = {0}; pshn.hdr.code = PSN_RESET; - for (i=0; i < accounts.getCount(); i++) { + for (int i=0; i < accounts.getCount(); i++) { if (accounts[i]->hwndAccMgrUI && accounts[i]->bAccMgrUIChanged) { pshn.hdr.hwndFrom = accounts[i]->hwndAccMgrUI; SendMessage(accounts[i]->hwndAccMgrUI, WM_NOTIFY, 0, (LPARAM)&pshn); -- cgit v1.2.3