summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-13 11:40:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-13 11:40:17 +0300
commit1aecfbf8295912ccfc26bdbd9d745aed96966e66 (patch)
tree0032ec38ed3a3efeb0b7bd2dfb9c3c70e3c75c83 /src/mir_app
parentfcd8fed654606c80c4ec8a0f6718ba62de331e95 (diff)
UI classes & core code cleaning:
- MS_CLIST_DELETECONTACT introduced to avoid the usage of string constants directly; - start menu item id parameter added to Clist_GroupBuildMenu(); - CNF_MAX macro added to simplify cycles over CNF_* array; - custom draw support for CCtrlListView & CCtrlTreeView; - Miranda's specific WM_MEASUREITEM & WM_DRAWITEM processing in CDlgBase
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/clcutils.cpp2
-rw-r--r--src/mir_app/src/clistgroups.cpp4
-rw-r--r--src/mir_app/src/clui.cpp2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 8edb3231bd..9147c6e75a 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -445,7 +445,7 @@ MIR_APP_DLL(void) Clist_DeleteFromContactList(HWND hwnd, ClcData *dat)
Clist_GroupDelete(contact->groupId);
break;
case CLCIT_CONTACT:
- CallService("CList/DeleteContactCommand", (WPARAM)contact->hContact, (LPARAM)hwnd);
+ CallService(MS_CLIST_DELETECONTACT, (WPARAM)contact->hContact, (LPARAM)hwnd);
break;
}
}
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp
index efba13cccb..22dc25f11a 100644
--- a/src/mir_app/src/clistgroups.cpp
+++ b/src/mir_app/src/clistgroups.cpp
@@ -448,13 +448,11 @@ MIR_APP_DLL(void) Clist_SetGroup(MCONTACT hContact, const wchar_t *pwszName)
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(HMENU) Clist_GroupBuildMenu()
+MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(int nextMenuId)
{
if (arByIds.getCount() == 0)
return nullptr;
- int nextMenuId = 100;
-
HMENU hRootMenu = CreateMenu();
for (int i = 0; i < arByIds.getCount(); i++) {
const wchar_t *pNextField = arByIds[i]->groupName + 1;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 0aabd2f7f1..d7a78df9f3 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -340,7 +340,7 @@ int LoadCLUIModule(void)
mi.position = 2000070000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.name.a = LPGEN("De&lete");
- mi.pszService = "CList/DeleteContactCommand";
+ mi.pszService = MS_CLIST_DELETECONTACT;
Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, MenuItem_DeleteContact);