From 11354effc08a8d1b1b0fc95b5c473256f33c8ec3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 21 Dec 2014 17:52:29 +0000 Subject: - MS_PROTO_ISPROTOCOLLOADED now switched back to protocols instead of accounts; - calls of MS_PROTO_ISPROTOCOLLOADED replaced with ProtoGetAccount() wherever possible git-svn-id: http://svn.miranda-ng.org/main/trunk@11558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_userinfo.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'protocols/Tlen') diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index c0ebbcffac..80304d0ddb 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -113,14 +113,12 @@ static void FetchField(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, int *strSize) { - int value; - char *localFieldName; - if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL) return; - value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0); + + int value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0); if (value > 0) { - if ((localFieldName=TlenTextEncode(fieldName)) != NULL) { + if (char *localFieldName = TlenTextEncode(fieldName)) { TlenStringAppend(str, strSize, "<%s>%d", localFieldName, value, localFieldName); mir_free(localFieldName); } @@ -129,7 +127,7 @@ static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) { - if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName)) + if (!ProtoGetAccount(m_szModuleName)) return 0; MCONTACT hContact = (MCONTACT) lParam; -- cgit v1.2.3