From 46d6faf9f85dd25661ace8bca83df522033a83f4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Apr 2018 20:32:16 +0300 Subject: CLIST_INTERFACE::pfnDeleteFromContactList => Clist_DeleteFromContactList --- src/mir_app/src/clc.cpp | 2 +- src/mir_app/src/clc.h | 3 +-- src/mir_app/src/clcutils.cpp | 4 +++- src/mir_app/src/clistcore.cpp | 3 +-- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 7f51e96655..a39309ef12 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -706,7 +706,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam return 0; case VK_F2: cli.pfnBeginRenameSelection(hwnd, dat); return 0; - case VK_DELETE: cli.pfnDeleteFromContactList(hwnd, dat); return 0; + case VK_DELETE: Clist_DeleteFromContactList(hwnd, dat); return 0; default: NMKEY nmkey; diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index aaad1821d6..3889fd56aa 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -84,9 +84,8 @@ void fnSetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState); void fnDoSelectionDefaultAction(HWND hwnd, ClcData *dat); int fnFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk); void fnEndRename(HWND hwnd, ClcData *dat, int save); -void fnDeleteFromContactList(HWND hwnd, ClcData *dat); -void fnBeginRenameSelection(HWND hwnd, ClcData *dat); +void fnBeginRenameSelection(HWND hwnd, ClcData *dat); void fnGetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour); void fnLoadClcOptions(HWND hwnd, ClcData *dat, BOOL bFirst); void fnSetContactCheckboxes(ClcContact *cc, int checked); diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index db1c428865..79ed8b3af9 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -449,14 +449,16 @@ void fnEndRename(HWND, ClcData *dat, int save) DestroyWindow(hwndEdit); } -void fnDeleteFromContactList(HWND hwnd, ClcData *dat) +MIR_APP_DLL(void) Clist_DeleteFromContactList(HWND hwnd, ClcData *dat) { ClcContact *contact; if (dat->selection == -1) return; + dat->szQuickSearch[0] = 0; if (cli.pfnGetRowByIndex(dat, dat->selection, &contact, nullptr) == -1) return; + switch (contact->type) { case CLCIT_GROUP: Clist_GroupDelete(contact->groupId); diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index ebc853fcf0..a7f1bc9572 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -101,9 +101,8 @@ void InitClistCore() cli.pfnDoSelectionDefaultAction = fnDoSelectionDefaultAction; cli.pfnFindRowByText = fnFindRowByText; cli.pfnEndRename = fnEndRename; - cli.pfnDeleteFromContactList = fnDeleteFromContactList; + cli.pfnBeginRenameSelection = fnBeginRenameSelection; - cli.pfnIsVisibleContact = fnIsVisibleContact; cli.pfnGetDefaultFontSetting = fnGetDefaultFontSetting; cli.pfnLoadClcOptions = fnLoadClcOptions; diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 34b277c764..e999a3c97d 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -567,3 +567,4 @@ Clist_HideInfoTip @586 Clist_IsHiddenMode @587 Clist_ClcStatusToPf2 @588 Clist_CalcEipPosition @589 +Clist_DeleteFromContactList @590 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 2d23da50be..bc5d92f576 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -567,3 +567,4 @@ Clist_HideInfoTip @586 Clist_IsHiddenMode @587 Clist_ClcStatusToPf2 @588 Clist_CalcEipPosition @589 +Clist_DeleteFromContactList @590 -- cgit v1.2.3