summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-29 18:49:19 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-29 18:49:19 +0300
commit703f9873a6ba22dacf3622ea8297293d4f72b869 (patch)
tree1aa46ac7d7f5736586abdc15f2170543c9513acb
parent7091bdb006d885884e2151da398fb2819e7ed49a (diff)
mir_app: unused trash removed
-rw-r--r--src/mir_app/res/resource.rc41
-rw-r--r--src/mir_app/src/clui.cpp30
-rw-r--r--src/mir_app/src/menu_groups.cpp20
-rw-r--r--src/mir_app/src/resource.h9
-rw-r--r--src/mir_app/src/searchresults.cpp2
-rw-r--r--src/mir_app/src/srmm_log_rtf.cpp2
6 files changed, 18 insertions, 86 deletions
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index bc272747c6..9aaf8b1a00 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -1674,51 +1674,14 @@ IDC_DROPUSER CURSOR "cursor_drop_user.cur"
IDR_CONTEXT MENU
BEGIN
- POPUP "Tray"
- BEGIN
- MENUITEM "&Hide/Show", ID_TRAY_HIDE
- MENUITEM SEPARATOR
- MENUITEM "E&xit", ID_TRAY_EXIT
- END
- POPUP "Nowhere"
- BEGIN
- MENUITEM "&New group", POPUP_NEWGROUP
- MENUITEM SEPARATOR
- MENUITEM "&Hide offline users", POPUP_HIDEOFFLINE
- MENUITEM "Hide &offline users out here", POPUP_HIDEOFFLINEROOT
- MENUITEM "Hide &empty groups", POPUP_HIDEEMPTYGROUPS
- MENUITEM "Disable &groups", POPUP_DISABLEGROUPS
- MENUITEM SEPARATOR
- MENUITEM "Hide Miranda", POPUP_HIDEMIRANDA
- END
- POPUP "Group"
- BEGIN
- MENUITEM "&New subgroup", POPUP_NEWSUBGROUP
- MENUITEM "&Hide offline users in here", POPUP_GROUPHIDEOFFLINE
- MENUITEM SEPARATOR
- MENUITEM "&Rename group", POPUP_RENAMEGROUP
- MENUITEM "&Delete group", POPUP_DELETEGROUP
- END
- POPUP "IconOptions"
- BEGIN
- MENUITEM "&Reset to default", ID_RESET
- END
- POPUP "find/add"
+ POPUP ""
BEGIN
MENUITEM "&Add to list", IDC_ADD
MENUITEM SEPARATOR
MENUITEM "User &details", IDC_DETAILS
MENUITEM "Send &message", IDM_SENDMESSAGE
END
- POPUP "Log"
- BEGIN
- MENUITEM "&Copy", IDM_COPY
- MENUITEM "Co&py all", IDM_COPYALL
- MENUITEM "Select &all", IDM_SELECTALL
- MENUITEM SEPARATOR
- MENUITEM "C&lear log", IDM_CLEAR
- END
- POPUP "LogLink"
+ POPUP ""
BEGIN
MENUITEM "&Open link", IDM_OPENLINK
MENUITEM "&Copy link", IDM_COPYLINK
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 39e41e41b3..70e474ce63 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -683,40 +683,10 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
switch (LOWORD(wParam)) {
- case ID_TRAY_EXIT:
case ID_ICQ_EXIT:
if (Miranda_OkToExit())
DestroyWindow(hwnd);
break;
-
- case ID_TRAY_HIDE:
- g_clistApi.pfnShowHide();
- break;
-
- case POPUP_NEWGROUP:
- SendMessage(g_clistApi.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, 0, 0);
- Clist_GroupCreate(0, nullptr);
- break;
-
- case POPUP_HIDEOFFLINE:
- g_clistApi.pfnSetHideOffline(-1);
- break;
-
- case POPUP_HIDEOFFLINEROOT:
- CallService(MS_CLIST_TOGGLEHIDEOFFLINEROOT, 0, 0);
- break;
-
- case POPUP_HIDEEMPTYGROUPS:
- CallService(MS_CLIST_TOGGLEEMPTYGROUPS);
- break;
-
- case POPUP_DISABLEGROUPS:
- CallService(MS_CLIST_TOGGLEGROUPS);
- break;
-
- case POPUP_HIDEMIRANDA:
- g_clistApi.pfnShowHide();
- break;
}
return FALSE;
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp
index dff0814e47..30debefb3d 100644
--- a/src/mir_app/src/menu_groups.cpp
+++ b/src/mir_app/src/menu_groups.cpp
@@ -295,21 +295,21 @@ void InitGroupMenus(void)
CreateServiceFunction(mi.pszService, HideOfflineHelper);
SET_UID(mi, 0xeded7371, 0xf6e6, 0x48c3, 0x8c, 0x9e, 0x62, 0xc1, 0xd5, 0xcb, 0x51, 0xbc);
- mi.position = 500002;
+ mi.position++;
mi.pszService = MS_CLIST_TOGGLEHIDEOFFLINEROOT;
mi.name.a = LPGEN("Hide offline users out here");
hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
CreateServiceFunction(mi.pszService, HideOfflineRootHelper);
SET_UID(mi, 0x4c17b9cf, 0x513a, 0x41d8, 0x8d, 0x2b, 0x89, 0x44, 0x81, 0x14, 0x0, 0x91);
- mi.position = 500003;
+ mi.position++;
mi.pszService = MS_CLIST_TOGGLEEMPTYGROUPS;
mi.name.a = LPGEN("Hide empty groups");
hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
CreateServiceFunction(mi.pszService, HideGroupsHelper);
SET_UID(mi, 0xfcbdbbb1, 0xa553, 0x49ac, 0xa5, 0xdf, 0xb4, 0x81, 0x38, 0xf, 0xa0, 0xc7);
- mi.position = 500004;
+ mi.position++;
mi.pszService = MS_CLIST_TOGGLEGROUPS;
mi.name.a = LPGEN("Disable groups");
hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
@@ -337,18 +337,24 @@ void InitGroupMenus(void)
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
{
CMenuItem mi(&g_plugin);
+ mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
+ CreateServiceFunction(mi.pszService, GroupMenuExecProxy);
SET_UID(mi, 0xd208f1d2, 0x7220, 0x4d37, 0xb6, 0xe4, 0xd5, 0x4a, 0xe8, 0xa3, 0xf4, 0x53);
mi.position = 1000;
+ mi.name.a = LPGEN("New group");
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
+ gmp.wParam = POPUP_NEWGROUP;
+ Menu_AddSubGroupMenuItem(&mi, &gmp);
+
+ SET_UID(mi, 0x24bcb592, 0x660e, 0x4541, 0xa0, 0xac, 0x11, 0x4a, 0x23, 0xc8, 0x9b, 0x91);
+ mi.position++;
mi.name.a = LPGEN("New subgroup");
gmp.wParam = POPUP_NEWSUBGROUP;
Menu_AddSubGroupMenuItem(&mi, &gmp);
- CreateServiceFunction(mi.pszService, GroupMenuExecProxy);
SET_UID(mi, 0xd85f5ff0, 0x12ca, 0x464d, 0x86, 0x51, 0x53, 0x36, 0x9f, 0x1d, 0x80, 0x45);
- mi.position = 1001;
+ mi.position++;
mi.hIcolibItem = nullptr;
mi.name.a = LPGEN("Hide offline users in here");
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
@@ -362,7 +368,7 @@ void InitGroupMenus(void)
Menu_AddSubGroupMenuItem(&mi, &gmp);
SET_UID(mi, 0xb0d63cda, 0xa743, 0x4cfa, 0xa6, 0x2d, 0x50, 0xc0, 0x90, 0xe7, 0x6a, 0xc4);
- mi.position = 900002;
+ mi.position++;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.name.a = LPGEN("Delete group");
gmp.wParam = POPUP_DELETEGROUP;
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index db1ba527c4..d3bd1a71b9 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -664,24 +664,17 @@
#define ID_ICQ_EXIT 40001
#define IDM_COPY 40001
#define ID_RESET 40002
-#define POPUP_HIDEEMPTYGROUPS 40003
+#define POPUP_NEWGROUP 40003
#define POPUP_NEWSUBGROUP 40004
-#define POPUP_HIDEOFFLINE 40005
#define POPUP_GROUPHIDEOFFLINE 40006
-#define POPUP_HIDEOFFLINEROOT 40007
-#define POPUP_DISABLEGROUPS 40008
#define IDM_SENDMESSAGE 40009
#define IDM_COPYALL 40011
#define IDM_SELECTALL 40012
#define IDM_CLEAR 40013
#define IDM_OPENLINK 40014
#define IDM_COPYLINK 40015
-#define POPUP_HIDEMIRANDA 40017
#define ID_CANCELCHANGE 40018
#define POPUP_GROUPSHOWOFFLINE 40019
-#define ID_TRAY_HIDE 40038
-#define ID_TRAY_EXIT 40040
-#define POPUP_NEWGROUP 40050
#define POPUP_RENAMEGROUP 40052
#define POPUP_DELETEGROUP 40053
#define ID_GROUP 40066
diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp
index 9968333c6e..107a9fd610 100644
--- a/src/mir_app/src/searchresults.cpp
+++ b/src/mir_app/src/searchresults.cpp
@@ -339,7 +339,7 @@ void ShowMoreOptionsMenu(HWND hwndDlg, int x, int y)
ListSearchResult *lsr = (ListSearchResult*)lvi.lParam;
HMENU hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hPopupMenu = GetSubMenu(hMenu, 4);
+ HMENU hPopupMenu = GetSubMenu(hMenu, 0);
TranslateMenu(hPopupMenu);
int commandId = TrackPopupMenu(hPopupMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, x, y, 0, hwndDlg, nullptr);
switch (commandId) {
diff --git a/src/mir_app/src/srmm_log_rtf.cpp b/src/mir_app/src/srmm_log_rtf.cpp
index 94174b7dce..c4de8f7e20 100644
--- a/src/mir_app/src/srmm_log_rtf.cpp
+++ b/src/mir_app/src/srmm_log_rtf.cpp
@@ -259,7 +259,7 @@ INT_PTR CRtfLogWindow::Notify(WPARAM, LPARAM lParam)
if (pLink->msg == WM_RBUTTONDOWN) {
HMENU hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hSubMenu = GetSubMenu(hMenu, 6);
+ HMENU hSubMenu = GetSubMenu(hMenu, 1);
TranslateMenu(hSubMenu);
POINT pt = { GET_X_LPARAM(pLink->lParam), GET_Y_LPARAM(pLink->lParam) };