diff options
41 files changed, 305 insertions, 721 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib Binary files differindex 3ac3835abb..19869f9fa4 100644 --- a/bin10/lib/mir_app.lib +++ b/bin10/lib/mir_app.lib diff --git a/bin10/lib/mir_app64.lib b/bin10/lib/mir_app64.lib Binary files differindex a08cb40c9b..1bb2a3b765 100644 --- a/bin10/lib/mir_app64.lib +++ b/bin10/lib/mir_app64.lib diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib Binary files differindex 3ac3835abb..19869f9fa4 100644 --- a/bin12/lib/mir_app.lib +++ b/bin12/lib/mir_app.lib diff --git a/bin12/lib/mir_app64.lib b/bin12/lib/mir_app64.lib Binary files differindex a08cb40c9b..1bb2a3b765 100644 --- a/bin12/lib/mir_app64.lib +++ b/bin12/lib/mir_app64.lib diff --git a/include/m_clist.h b/include/m_clist.h index 1f2776dda3..24db9715a1 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -157,6 +157,9 @@ EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, Group // returns a HMENU identifying the menu.
EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildTrayMenu(void);
+// destroys a tray menu
+MIR_APP_DLL(void) Menu_DestroyNestedMenu(HMENU hMenu);
+
// adds a new item to the tray menus
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddTrayMenuItem(TMO_MenuItem *pmi);
diff --git a/include/m_skin.h b/include/m_skin.h index 46e7d06299..a8f51a2261 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -93,6 +93,7 @@ extern int hLangpack; #define SKINICON_AUTH_REQUEST 248
#define SKINICON_AUTH_GRANT 249
#define SKINICON_AUTH_REVOKE 250
+#define SKINICON_OTHER_GROUPADD 251
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda skin
diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc index 70f0e758e6..56dfa30b88 100644 --- a/plugins/Clist_modern/res/resource.rc +++ b/plugins/Clist_modern/res/resource.rc @@ -29,7 +29,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // remains consistent on all systems.
IDI_HIDE_AVATAR ICON "hide_avatar.ico"
IDI_SHOW_AVATAR ICON "show_avatar.ico"
-IDI_NEWGROUP2 ICON "addgroup.ico"
IDI_LISTENING_TO ICON "listening_to.ico"
IDI_FAVORITE_0 ICON "rate_none.ico"
IDI_FAVORITE_1 ICON "rate_low.ico"
@@ -937,37 +936,6 @@ BEGIN END
END
-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 "&Show offline users in here", POPUP_GROUPSHOWOFFLINE
- MENUITEM SEPARATOR
- MENUITEM "&Rename group", POPUP_RENAMEGROUP
- MENUITEM "&Delete group", POPUP_DELETEGROUP
- END
-END
-
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp index c5b7781bb8..b557ba1f75 100644 --- a/plugins/Clist_modern/src/groupmenu.cpp +++ b/plugins/Clist_modern/src/groupmenu.cpp @@ -29,17 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////// Group MENU //////////////////////////////
-HGENMENU hGroupMainMenuItemProxy;
-HGENMENU hHideShowMainMenuItem;
-HGENMENU hGroupStatusMenuItemProxy;
-
-HGENMENU hHideOfflineUsersMenuItem;
-HGENMENU hHideOfflineUsersOutHereMenuItem;
-HGENMENU hHideEmptyGroupsMenuItem;
-
-HGENMENU hDisableGroupsMenuItem;
-HGENMENU hNewGroupMenuItem;
-HGENMENU hNewSubGroupMenuItem;
+HGENMENU hGroupMainMenuItemProxy, hGroupStatusMenuItemProxy;
void InitSubGroupMenus(void);
@@ -49,11 +39,6 @@ INT_PTR GroupMenuOnAddService(WPARAM wParam, LPARAM lParam) if (mii == NULL)
return 0;
- if (hHideShowMainMenuItem == (HANDLE)lParam) {
- mii->fMask |= MIIM_STATE;
- mii->fState |= MFS_DEFAULT;
-
- }
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
mii->hSubMenu = Menu_GetMainMenu();
@@ -67,91 +52,19 @@ INT_PTR GroupMenuOnAddService(WPARAM wParam, LPARAM lParam) return TRUE;
}
-INT_PTR HideGroupsHelper(WPARAM, LPARAM)
-{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
- db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)newVal);
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
- return 0;
-}
-
-INT_PTR UseGroupsHelper(WPARAM, LPARAM)
-{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- db_set_b(NULL, "CList", "UseGroups", (BYTE)newVal);
- SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
- return 0;
-}
-
-INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
-{
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT,
- !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0),
- 0);
- return 0;
-}
-
-INT_PTR CreateGroupHelper(WPARAM, LPARAM)
-{
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, 0, 0);
- SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, 1, 0);
- Clist_CreateGroup(0, 0);
- return 0;
-};
-
-static int OnBuildGroupMenu(WPARAM, LPARAM)
-{
- if (MirandaExiting()) return 0;
-
- int flags = db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CMIF_CHECKED : 0;
- Menu_ModifyItem(hHideOfflineUsersMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
-
- flags = SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? CMIF_CHECKED : 0;
- Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
-
- flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? CMIF_CHECKED : 0;
- Menu_ModifyItem(hHideEmptyGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
-
- flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? 0 : CMIF_CHECKED;
- Menu_ModifyItem(hDisableGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
- return 0;
-}
-
-static IconItemT iconItem[] =
-{
- { LPGENT("New group"), "NewGroup", IDI_NEWGROUP2 }
-};
-
-void GroupMenus_Init(void)
-{
- Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
-}
-
void InitGroupMenus(void)
{
CreateServiceFunction("CLISTMENUSGroup/GroupMenuOnAddService", GroupMenuOnAddService);
- CreateServiceFunction("CLISTMENUSGroup/HideGroupsHelper", HideGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/UseGroupsHelper", UseGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper", HideOfflineRootHelper);
- CreateServiceFunction("CLISTMENUSGroup/CreateGroupHelper", CreateGroupHelper);
-
- HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
InitSubGroupMenus();
// add exit command to menu
CMenuItem mi;
- mi.position = 1900000;
- mi.pszService = "CloseAction";
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.name.a = LPGEN("E&xit");
- Menu_AddGroupMenuItem(&mi);
-
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
- hHideShowMainMenuItem = Menu_AddGroupMenuItem(&mi);
+ Menu_AddGroupMenuItem(&mi);
mi.position = 200000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
@@ -177,121 +90,45 @@ void InitGroupMenus(void) mi.name.a = LPGEN("&Options...");
Menu_AddGroupMenuItem(&mi);
- mi.position = 500000;
+ mi.position = 1000000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.name.a = LPGEN("&About");
Menu_AddGroupMenuItem(&mi);
-
- GroupMenuParam gmp = {};
- mi.flags = 0;
- mi.position = 100000;
- mi.hIcolibItem = iconItem[0].hIcolib;
- mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
- mi.name.a = LPGEN("&New group");
- hNewGroupMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
- DestroyIcon_protect((HICON)mi.hIcolibItem);
-
- mi.position = 100001;
- mi.hIcolibItem = NULL;
- mi.hIcolibItem = NULL;
- mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.name.a = LPGEN("&Hide offline users");
- gmp.wParam = -1;
- hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
-
- mi.position = 100002;
- mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.name.a = LPGEN("Hide &offline users out here");
- hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
-
- mi.position = 100003;
- mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.name.a = LPGEN("Hide &empty groups");
- hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
-
- mi.position = 100004;
- mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.name.a = LPGEN("Disable &groups");
- hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
}
/////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////// SubGroup MENU //////////////////////////////
-HGENMENU hHideOfflineUsersHereMenuItem, hShowOfflineUsersHereMenuItem;
+static HGENMENU hShowOfflineUsersHereMenuItem;
// wparam menu handle to pass to clc.c
// lparam WM_COMMAND HWND
static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
{
- BOOL gray1 = FALSE;
- BOOL gray2 = FALSE;
- BOOL showOfflineinGroup = FALSE;
-
ClcGroup *group = (ClcGroup *)wParam;
- if (wParam == 0) return 0;
-
- if (MirandaExiting()) return 0;
- //contact->group
-
- showOfflineinGroup = CLCItems_IsShowOfflineGroup(group);
- gray1 = (showOfflineinGroup != FALSE);
- gray2 = (group->hideOffline != FALSE);
-
- if (gray1 && gray2) gray1 = FALSE; //should not be cause CLCItems_IsShowOfflineGroup return false if group->hideOffline
-
- Menu_EnableItem(hHideOfflineUsersHereMenuItem, !gray1);
- Menu_SetChecked(hHideOfflineUsersHereMenuItem, group->hideOffline && !gray1);
-
- Menu_EnableItem(hShowOfflineUsersHereMenuItem, !gray2);
- Menu_SetChecked(hShowOfflineUsersHereMenuItem, showOfflineinGroup && !gray2);
- return 0;
-}
+ if (wParam == 0)
+ return 0;
-INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM)
-{
- MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
- if (mii == NULL)
+ if (MirandaExiting())
return 0;
- return TRUE;
-}
+ bool showOfflineinGroup = CLCItems_IsShowOfflineGroup(group);
+ bool gray2 = group->hideOffline == 0;
-INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam)
-{
- SendMessage(lParam ? (HWND)lParam : (HWND)pcli->hwndContactTree, WM_COMMAND, wParam, 0);
+ Menu_EnableItem(hShowOfflineUsersHereMenuItem, gray2);
+ Menu_SetChecked(hShowOfflineUsersHereMenuItem, showOfflineinGroup && gray2);
return 0;
}
void InitSubGroupMenus(void)
{
- CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuOnAddService", SubGroupMenuonAddService);
- CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);
-
HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);
// add exit command to menu
GroupMenuParam gmp;
CMenuItem mi;
- mi.position = 1000;
- mi.hIcolibItem = iconItem[0].hIcolib;
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&New subgroup");
- gmp.lParam = 0;
- gmp.wParam = POPUP_NEWSUBGROUP;
- hNewSubGroupMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- mi.position = 1001;
- mi.hIcolibItem = NULL;
- mi.hIcolibItem = NULL;
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Hide offline users in here");
- gmp.lParam = 0;
- gmp.wParam = POPUP_GROUPHIDEOFFLINE;
- hHideOfflineUsersHereMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);
-
mi.position = 1002;
mi.hIcolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
@@ -299,21 +136,4 @@ void InitSubGroupMenus(void) gmp.lParam = 0;
gmp.wParam = POPUP_GROUPSHOWOFFLINE;
hShowOfflineUsersHereMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- memset(&mi, 0, sizeof(mi));
- mi.position = 900001;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Rename group");
- gmp.lParam = 0;
- gmp.wParam = POPUP_RENAMEGROUP;
- Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- mi.position = 900002;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Delete group");
- gmp.lParam = 0;
- gmp.wParam = POPUP_DELETEGROUP;
- Menu_AddSubGroupMenuItem(&mi, &gmp);
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index c7753ca7a1..58843ea517 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -285,13 +285,14 @@ void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem) ClearRowByIndexCache(); } -BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group) +bool CLCItems_IsShowOfflineGroup(ClcGroup *group) { + if (!group) return false; + if (group->hideOffline) return false; + DWORD groupFlags = 0; - if (!group) return FALSE; - if (group->hideOffline) return FALSE; pcli->pfnGetGroupName(group->groupId, &groupFlags); - return (groupFlags&GROUPF_SHOWOFFLINE) != 0; + return (groupFlags & GROUPF_SHOWOFFLINE) != 0; } MCONTACT SaveSelection(ClcData *dat) diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 409b4eb300..79faa36b59 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -47,8 +47,6 @@ int EventsProcessContactDoubleClick(MCONTACT hContact); INT_PTR TrayIconPauseAutoHide(WPARAM wParam, LPARAM lParam);
-void InitTrayMenus(void);
-
// returns normal icon or combined with status overlay. Needs to be destroyed.
HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status)
@@ -182,8 +180,7 @@ HRESULT CluiLoadModule() CreateServiceFunction(MS_CLIST_SETUSEGROUPS, SetUseGroups);
InitCustomMenus();
- InitTrayMenus();
-
+
CLUI::InitClui();
return S_OK;
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 9c3a3d0250..38f12b14e3 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -29,10 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "modern_statusbar.h"
#include <m_protoint.h>
-HGENMENU hTrayMainMenuItemProxy, hTrayStatusMenuItemProxy, hTrayHideShowMainMenuItem;
int g_mutex_bOnTrayRightClick = 0;
BOOL g_bMultiConnectionMode = FALSE;
-static HMENU hMainMenu, hStatusMenu;
BOOL IS_WM_MOUSE_DOWN_IN_TRAY;
BOOL g_trayTooltipActive = FALSE;
POINT tray_hover_pos = { 0 };
@@ -143,17 +141,6 @@ int cliTrayIconPauseAutoHide(WPARAM, LPARAM) return 0;
}
-void DestroyTrayMenu(HMENU hMenu)
-{
- int cnt = GetMenuItemCount(hMenu);
- for (int i = 0; i < cnt; ++i) {
- HMENU hSubMenu = GetSubMenu(hMenu, i);
- if (hSubMenu && ((hSubMenu == hStatusMenu) || (hSubMenu == hMainMenu)))
- RemoveMenu(hMenu, i--, MF_BYPOSITION);
- }
- DestroyMenu(hMenu);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Tray event handler
@@ -169,7 +156,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) case TIM_CALLBACK:
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT)) {
POINT pt;
- HMENU hMenu = (HMENU)Menu_GetStatusMenu();
+ HMENU hMenu = Menu_GetStatusMenu();
g_mutex_bOnTrayRightClick = 1;
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
SetForegroundWindow(msg->hwnd);
@@ -184,20 +171,6 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) else if (msg->lParam == WM_MBUTTONDOWN || msg->lParam == WM_LBUTTONDOWN || msg->lParam == WM_RBUTTONDOWN) {
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
}
- else if (msg->lParam == WM_RBUTTONUP) {
- HMENU hMenu = Menu_BuildTrayMenu();
- g_mutex_bOnTrayRightClick = 1;
-
- SetForegroundWindow(msg->hwnd);
- SetFocus(msg->hwnd);
-
- POINT pt;
- GetCursorPos(&pt);
- pcli->bTrayMenuOnScreen = TRUE;
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, msg->hwnd, NULL);
- DestroyTrayMenu(hMenu);
- PostMessage(msg->hwnd, WM_NULL, 0, 0);
- }
else break;
*((LRESULT*)lParam) = 0;
return TRUE;
@@ -228,79 +201,6 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// Tray module init
-INT_PTR TrayMenuOnAddService(WPARAM wParam, LPARAM lParam)
-{
- MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
- if (mii == NULL)
- return 0;
-
- if (hTrayMainMenuItemProxy == (HGENMENU)lParam) {
- mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = Menu_GetMainMenu();
- }
-
- if (hTrayStatusMenuItemProxy == (HGENMENU)lParam) {
- mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
- }
-
- return TRUE;
-}
-
-void InitTrayMenus(void)
-{
- CreateServiceFunction("CLISTMENUSTRAY/TrayMenuOnAddService", TrayMenuOnAddService);
-
- // add exit command to menu
- CMenuItem mi;
- mi.position = 900000;
- mi.pszService = "CloseAction";
- mi.name.a = LPGEN("E&xit");
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- Menu_AddTrayMenuItem(&mi);
-
- mi.flags = CMIF_DEFAULT;
- mi.position = 100000;
- mi.pszService = MS_CLIST_SHOWHIDE;
- mi.name.a = LPGEN("&Hide/show");
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
- hTrayHideShowMainMenuItem = Menu_AddTrayMenuItem(&mi);
-
- mi.flags = 0;
- mi.position = 200000;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
- mi.pszService = "FindAdd/FindAddCommand";
- mi.name.a = LPGEN("&Find/add contacts...");
- Menu_AddTrayMenuItem(&mi);
-
- mi.position = 300000;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
- mi.pszService = "FakeService_1";
- mi.name.a = LPGEN("&Main menu");
- hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);
-
- mi.position = 300100;
- mi.pszService = "FakeService_2";
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
- mi.name.a = LPGEN("&Status");
- hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);
-
- mi.position = 400000;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
- mi.pszService = "Options/OptionsCommand";
- mi.name.a = LPGEN("&Options...");
- Menu_AddTrayMenuItem(&mi);
-
- mi.position = 500000;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
- mi.pszService = "Help/AboutCommand";
- mi.name.a = LPGEN("&About");
- Menu_AddTrayMenuItem(&mi);
-
- hMainMenu = Menu_GetMainMenu();
- hStatusMenu = Menu_GetStatusMenu();
-}
-
VOID CALLBACK cliTrayCycleTimerProc(HWND, UINT, UINT_PTR, DWORD)
{
if (!pcli->trayIconCount)
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 9a73b66c63..f320d043e8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -56,7 +56,6 @@ int MetaStatusChanged(WPARAM, LPARAM); HRESULT(WINAPI *g_proc_DWMEnableBlurBehindWindow)(HWND hWnd, DWM_BLURBEHIND *pBlurBehind);
BOOL CALLBACK ProcessCLUIFrameInternalMsg(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& result);
-void DestroyTrayMenu(HMENU hMenu);
// new sources
#include <crtdbg.h>
@@ -221,11 +220,9 @@ INT_PTR CLUI::Service_ShowMainMenu(WPARAM, LPARAM) INT_PTR CLUI::Service_ShowStatusMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)Menu_GetStatusMenu();
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
@@ -255,7 +252,7 @@ HRESULT CLUI::CreateCluiFrames() mii.hSubMenu = Menu_GetMainMenu();
SetMenuItemInfo(g_hMenuMain, 0, TRUE, &mii);
- mii.hSubMenu = (HMENU)Menu_GetStatusMenu();
+ mii.hSubMenu = Menu_GetStatusMenu();
SetMenuItemInfo(g_hMenuMain, 1, TRUE, &mii);
CreateCLCWindow(pcli->hwndContactList);
@@ -284,9 +281,6 @@ m_hDwmapiDll(NULL) CLUIServices_LoadModule();
- // Call InitGroup menus before
- GroupMenus_Init();
-
CreateServiceFunction(MS_CLUI_SHOWMAINMENU, Service_ShowMainMenu);
CreateServiceFunction(MS_CLUI_SHOWSTATUSMENU, Service_ShowStatusMenu);
@@ -2432,7 +2426,7 @@ LRESULT CLUI::OnContextMenu(UINT, WPARAM, LPARAM lParam) if (PtInRect(&rc, pt)) {
HMENU hMenu = Menu_BuildGroupMenu();
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, m_hWnd, NULL);
- DestroyTrayMenu(hMenu);
+ Menu_DestroyNestedMenu(hMenu);
}
return FALSE;
}
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index dc07bbc5ba..790ce5c7c2 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -75,7 +75,7 @@ typedef INT_PTR(*PSYNCCALLBACKPROC)(WPARAM, LPARAM); /* CLCItems */
-BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group);
+bool CLCItems_IsShowOfflineGroup(ClcGroup* group);
/* CListMod */
int CListMod_HideWindow();
diff --git a/plugins/Clist_modern/src/modern_static_clui.h b/plugins/Clist_modern/src/modern_static_clui.h index 8aea29123b..4795892b8f 100644 --- a/plugins/Clist_modern/src/modern_static_clui.h +++ b/plugins/Clist_modern/src/modern_static_clui.h @@ -73,8 +73,6 @@ int EventArea_Create(HWND hCluiWnd); int ExtraImage_ExtraIDToColumnNum(int extra); -void GroupMenus_Init(); - int ModernSkinButtonLoadModule(); int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT *r); diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 793fffc989..b3d6537c91 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -834,10 +834,10 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa if (a ^ bShift)
hMenu = Menu_GetMainMenu();
else
- hMenu = (HMENU)Menu_GetStatusMenu();
+ hMenu = Menu_GetStatusMenu();
}
else {
- hMenu = (HMENU)Menu_GetStatusMenu();
+ hMenu = Menu_GetStatusMenu();
HMENU hSubMenu = GetSubMenu(hMenu, p.iProtoPos);
if (hSubMenu)
hMenu = hSubMenu;
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index 7fbac92156..c8b30bff2f 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -17,7 +17,6 @@ #define IDI_OPTIONS 163
#define IDI_RENAME 173
#define IDI_DELETE 175
-#define IDR_CONTEXT 180
#define IDC_DROP 183
#define IDI_SENDEMAIL 193
#define IDR_CLISTMENU 199
@@ -63,7 +62,6 @@ #define IDD_OPT_SKIN 251
#define IDD_OPT_META_CLC 279
#define IDI_ACCMGR 281
-#define IDI_NEWGROUP2 283
#define IDD_MODERNOPTS 288
#define IDC_DEFAULTSUB 293
#define IDC_DROPMETA 295
diff --git a/plugins/Clist_nicer/res/addgroup.ico b/plugins/Clist_nicer/res/addgroup.ico Binary files differdeleted file mode 100644 index 539c32fcd9..0000000000 --- a/plugins/Clist_nicer/res/addgroup.ico +++ /dev/null diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 28fbc2cd53..e37a5911d5 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -537,7 +537,6 @@ END // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ADDGROUP ICON "addgroup.ico"
IDI_CLIST ICON "clist.ico"
IDI_DELETE ICON "delete.ico"
IDI_CLVM_OPTIONS ICON "options_clvm.ico"
@@ -601,47 +600,6 @@ BEGIN END
END
-IDR_CONTEXT MENU
-BEGIN
- POPUP "Tray"
- BEGIN
- MENUITEM "&Hide/Show", 40038
- 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 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
- MENUITEM SEPARATOR
- MENUITEM "Move marked contacts to this group", POPUP_MOVEMARKEDHERE, GRAYED
- END
- POPUP "Appearance"
- BEGIN
- MENUITEM "Show status icons", POPUP_SHOWSTATUSICONS
- MENUITEM "Show metacontact protocol icons", POPUP_SHOWMETAICONS
- MENUITEM SEPARATOR
- MENUITEM "Show additional buttons", POPUP_BUTTONS
- MENUITEM "Draw sunken frame", POPUP_FRAME
- END
-END
-
-
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index abaf6cda54..61e0570f26 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -29,23 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma hdrstop
-static HMENU hMainMenu, hMainStatusMenu;
-
-void InitIconLibMenuIcons();
extern IconItemT iconItem[];
-
-void DestroyTrayMenu(HMENU hMenu)
-{
- int i, cnt;
-
- cnt = GetMenuItemCount(hMenu);
- for (i = 0; i < cnt; ++i) {
- HMENU hSubMenu = GetSubMenu(hMenu, i);
- if (hSubMenu == hMainStatusMenu || hSubMenu == hMainMenu)
- RemoveMenu(hMenu, i--, MF_BYPOSITION);
- }
- DestroyMenu(hMenu);
-}
+void InitIconLibMenuIcons();
INT_PTR CloseAction(WPARAM, LPARAM)
{
@@ -384,13 +369,9 @@ int InitCustomMenus(void) CMenuItem mi;
mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
- mi.hIcolibItem = iconItem[1].hIcolib;
+ mi.hIcolibItem = iconItem[0].hIcolib;
mi.name.a = LPGEN("&Contact list settings...");
Menu_AddContactMenuItem(&mi);
-
- hMainStatusMenu = (HMENU)Menu_GetStatusMenu();
- hMainMenu = Menu_GetMainMenu();
-
return 0;
}
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp index d60405fecc..6ef9e834d1 100644 --- a/plugins/Clist_nicer/src/clisttray.cpp +++ b/plugins/Clist_nicer/src/clisttray.cpp @@ -24,9 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-#define TRAYICON_ID_BASE 100
-#define TIM_CALLBACK (WM_USER+1857)
-#define TIM_CREATE (WM_USER+1858)
+#define TRAYICON_ID_BASE 100
extern HIMAGELIST hCListImages;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 80b01a7a48..ec0cf9dc97 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -73,7 +73,6 @@ void InitGroupMenus(); void FS_RegisterFonts(); void LoadExtraIconModule(); void RemoveFromTaskBar(HWND hWnd); -void DestroyTrayMenu(HMENU hMenu); extern LONG g_cxsmIcon, g_cysmIcon; @@ -778,6 +777,8 @@ static void GetButtonRect(HWND hwnd, RECT *rc) LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { + RECT rc; + switch (msg) { case WM_CREATE: { @@ -906,7 +907,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case WM_PAINT: { PAINTSTRUCT ps; - RECT rc, rcFrame, rcClient; + RECT rcFrame, rcClient; HDC hdc; HRGN rgn = 0; HDC hdcReal = BeginPaint(hwnd, &ps); @@ -1022,7 +1023,6 @@ skipbg: case WM_ENTERSIZEMOVE: { - RECT rc; POINT pt = { 0 }; GetWindowRect(hwnd, &g_PreSizeRect); @@ -1098,7 +1098,6 @@ skipbg: if (pcli->hwndContactList != 0) { SendMessage(hwnd, WM_ENTERSIZEMOVE, 0, 0); - RECT rc; GetWindowRect(hwnd, &rc); WINDOWPOS wp = { 0 }; wp.cx = rc.right - rc.left; @@ -1113,7 +1112,6 @@ skipbg: case WM_MOVE: if (!IsIconic(hwnd)) { - RECT rc; GetWindowRect(hwnd, &rc); if (!Docking_IsDocked(0, 0)) { @@ -1123,7 +1121,6 @@ skipbg: } cluiPos.right = rc.right - rc.left; if (cfg::dat.realTimeSaving) { - RECT rc; GetWindowRect(hwnd, &rc); // if docked, dont remember pos (except for width) @@ -1346,9 +1343,8 @@ skipbg: if (cfg::clcdat) { pcli->pfnGetRowByIndex(cfg::clcdat, cfg::clcdat->selection, &contact, NULL); - if (contact && contact->type == CLCIT_CONTACT) { + if (contact && contact->type == CLCIT_CONTACT) hContact = contact->hContact; - } } while (item) { if (item->uId == (DWORD)LOWORD(wParam)) { @@ -1438,26 +1434,17 @@ skipbg: case IDC_TBMENU: case IDC_TBTOPMENU: case IDC_STBTOPMENU: - { - RECT rc; - HMENU hMenu = Menu_GetMainMenu(); - GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc); - TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBMENU ? rc.top : rc.bottom, 0, hwnd, NULL); - } + GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc); + TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBMENU ? rc.top : rc.bottom, 0, hwnd, NULL); return 0; case IDC_TBTOPSTATUS: case IDC_STBTOPSTATUS: case IDC_TBGLOBALSTATUS: - { - RECT rc; - HMENU hmenu = (HMENU)Menu_GetStatusMenu(); - GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc); - TrackPopupMenu(hmenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBGLOBALSTATUS ? rc.top : rc.bottom, 0, hwnd, NULL); - } + GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc); + TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBGLOBALSTATUS ? rc.top : rc.bottom, 0, hwnd, NULL); return 0; - case IDC_TBSOUND: case IDC_STBSOUND: cfg::dat.soundsOff = !cfg::dat.soundsOff; @@ -1613,10 +1600,8 @@ buttons_done: break; case WM_CONTEXTMENU: + GetWindowRect(pcli->hwndContactTree, &rc); { - RECT rc; - GetWindowRect(pcli->hwndContactTree, &rc); - // x/y might be -1 if it was generated by a kb click POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; if (pt.x == -1 && pt.y == -1) { @@ -1631,7 +1616,7 @@ buttons_done: if (PtInRect(&rc, pt)) { HMENU hMenu = Menu_BuildGroupMenu(); TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL); - DestroyTrayMenu(hMenu); + Menu_DestroyNestedMenu(hMenu); return 0; } GetWindowRect(pcli->hwndStatus, &rc); @@ -1640,7 +1625,7 @@ buttons_done: if (cfg::getByte("CLUI", "SBarRightClk", 0)) hMenu = Menu_GetMainMenu(); else - hMenu = (HMENU)Menu_GetStatusMenu(); + hMenu = Menu_GetStatusMenu(); TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL); return 0; } @@ -1924,12 +1909,9 @@ static INT_PTR CLN_ShowMainMenu(WPARAM, LPARAM) static INT_PTR CLN_ShowStatusMenu(WPARAM, LPARAM) { - HMENU hMenu; POINT pt; - - hMenu = (HMENU)Menu_GetStatusMenu(); GetCursorPos(&pt); - TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL); + TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL); return 0; } diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp index a3be204ae6..29700f1415 100644 --- a/plugins/Clist_nicer/src/groupmenu.cpp +++ b/plugins/Clist_nicer/src/groupmenu.cpp @@ -27,34 +27,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////// Group MENU //////////////////////////////
-HGENMENU hGroupMainMenuItemProxy;
-HGENMENU hHideShowMainMenuItem;
-HGENMENU hGroupStatusMenuItemProxy;
-HGENMENU hAppearanceMenuItemProxy;
-HGENMENU hEventAreaMenuItemProxy;
+static HGENMENU hGroupMainMenuItemProxy;
+static HGENMENU hHideShowMainMenuItem;
+static HGENMENU hGroupStatusMenuItemProxy;
+static HGENMENU hEventAreaMenuItemProxy;
-static HMENU hMenuOldContext;
-
-HGENMENU hHideOfflineUsersMenuItem;
-HGENMENU hHideOfflineUsersOutHereMenuItem;
-HGENMENU hHideEmptyGroupsMenuItem;
-HGENMENU hDisableGroupsMenuItem;
-HGENMENU hNewGroupMenuItem;
-HGENMENU hNewSubGroupMenuItem;
+struct
+{
+ char *name;
+ int command, mask, position;
+ HGENMENU hMenu;
+}
+static hAppearanceItems[] =
+{
+ { LPGEN("Show status icons"), POPUP_SHOWSTATUSICONS, CLUI_FRAME_STATUSICONS, 10001 },
+ { LPGEN("Show metacontact protocol icons"), POPUP_SHOWMETAICONS, CLUI_USEMETAICONS, 10002 },
+ { LPGEN("Show additional buttons"), POPUP_BUTTONS, CLUI_FRAME_SHOWBOTTOMBUTTONS, 110001 },
+ { LPGEN("Draw sunken frame"), POPUP_FRAME, CLUI_FRAME_CLISTSUNKEN, 110002 }
+};
-void InitSubGroupMenus(void);
+static HMENU hMenuOldContext;
-INT_PTR GroupMenu_OnAddService(WPARAM wParam, LPARAM lParam)
+static INT_PTR GroupMenu_OnAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
if (mii == NULL)
return 0;
- if (hHideShowMainMenuItem == (HANDLE)lParam) {
- mii->fMask |= MIIM_STATE;
- mii->fState |= MFS_DEFAULT;
-
- }
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
mii->hSubMenu = Menu_GetMainMenu();
@@ -64,65 +63,24 @@ INT_PTR GroupMenu_OnAddService(WPARAM wParam, LPARAM lParam) mii->fMask |= MIIM_SUBMENU;
mii->hSubMenu = Menu_GetStatusMenu();
}
- if (hAppearanceMenuItemProxy == (HANDLE)lParam) {
- hMenuOldContext = GetSubMenu(LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT)), 3);
- TranslateMenu(hMenuOldContext);
-
- CheckMenuItem(hMenuOldContext, POPUP_FRAME, MF_BYCOMMAND | (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(hMenuOldContext, POPUP_BUTTONS, MF_BYCOMMAND | (cfg::dat.dwFlags & CLUI_FRAME_SHOWBOTTOMBUTTONS ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(hMenuOldContext, POPUP_SHOWMETAICONS, MF_BYCOMMAND | (cfg::dat.dwFlags & CLUI_USEMETAICONS ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(hMenuOldContext, POPUP_SHOWSTATUSICONS, MF_BYCOMMAND | (cfg::dat.dwFlags & CLUI_FRAME_STATUSICONS ? MF_CHECKED : MF_UNCHECKED));
-
- mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = hMenuOldContext;
- }
return TRUE;
}
-INT_PTR HideGroupsHelper(WPARAM, LPARAM)
-{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
- cfg::writeByte("CList", "HideEmptyGroups", (BYTE)newVal);
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
- return 0;
-}
-
-INT_PTR UseGroupsHelper(WPARAM, LPARAM)
+static INT_PTR CommandHelper(WPARAM wParam, LPARAM)
{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- cfg::writeByte("CList", "UseGroups", (BYTE)newVal);
- SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
- return 0;
-}
-
-INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
-{
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT, !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0), 0);
+ SendMessage(pcli->hwndContactList, WM_COMMAND, MAKELONG(wParam, BN_CLICKED), 1);
return 0;
}
static int OnBuildGroupMenu(WPARAM, LPARAM)
{
- bool bEnabled = 0 != cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
- Menu_EnableItem(hHideOfflineUsersMenuItem, bEnabled);
-
- bEnabled = 0 != SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0);
- Menu_EnableItem(hHideOfflineUsersOutHereMenuItem, bEnabled);
-
- bEnabled = 0 != (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
- Menu_EnableItem(hHideEmptyGroupsMenuItem, bEnabled);
-
- bEnabled = 0 != (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- Menu_EnableItem(hDisableGroupsMenuItem, bEnabled);
-
- Menu_EnableItem(hGroupMainMenuItemProxy, bEnabled);
- Menu_EnableItem(hAppearanceMenuItemProxy, bEnabled);
+ for (int i = 0; i < _countof(hAppearanceItems); i++)
+ Menu_SetChecked(hAppearanceItems[i].hMenu, (cfg::dat.dwFlags & hAppearanceItems[i].mask) != 0);
return 0;
}
IconItemT iconItem[] = {
- { LPGENT("New group"), "new_group", IDI_ADDGROUP },
- { LPGENT("Contact list"), "clist", IDI_CLIST }
+ { LPGENT("Contact list"), "clist", IDI_CLIST }
};
void InitIconLibMenuIcons(void)
@@ -133,24 +91,11 @@ void InitIconLibMenuIcons(void) void InitGroupMenus(void)
{
CreateServiceFunction("CLISTMENUSGroup/GroupMenuOnAddService", GroupMenu_OnAddService);
- CreateServiceFunction("CLISTMENUSGroup/HideGroupsHelper", HideGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/UseGroupsHelper", UseGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper", HideOfflineRootHelper);
HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
- InitSubGroupMenus();
-
// add exit command to menu
- GroupMenuParam gmp;
-
CMenuItem mi;
- mi.position = 1900000;
- mi.pszService = "CloseAction";
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.name.a = LPGEN("E&xit");
- Menu_AddGroupMenuItem(&mi);
-
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
@@ -175,114 +120,33 @@ void InitGroupMenus(void) mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = Menu_AddGroupMenuItem(&mi);
+ // Appearance menu
mi.position = 390100;
- mi.hIcolibItem = iconItem[1].hIcolib;
+ mi.hIcolibItem = iconItem[0].hIcolib;
mi.name.a = LPGEN("Appearance");
- hAppearanceMenuItemProxy = Menu_AddGroupMenuItem(&mi);
+ mi.root = Menu_AddGroupMenuItem(&mi);
+
+ mi.hIcolibItem = NULL;
+ mi.pszService = "CLISTMENUSGroup/CommandHelper";
+ CreateServiceFunction(mi.pszService, CommandHelper);
+ for (int i = 0; i < _countof(hAppearanceItems); i++) {
+ GroupMenuParam gmp;
+ gmp.wParam = hAppearanceItems[i].command;
+ mi.name.a = hAppearanceItems[i].name;
+ mi.position = hAppearanceItems[i].position;
+ hAppearanceItems[i].hMenu = Menu_AddGroupMenuItem(&mi, &gmp);
+ }
+ mi.root = NULL;
mi.position = 400000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.name.a = LPGEN("&Options...");
Menu_AddGroupMenuItem(&mi);
- mi.position = 500000;
+ mi.position = 1000000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
mi.name.a = LPGEN("&About the contact list...");
Menu_AddGroupMenuItem(&mi);
-
- mi.flags = 0;
- mi.position = 100000;
- mi.hIcolibItem = iconItem[0].hIcolib;
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&New group");
- hNewGroupMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
-
- mi.position = 100001;
- mi.hIcolibItem = NULL;
- mi.hIcolibItem = NULL;
- mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.name.a = LPGEN("&Hide offline users");
- gmp.wParam = -1;
- hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
-
- mi.position = 100002;
- mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.name.a = LPGEN("Hide &offline users out here");
- hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
-
- mi.position = 100003;
- mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.name.a = LPGEN("Hide &empty groups");
- hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
-
- mi.position = 100004;
- mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.name.a = LPGEN("Disable &groups");
- hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
-}
-
-//////////////////////////////SubGroup MENU/////////////////////////
-HANDLE hSubGroupMainMenuItemProxy;
-HANDLE hSubGroupStatusMenuItemProxy;
-HANDLE hPreBuildSubGroupMenuEvent;
-HGENMENU hHideOfflineUsersHereMenuItem;
-
-static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
-{
- ClcGroup *group = (ClcGroup*)wParam;
- if (group != 0) // contact->group
- Menu_ModifyItem(hHideOfflineUsersHereMenuItem, NULL, INVALID_HANDLE_VALUE, group->hideOffline ? CMIF_CHECKED : 0);
- return 0;
-}
-
-// wparam menu handle to pass to clc.c
-INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM)
-{
- SendMessage(pcli->hwndContactTree, WM_COMMAND, wParam, 0);
- return 0;
-}
-
-void InitSubGroupMenus(void)
-{
- CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);
-
- HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);
-
- // add exit command to menu
- GroupMenuParam gmp = {};
-
- CMenuItem mi;
- mi.position = 1000;
- mi.hIcolibItem = iconItem[0].hIcolib;
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&New subgroup");
- gmp.wParam = POPUP_NEWSUBGROUP;
- hNewSubGroupMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- mi.position = 1001;
- mi.hIcolibItem = NULL;
- mi.hIcolibItem = NULL;
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Hide offline users in here");
- gmp.wParam = POPUP_GROUPHIDEOFFLINE;
- hHideOfflineUsersHereMenuItem = (HGENMENU)Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- memset(&mi, 0, sizeof(mi));
- mi.position = 900001;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Rename group");
- gmp.wParam = POPUP_RENAMEGROUP;
- Menu_AddSubGroupMenuItem(&mi, &gmp);
-
- mi.position = 900002;
- mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.name.a = LPGEN("&Delete group");
- gmp.wParam = POPUP_DELETEGROUP;
- Menu_AddSubGroupMenuItem(&mi, &gmp);
}
-
-//////////////////////////////END SubGroup MENU/////////////////////////
diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index abb763ae2e..93b50e6938 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -10,13 +10,11 @@ #define IDD_OPTIONSDIALOG 101
#define IDD_CLNABOUT 102
#define IDD_OPT_CLIST 126
-#define IDI_ADDGROUP 143
#define IDI_CLIST 146
#define IDI_OPTIONS 163
#define IDI_DELETE 175
#define IDI_CLVM_OPTIONS 176
#define IDI_CLVM_SELECT 177
-#define IDR_CONTEXT 180
#define IDC_DROP 183
#define IDR_CLISTMENU 199
#define IDI_BLANK 200
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 8ed9c6022d..697b78ac27 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -71,11 +71,9 @@ INT_PTR TTBInternalMainMenuButt(WPARAM wParam, LPARAM lParam) INT_PTR TTBInternalStatusMenuButt(WPARAM wParam, LPARAM lParam)
{
- HMENU hMenu = (HMENU)Menu_GetStatusMenu();
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
diff --git a/src/core/stdclist/res/resource.rc b/src/core/stdclist/res/resource.rc index 562231512f..29003698d6 100644 --- a/src/core/stdclist/res/resource.rc +++ b/src/core/stdclist/res/resource.rc @@ -486,35 +486,6 @@ BEGIN END
END
-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
-END
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp index 89b4e8f7f4..312ceeec8d 100644 --- a/src/core/stdclist/src/clistmenus.cpp +++ b/src/core/stdclist/src/clistmenus.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
-INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
+static INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
{
if (CallService(MS_SYSTEM_OKTOEXIT, 0, 0))
DestroyWindow(pcli->hwndContactList);
@@ -36,15 +36,3 @@ void InitCustomMenus() {
CreateServiceFunction("CloseAction", CloseAction);
}
-
-HMENU fnBuildGroupPopupMenu(ClcGroup *group)
-{
- HMENU hMenu = LoadMenu(pcli->hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hGroupMenu = GetSubMenu(hMenu, 2);
- RemoveMenu(hMenu, 2, MF_BYPOSITION);
- DestroyMenu(hMenu);
- TranslateMenu(hGroupMenu);
-
- CheckMenuItem(hGroupMenu, POPUP_GROUPHIDEOFFLINE, group->hideOffline ? MF_CHECKED : MF_UNCHECKED);
- return hGroupMenu;
-}
diff --git a/src/core/stdclist/src/commonheaders.h b/src/core/stdclist/src/commonheaders.h index 36f7a7bb33..deff5b4d14 100644 --- a/src/core/stdclist/src/commonheaders.h +++ b/src/core/stdclist/src/commonheaders.h @@ -63,5 +63,3 @@ extern HINSTANCE g_hInst; extern CLIST_INTERFACE coreCli;
void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
-
-HMENU fnBuildGroupPopupMenu(ClcGroup *group);
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp index be4175b8e9..efb6a00d7c 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -139,7 +139,6 @@ extern "C" __declspec(dllexport) int CListInitialise() pcli->hInst = g_hInst;
pcli->pfnPaintClc = PaintClc;
pcli->pfnLoadClcOptions = LoadClcOptions;
- pcli->pfnBuildGroupPopupMenu = fnBuildGroupPopupMenu;
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);
diff --git a/src/core/stdclist/src/resource.h b/src/core/stdclist/src/resource.h index 541c69b212..149f8ec214 100644 --- a/src/core/stdclist/src/resource.h +++ b/src/core/stdclist/src/resource.h @@ -3,7 +3,6 @@ // Used by resource.rc
//
#define IDD_OPT_CLIST 126
-#define IDR_CONTEXT 180
#define IDC_DROP 183
#define IDD_OPT_HOTKEY 184
#define IDR_CLISTMENU 199
diff --git a/plugins/Clist_modern/res/addgroup.ico b/src/mir_app/res/addgroup.ico Binary files differindex 539c32fcd9..539c32fcd9 100644 --- a/plugins/Clist_modern/res/addgroup.ico +++ b/src/mir_app/res/addgroup.ico diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 427d481534..e1a70975c5 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -1215,6 +1215,7 @@ IDI_MCREMOVE ICON "meta_remove2.ico" IDI_MCCONVERT ICON "meta_convert.ico"
IDI_MCADD ICON "meta_add.ico"
IDI_MCSETDEFAULT ICON "meta_set_as_default.ico"
+IDI_ADDGROUP ICON "addgroup.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp index 10ba26b081..b671474456 100644 --- a/src/mir_app/src/clisttray.cpp +++ b/src/mir_app/src/clisttray.cpp @@ -685,7 +685,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) else if (msg->lParam == (db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? WM_LBUTTONUP : WM_LBUTTONDBLCLK)) {
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000)) {
POINT pt;
- HMENU hMenu = (HMENU)Menu_GetStatusMenu();
+ HMENU hMenu = Menu_GetStatusMenu();
for (int i = 0; i < cli.trayIconCount; i++) {
if ((unsigned)cli.trayIcon[i].id == msg->wParam) {
@@ -719,32 +719,16 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) cli.pfnShowHide(0, 0);
}
else if (msg->lParam == WM_RBUTTONUP) {
- HMENU hMainMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hMenu = GetSubMenu(hMainMenu, 0);
- TranslateMenu(hMenu);
-
- MENUITEMINFO mii = { 0 };
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_SUBMENU | MIIM_TYPE;
- mii.fType = MFT_STRING;
- mii.hSubMenu = Menu_GetMainMenu();
- mii.dwTypeData = TranslateT("&Main menu");
- InsertMenuItem(hMenu, 1, TRUE, &mii);
- mii.hSubMenu = (HMENU)Menu_GetStatusMenu();
- mii.dwTypeData = TranslateT("&Status");
- InsertMenuItem(hMenu, 2, TRUE, &mii);
- SetMenuDefaultItem(hMenu, ID_TRAY_HIDE, FALSE);
-
+ HMENU hMenu = Menu_BuildTrayMenu();
SetForegroundWindow(msg->hwnd);
SetFocus(msg->hwnd);
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN, pt.x, pt.y, 0, msg->hwnd, NULL);
-
- RemoveMenu(hMenu, 1, MF_BYPOSITION);
- RemoveMenu(hMenu, 1, MF_BYPOSITION);
- DestroyMenu(hMainMenu);
+ cli.bTrayMenuOnScreen = TRUE;
+ TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, msg->hwnd, NULL);
+ Menu_DestroyNestedMenu(hMenu);
+ PostMessage(msg->hwnd, WM_NULL, 0, 0);
}
else if (msg->lParam == WM_MOUSEMOVE) {
s_LastHoverIconID = msg->wParam;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 197bff3f2f..2d984fc5dd 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -933,17 +933,9 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
}
if (PtInRect(&rc, pt)) {
- HMENU hMenu;
- hMenu = GetSubMenu(LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT)), 1);
- TranslateMenu(hMenu);
- CheckMenuItem(hMenu, POPUP_HIDEOFFLINE,
- db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? MF_CHECKED : MF_UNCHECKED);
- CheckMenuItem(hMenu, POPUP_HIDEOFFLINEROOT, SendMessage(cli.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? MF_CHECKED : MF_UNCHECKED);
- CheckMenuItem(hMenu, POPUP_HIDEEMPTYGROUPS,
- GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? MF_CHECKED : MF_UNCHECKED);
- CheckMenuItem(hMenu, POPUP_DISABLEGROUPS, GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? MF_UNCHECKED : MF_CHECKED);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
- DestroyMenu(hMenu);
+ HMENU hMenu = Menu_BuildGroupMenu();
+ TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
+ Menu_DestroyNestedMenu(hMenu);
return 0;
}
GetWindowRect(cli.hwndStatus, &rc);
@@ -952,7 +944,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (db_get_b(NULL, "CLUI", "SBarRightClk", 0))
hMenu = Menu_GetMainMenu();
else
- hMenu = (HMENU) Menu_GetStatusMenu();
+ hMenu = Menu_GetStatusMenu();
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
return 0;
}
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 03f5830db9..3bd8a919d8 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -59,7 +59,7 @@ bool prochotkey; HANDLE hPreBuildMainMenuEvent, hStatusModeChangeEvent, hPreBuildContactMenuEvent;
-static HMENU hMainMenu, hStatusMenu = 0;
+HMENU hMainMenu, hStatusMenu;
const int statusModeList[MAX_STATUS_COUNT] =
{
ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED,
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp index ea7c929ee5..f70ce3266f 100644 --- a/src/mir_app/src/menu_groups.cpp +++ b/src/mir_app/src/menu_groups.cpp @@ -28,7 +28,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ////////////////////////////// Group MENU //////////////////////////////
int hGroupMenuObject, hSubGroupMenuObject;
+
static HANDLE hEventPreBuildGroupMenu, hEventPreBuildSubGroupMenu;
+static HGENMENU hHideOfflineUsersMenuItem;
+static HGENMENU hHideOfflineUsersOutHereMenuItem;
+static HGENMENU hHideEmptyGroupsMenuItem;
+static HGENMENU hDisableGroupsMenuItem;
// Groupmenu exec param(ownerdata)
@@ -96,6 +101,8 @@ INT_PTR FreeOwnerDataGroupMenu(WPARAM, LPARAM lParam) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
INT_PTR HideGroupsHelper(WPARAM, LPARAM)
{
int newVal = !(GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
@@ -126,7 +133,21 @@ INT_PTR CreateGroupHelper(WPARAM, LPARAM) SendMessage(cli.hwndContactTree, CLM_SETUSEGROUPS, 1, 0);
Clist_CreateGroup(0, 0);
return 0;
-};
+}
+
+static int OnBuildGroupMenu(WPARAM, LPARAM)
+{
+ bool bChecked = db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) != 0;
+ Menu_SetChecked(hHideOfflineUsersMenuItem, bChecked);
+
+ bChecked = SendMessage(cli.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) != 0;
+ Menu_SetChecked(hHideOfflineUsersOutHereMenuItem, bChecked);
+
+ DWORD dwStyle = GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE);
+ Menu_SetChecked(hHideEmptyGroupsMenuItem, (dwStyle & CLS_HIDEEMPTYGROUPS) != 0);
+ Menu_SetChecked(hDisableGroupsMenuItem, (dwStyle & CLS_USEGROUPS) != 0);
+ return 0;
+}
/////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////// SubGroup MENU //////////////////////////////
@@ -146,11 +167,15 @@ MIR_APP_DLL(HMENU) Menu_BuildSubGroupMenu(ClcGroup *group) return hMenu;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
HMENU cliBuildGroupPopupMenu(ClcGroup *group)
{
return Menu_BuildSubGroupMenu(group);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam *gmp)
{
SubGroupMenuExecParam *mmep = (SubGroupMenuExecParam*)mir_calloc(sizeof(SubGroupMenuExecParam));
@@ -172,6 +197,8 @@ MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam return hNewItem;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM)
{
TCheckProcParam * CParam = (TCheckProcParam*)wParam;
@@ -183,6 +210,7 @@ static INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM) return 1;
}
+/////////////////////////////////////////////////////////////////////////////////////////
// called with:
// wparam - ownerdata
// lparam - lparam from winproc
@@ -200,6 +228,8 @@ static INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam) return 1;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR FreeOwnerDataSubGroupMenu(WPARAM, LPARAM lParam)
{
SubGroupMenuExecParam * mmep = (SubGroupMenuExecParam *)lParam;
@@ -210,6 +240,19 @@ static INT_PTR FreeOwnerDataSubGroupMenu(WPARAM, LPARAM lParam) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static HGENMENU hHideOfflineUsersHereMenuItem;
+
+static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
+{
+ ClcGroup *group = (ClcGroup*)wParam;
+ if (group != 0) // contact->group
+ Menu_SetChecked(hHideOfflineUsersHereMenuItem, group->hideOffline != 0);
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// wparam menu handle to pass to clc.c
// lparam WM_COMMAND HWND
static INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam)
@@ -218,22 +261,63 @@ static INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
void InitGroupMenus(void)
{
+ GroupMenuParam gmp = {};
+
// Group menu
CreateServiceFunction("CLISTMENUSGroup/ExecService", GroupMenuExecService);
CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu", FreeOwnerDataGroupMenu);
- CreateServiceFunction("CLISTMENUSGroup/HideGroupsHelper", HideGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/UseGroupsHelper", UseGroupsHelper);
- CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper", HideOfflineRootHelper);
- CreateServiceFunction("CLISTMENUSGroup/CreateGroupHelper", CreateGroupHelper);
hEventPreBuildGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
+ HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
hGroupMenuObject = Menu_AddObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuOnAddService");
+ {
+ CMenuItem mi;
+ mi.position = 100000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUPADD);
+ mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
+ mi.name.a = LPGEN("&New group");
+ Menu_AddGroupMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, CreateGroupHelper);
+
+ mi.position = 500001;
+ mi.hIcolibItem = NULL;
+ mi.pszService = MS_CLIST_SETHIDEOFFLINE;
+ mi.name.a = LPGEN("&Hide offline users");
+ gmp.wParam = -1;
+ hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);
+
+ mi.position = 500002;
+ mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
+ mi.name.a = LPGEN("Hide &offline users out here");
+ hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, HideOfflineRootHelper);
+
+ mi.position = 500003;
+ mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
+ mi.name.a = LPGEN("Hide &empty groups");
+ hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, HideGroupsHelper);
+
+ mi.position = 500004;
+ mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
+ mi.name.a = LPGEN("Disable &groups");
+ hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, UseGroupsHelper);
+
+ mi.position = 1900000;
+ mi.pszService = "CloseAction";
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
+ mi.name.a = LPGEN("E&xit");
+ Menu_AddGroupMenuItem(&mi);
+ }
// SubGroup menu
CreateServiceFunction("CLISTMENUSSubGroup/ExecService", SubGroupMenuExecService);
@@ -242,9 +326,37 @@ void InitGroupMenus(void) CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);
hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
+ HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);
hSubGroupMenuObject = Menu_AddObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
+ {
+ CMenuItem mi;
+ mi.position = 1000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
+ mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
+ mi.name.a = LPGEN("&New subgroup");
+ gmp.wParam = POPUP_NEWSUBGROUP;
+ Menu_AddSubGroupMenuItem(&mi, &gmp);
+
+ mi.position = 1001;
+ mi.hIcolibItem = 0;
+ mi.name.a = LPGEN("&Hide offline users in here");
+ gmp.wParam = POPUP_GROUPHIDEOFFLINE;
+ hHideOfflineUsersHereMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);
+
+ mi.position = 900001;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
+ mi.name.a = LPGEN("&Rename group");
+ gmp.wParam = POPUP_RENAMEGROUP;
+ Menu_AddSubGroupMenuItem(&mi, &gmp);
+
+ mi.position = 900002;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
+ mi.name.a = LPGEN("&Delete group");
+ gmp.wParam = POPUP_DELETEGROUP;
+ Menu_AddSubGroupMenuItem(&mi, &gmp);
+ }
}
diff --git a/src/mir_app/src/menu_tray.cpp b/src/mir_app/src/menu_tray.cpp index f3ccede108..4f9a616bd4 100644 --- a/src/mir_app/src/menu_tray.cpp +++ b/src/mir_app/src/menu_tray.cpp @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int hTrayMenuObject;
static HANDLE hEventPreBuildTrayMenu;
+static HGENMENU hTrayMainMenuItemProxy, hTrayStatusMenuItemProxy;
/////////////////////////////////////////////////////////////////////////////////////////
// Tray menu services
@@ -48,6 +49,17 @@ MIR_APP_DLL(HGENMENU) Menu_AddTrayMenuItem(TMO_MenuItem *pmi) return pimi;
}
+MIR_APP_DLL(void) Menu_DestroyNestedMenu(HMENU hMenu)
+{
+ int cnt = GetMenuItemCount(hMenu);
+ for (int i = 0; i < cnt; ++i) {
+ HMENU hSubMenu = GetSubMenu(hMenu, i);
+ if (hSubMenu && ((hSubMenu == hStatusMenu) || (hSubMenu == hMainMenu)))
+ RemoveMenu(hMenu, i--, MF_BYPOSITION);
+ }
+ DestroyMenu(hMenu);
+}
+
// called with:
// wparam - ownerdata
// lparam - lparam from winproc
@@ -65,10 +77,30 @@ static INT_PTR FreeOwnerDataTrayMenu(WPARAM, LPARAM lParam) return 0;
}
+static INT_PTR TrayMenuOnAddService(WPARAM wParam, LPARAM lParam)
+{
+ MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
+ if (mii == NULL)
+ return 0;
+
+ if (hTrayMainMenuItemProxy == (HGENMENU)lParam) {
+ mii->fMask |= MIIM_SUBMENU;
+ mii->hSubMenu = hMainMenu;
+ }
+
+ if (hTrayStatusMenuItemProxy == (HGENMENU)lParam) {
+ mii->fMask |= MIIM_SUBMENU;
+ mii->hSubMenu = hStatusMenu = Menu_GetStatusMenu();
+ }
+
+ return TRUE;
+}
+
void InitTrayMenus(void)
{
CreateServiceFunction("CLISTMENUSTRAY/ExecService", TrayMenuExecService);
CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu", FreeOwnerDataTrayMenu);
+ CreateServiceFunction("CLISTMENUSTRAY/TrayMenuOnAddService", TrayMenuOnAddService);
hEventPreBuildTrayMenu = CreateHookableEvent(ME_CLIST_PREBUILDTRAYMENU);
@@ -77,4 +109,49 @@ void InitTrayMenus(void) Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSTRAY/FreeOwnerDataTrayMenu");
Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuOnAddService");
+
+ // add exit command to menu
+ CMenuItem mi;
+ mi.flags = CMIF_DEFAULT;
+ mi.position = 100000;
+ mi.pszService = MS_CLIST_SHOWHIDE;
+ mi.name.a = LPGEN("&Hide/show");
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
+ Menu_AddTrayMenuItem(&mi);
+
+ mi.flags = 0;
+ mi.position = 200000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.pszService = "FindAdd/FindAddCommand";
+ mi.name.a = LPGEN("&Find/add contacts...");
+ Menu_AddTrayMenuItem(&mi);
+
+ mi.position = 300000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
+ mi.pszService = NULL;
+ mi.name.a = LPGEN("&Main menu");
+ hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);
+
+ mi.position = 300100;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
+ mi.name.a = LPGEN("&Status");
+ hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);
+
+ mi.position = 400000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.pszService = "Options/OptionsCommand";
+ mi.name.a = LPGEN("&Options...");
+ Menu_AddTrayMenuItem(&mi);
+
+ mi.position = 500000;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.pszService = "Help/AboutCommand";
+ mi.name.a = LPGEN("&About");
+ Menu_AddTrayMenuItem(&mi);
+
+ mi.position = 900000;
+ mi.pszService = "CloseAction";
+ mi.name.a = LPGEN("E&xit");
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
+ Menu_AddTrayMenuItem(&mi);
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 3fbf3bff93..56dd4712d9 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -235,3 +235,4 @@ Menu_AddSubGroupMenuItem @232 Menu_BuildGroupMenu @233
Menu_AddTrayMenuItem @234
Menu_BuildTrayMenu @235
+Menu_DestroyNestedMenu @236
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 9f72915c5f..0d97c9481b 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -235,3 +235,4 @@ Menu_AddSubGroupMenuItem @232 Menu_BuildGroupMenu @233
Menu_AddTrayMenuItem @234
Menu_BuildTrayMenu @235
+Menu_DestroyNestedMenu @236
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index a93754f9a4..7bae22e83c 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -127,6 +127,7 @@ extern CLIST_INTERFACE cli; extern int hMainMenuObject, hContactMenuObject, hStatusMenuObject;
extern HANDLE hPreBuildMainMenuEvent, hPreBuildContactMenuEvent;
extern HANDLE hShutdownEvent, hPreShutdownEvent;
+extern HMENU hMainMenu, hStatusMenu;
extern const int statusModeList[ MAX_STATUS_COUNT ];
extern const int skinIconStatusList[ MAX_STATUS_COUNT ];
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index 00027b4c75..d94ff10d99 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -22,7 +22,7 @@ #define IDI_NOTLOADED_GRAY 114
#define IDD_ADDED 115
#define IDD_ENTER_STRING 116
-
+#define IDI_ADDGROUP 117
#define IDD_URLSEND 119
#define IDD_URLRECV 120
#define IDD_AUTHREQ 121
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index ccf499ef6b..0891d0d1ce 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -71,7 +71,7 @@ static struct StandardIconDescription mainIcons[] = { SKINICON_OTHER_WINDOW, LPGEN("Window"), -IDI_WINDOW }, // 32
{ SKINICON_OTHER_WINDOWS, LPGEN("System"), -IDI_WINDOWS }, // 33
{ SKINICON_OTHER_ACCMGR, LPGEN("Accounts"), -IDI_ACCMGR }, // 34
- { SKINICON_OTHER_SHOWHIDE, LPGEN("Show/Hide"), -IDI_SHOWHIDE }, // 35
+ { SKINICON_OTHER_SHOWHIDE, LPGEN("Show/Hide"), -IDI_SHOWHIDE }, // 35
{ SKINICON_OTHER_EXIT, LPGEN("Exit"), -IDI_EXIT }, // 36
{ SKINICON_OTHER_MAINMENU, LPGEN("Main menu"), -IDI_MAINMENU }, // 37
{ SKINICON_OTHER_STATUS, LPGEN("Status"), -IDI_ONLINE }, // 38
@@ -83,14 +83,15 @@ static struct StandardIconDescription mainIcons[] = { SKINICON_OTHER_LOADEDGRAY, LPGEN("Running core plugin"), -IDI_LOADED_GRAY }, // 44
{ SKINICON_OTHER_NOTLOADEDGRAY, LPGEN("Non-loadable plugin"), -IDI_NOTLOADED_GRAY }, // 45
{ SKINICON_OTHER_FRAME, LPGEN("Frames"), -IDI_FRAME }, // 46
- { SKINICON_AUTH_ADD, LPGEN("Add to list"), -IDI_AUTH_ADD }, // 47
- { SKINICON_AUTH_REQUEST, LPGEN("Request authorization"), -IDI_AUTH_REQUEST }, // 48
- { SKINICON_AUTH_GRANT, LPGEN("Grant authorization"), -IDI_AUTH_GRANT }, // 49
- { SKINICON_AUTH_REVOKE, LPGEN("Revoke authorization"), -IDI_AUTH_REVOKE }, // 50
- { SKINICON_FATAL, LPGEN("Fatal error"), -IDI_MFATAL },
- { SKINICON_ERROR, LPGEN("Error"), -IDI_MERROR },
- { SKINICON_WARNING, LPGEN("Warning"), -IDI_MWARNING },
- { SKINICON_INFORMATION, LPGEN("Information"), -IDI_MINFO },
+ { SKINICON_OTHER_GROUPADD, LPGEN("Add group"), -IDI_ADDGROUP }, // 47
+ { SKINICON_AUTH_ADD, LPGEN("Add to list"), -IDI_AUTH_ADD }, // 48
+ { SKINICON_AUTH_REQUEST, LPGEN("Request authorization"), -IDI_AUTH_REQUEST }, // 49
+ { SKINICON_AUTH_GRANT, LPGEN("Grant authorization"), -IDI_AUTH_GRANT }, // 50
+ { SKINICON_AUTH_REVOKE, LPGEN("Revoke authorization"), -IDI_AUTH_REVOKE }, // 51
+ { SKINICON_FATAL, LPGEN("Fatal error"), -IDI_MFATAL }, // 52
+ { SKINICON_ERROR, LPGEN("Error"), -IDI_MERROR }, // 53
+ { SKINICON_WARNING, LPGEN("Warning"), -IDI_MWARNING }, // 54
+ { SKINICON_INFORMATION, LPGEN("Information"), -IDI_MINFO }, // 55
{ SKINICON_OTHER_VISIBLE_ALL, LPGEN("Always visible"), -IDI_ALWAYSVIS, 0, LPGEN("Contact list") },
{ SKINICON_OTHER_INVISIBLE_ALL, LPGEN("Always invisible"), -IDI_NEVERVIS, 0, LPGEN("Contact list") },
|