From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stduserinfo/stdinfo.cpp | 61 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'src/core/stduserinfo/stdinfo.cpp') diff --git a/src/core/stduserinfo/stdinfo.cpp b/src/core/stduserinfo/stdinfo.cpp index b807e8f37e..ac02608694 100644 --- a/src/core/stduserinfo/stdinfo.cpp +++ b/src/core/stduserinfo/stdinfo.cpp @@ -35,7 +35,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #define SVS_SIGNED 6 #define SVS_TIMEZONE 7 -static int Proto_GetContactInfoSetting(HANDLE hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType) +static int Proto_GetContactInfoSetting(HCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType) { DBCONTACTGETSETTING cgs = {szModule, szSetting, dbv}; dbv->type = (BYTE)nType; @@ -64,7 +64,7 @@ static void Proto_FreeInfoVariant(DBVARIANT *dbv) dbv->type = 0; } -static void SetValue(HWND hwndDlg, int idCtrl, HANDLE hContact, char *szModule, char *szSetting, int special) +static void SetValue(HWND hwndDlg, int idCtrl, HCONTACT hContact, char *szModule, char *szSetting, int special) { char str[80], *pstr = NULL; TCHAR* ptstr = NULL; @@ -194,7 +194,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (((LPNMHDR)lParam)->idFrom) { case 0: if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) { - HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; if (hContact != NULL) { char *szProto = GetContactProto(hContact); if (szProto == NULL) @@ -244,13 +244,13 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L TranslateDialogDefault(hwndDlg); SetTimer(hwndDlg, 1, 1000, NULL); - tmi.prepareList((HANDLE)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB); + tmi.prepareList((HCONTACT)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB); SendMessage(hwndDlg, WM_TIMER, 0, 0); break; case WM_TIMER: { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); if (hContact != NULL) { TCHAR szTime[80]; if (tmi.printDateTimeByContact(hContact, _T("s"), szTime, SIZEOF(szTime), TZF_KNOWNONLY)) { @@ -269,7 +269,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L switch (((LPNMHDR)lParam)->idFrom) { case 0: if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) { - HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; if (hContact != NULL) { char *szProto = GetContactProto(hContact); if (szProto == NULL) @@ -297,7 +297,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_TIMEZONESELECT: if (HIWORD(wParam) == CBN_SELCHANGE) { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); tmi.storeListResults(hContact, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB); @@ -319,7 +319,7 @@ static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (((LPNMHDR)lParam)->idFrom) { case 0: if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) { - HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; if (hContact != NULL) { char *szProto = GetContactProto(hContact); if (szProto == NULL) break; @@ -395,7 +395,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, int i; char idstr[33]; DBVARIANT dbv, dbvText; - HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; if (hContact != NULL) { char *szProto = GetContactProto(hContact); @@ -522,7 +522,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hFont = CreateFontIndirect(&lf); SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM) hFont, MAKELPARAM(TRUE, 0)); - if ( !db_get_s((HANDLE)lParam, "UserInfo", "MyNotes", &dbv)) { + if (!db_get_s((HCONTACT)lParam, "UserInfo", "MyNotes", &dbv)) { SetDlgItemTextA(hwndDlg, IDC_MYNOTES, dbv.pszVal); db_free(&dbv); } @@ -531,30 +531,31 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR break; case WM_NOTIFY: switch (((LPNMHDR)lParam)->idFrom) { - case 0: - switch (((LPNMHDR)lParam)->code) { - case PSN_INFOCHANGED: - { char *szProto; - HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; - if (hContact != NULL) { - szProto = GetContactProto(hContact); - if (szProto == NULL) break; + case 0: + switch (((LPNMHDR)lParam)->code) { + case PSN_INFOCHANGED: + { + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; + if (hContact != NULL) { + char *szProto = GetContactProto(hContact); + if (szProto != NULL) SetValue(hwndDlg, IDC_ABOUT, hContact, szProto, "About", 0); - } - break; } - case PSN_APPLY: - { HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam; - if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MYNOTES))) { - char text[2048]; - GetDlgItemTextA(hwndDlg, IDC_MYNOTES, text, SIZEOF(text)); - db_set_s(hContact, "UserInfo", "MyNotes", text); - } - else db_unset(hContact, "UserInfo", "MyNotes"); - break; + } + break; + case PSN_APPLY: + { + HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; + if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MYNOTES))) { + char text[2048]; + GetDlgItemTextA(hwndDlg, IDC_MYNOTES, text, SIZEOF(text)); + db_set_s(hContact, "UserInfo", "MyNotes", text); } + else db_unset(hContact, "UserInfo", "MyNotes"); } break; + } + break; } break; case WM_COMMAND: @@ -578,7 +579,7 @@ int DetailsInit(WPARAM wParam, LPARAM lParam) if (lParam == NULL) return 0; - if (GetContactProto((HANDLE)lParam) == 0) + if (GetContactProto((HCONTACT)lParam) == 0) return 0; OPTIONSDIALOGPAGE odp = { sizeof(odp) }; -- cgit v1.2.3