diff options
Diffstat (limited to 'plugins/AddContactPlus')
-rw-r--r-- | plugins/AddContactPlus/src/addcontact.cpp | 22 | ||||
-rw-r--r-- | plugins/AddContactPlus/src/main.cpp | 10 |
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index e1d0a79bd0..f77bd1f5de 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -100,7 +100,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) }
if (iAccCount == 0) {
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -172,7 +172,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
{
wchar_t *szGroup;
- for (int i = 1; (szGroup = Clist_GroupGetName(i, NULL)) != NULL; i++) {
+ for (int i = 1; (szGroup = Clist_GroupGetName(i, nullptr)) != nullptr; i++) {
int id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)szGroup);
SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA, (WPARAM)id, (LPARAM)i);
}
@@ -239,10 +239,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) GetDlgItemText(hdlg, IDC_USERID, szUserId, _countof(szUserId));
if (*rtrimw(szUserId) == 0 ||
- (strstr(acs->proto, "GG") && wcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol
- ((CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !wcstoul(szUserId, NULL, 10)))
+ (strstr(acs->proto, "GG") && wcstoul(szUserId, nullptr, 10) > INT_MAX) || // Gadu-Gadu protocol
+ ((CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !wcstoul(szUserId, nullptr, 10)))
{
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -250,8 +250,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) PROTOSEARCHRESULT *psr;
if (strstr(acs->proto, "TLEN")) { // Tlen protocol
- if (wcschr(szUserId, '@') == NULL) {
- MessageBox(NULL,
+ if (wcschr(szUserId, '@') == nullptr) {
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -271,7 +271,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) MCONTACT hContact = (MCONTACT)CallProtoService(acs->proto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
if (hContact == NULL) {
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. If you are not logged into the selected account, please try to do so. Also, make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -310,7 +310,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) }
// fall through
case IDCANCEL:
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -319,7 +319,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) case WM_CLOSE:
/* if there is no parent for the dialog, its a modeless dialog and can't be killed using EndDialog() */
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -335,7 +335,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) break;
case WM_DESTROY:
- hAddDlg = NULL;
+ hAddDlg = nullptr;
Window_FreeIcon_IcoLib(hdlg);
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
if (acs) {
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index 1326ab1206..26df21c584 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -24,8 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc., CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
-static HANDLE hToolBarItem = 0;
-static HGENMENU hMainMenuItem = 0;
+static HANDLE hToolBarItem = nullptr;
+static HGENMENU hMainMenuItem = nullptr;
HWND hAddDlg;
static IconItem icon = { LPGEN("Add contact"), ICON_ADD, IDI_ADDCONTACT };
@@ -68,7 +68,7 @@ static INT_PTR AddContactPlusDialog(WPARAM, LPARAM) SetForegroundWindow(hAddDlg);
SetFocus(hAddDlg);
}
- else hAddDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDCONTACT), NULL, AddContactDlgProc, 0);
+ else hAddDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDCONTACT), nullptr, AddContactDlgProc, 0);
return 0;
}
@@ -107,7 +107,7 @@ static int OnAccListChanged(WPARAM, LPARAM) Menu_RemoveItem(hMainMenuItem);
CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hToolBarItem, 0);
- hMainMenuItem = 0;
+ hMainMenuItem = nullptr;
}
return 0;
@@ -115,7 +115,7 @@ static int OnAccListChanged(WPARAM, LPARAM) static int CreateButton(WPARAM, LPARAM)
{
- TTBButton tbb = { 0 };
+ TTBButton tbb = {};
tbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
tbb.pszService = MS_ADDCONTACTPLUS_SHOW;
tbb.name = tbb.pszTooltipUp = LPGEN("Add contact");
|