diff options
33 files changed, 434 insertions, 407 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib Binary files differindex a13e95fded..01f8b54a9f 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 4774014a24..e2d1d67cf2 100644 --- a/bin10/lib/mir_app64.lib +++ b/bin10/lib/mir_app64.lib diff --git a/bin10/mir_dev.sln b/bin10/mir_dev.sln index d536bb8bc0..410d4549a4 100644 --- a/bin10/mir_dev.sln +++ b/bin10/mir_dev.sln @@ -162,7 +162,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\To EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_10.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_10.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}"
EndProject
diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index f3c83d4999..31ef130a9a 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -162,7 +162,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\To EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_10.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_10.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}"
EndProject
diff --git a/bin10/mir_full_pro.sln b/bin10/mir_full_pro.sln index 5ec8a3f617..f6f73de1d8 100644 --- a/bin10/mir_full_pro.sln +++ b/bin10/mir_full_pro.sln @@ -162,7 +162,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\To EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_10.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_10.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}"
EndProject
diff --git a/bin10/miranda32.sln b/bin10/miranda32.sln index ee4e5ea655..69e40111f2 100644 --- a/bin10/miranda32.sln +++ b/bin10/miranda32.sln @@ -62,7 +62,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MSN", "..\protocols\M EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Yahoo", "..\protocols\Yahoo\proto_yahoo\Proto_Yahoo.vcxproj", "{BFEBA9D5-CAB7-42C0-BE0B-0888A7A458AB}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_10.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo_10.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}"
ProjectSection(ProjectDependencies) = postProject
diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib Binary files differindex a13e95fded..01f8b54a9f 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 4774014a24..e2d1d67cf2 100644 --- a/bin12/lib/mir_app64.lib +++ b/bin12/lib/mir_app64.lib diff --git a/bin12/mir_dev.sln b/bin12/mir_dev.sln index ff3ef7b582..88451559a4 100644 --- a/bin12/mir_dev.sln +++ b/bin12/mir_dev.sln @@ -164,7 +164,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\To EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_12.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_12.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}"
EndProject
diff --git a/bin12/mir_full.sln b/bin12/mir_full.sln index 4e2586737b..b2bcfeb8ea 100644 --- a/bin12/mir_full.sln +++ b/bin12/mir_full.sln @@ -164,7 +164,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\To EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_12.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_12.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}"
EndProject
diff --git a/bin12/miranda32.sln b/bin12/miranda32.sln index ce0bd311c6..87ca88b721 100644 --- a/bin12/miranda32.sln +++ b/bin12/miranda32.sln @@ -64,7 +64,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MSN", "..\protocols\M EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Yahoo", "..\protocols\Yahoo\proto_yahoo\Proto_Yahoo.vcxproj", "{BFEBA9D5-CAB7-42C0-BE0B-0888A7A458AB}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern_12.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo_12.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}"
ProjectSection(ProjectDependencies) = postProject
diff --git a/include/m_clist.h b/include/m_clist.h index 1453f76e29..ec9390fe20 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -126,41 +126,32 @@ struct GroupMenuParam // builds the Group menu
// wParam=lParam=0
// returns a HMENU identifying the menu.
-#define MS_CLIST_MENUBUILDGROUP "CList/MenuBuildGroup"
+EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildGroupMenu(void);
// add a new item to the Group menus
// wParam=GroupMenuParam*, params to call when exec menuitem
// lParam=(LPARAM)(TMO_MenuItem*)&mi
-
-__forceinline HGENMENU Menu_AddGroupMenuItem(GroupMenuParam *gmp, TMO_MenuItem *mi)
-{
- return (HGENMENU)CallService("CList/AddGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddGroupMenuItem(TMO_MenuItem *mi, GroupMenuParam *gmp = NULL);
// the Group menu is about to be built
-// wParam=lParam=0
-#define ME_CLIST_PREBUILDGROUPMENU "CList/PreBuildGroupMenu"
+// wParam = lParam = 0
+#define ME_CLIST_PREBUILDGROUPMENU "CList/PreBuildGroupMenu"
/////////////////////////////////////////////////////////////////////////////////////////
// SUBGROUP MENU
// builds the SubGroup menu
-// wParam=lParam=0
// returns a HMENU identifying the menu.
-#define MS_CLIST_MENUBUILDSUBGROUP "CList/MenuBuildSubGroup"
+EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildSubGroupMenu(struct ClcGroup *group);
// add a new item to the SubGroup menus
// wParam=GroupMenuParam*, params to call when exec menuitem
// lParam=(LPARAM)(TMO_MenuItem*)&mi
-
-__forceinline HGENMENU Menu_AddSubGroupMenuItem(GroupMenuParam *gmp, TMO_MenuItem *mi)
-{
- return (HGENMENU)CallService("CList/AddSubGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *mi, GroupMenuParam *gmp = NULL);
// the SubGroup menu is about to be built
-// wParam=lParam=0
-#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu"
+// wParam = lParam = 0
+#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu"
/////////////////////////////////////////////////////////////////////////////////////////
// TRAY MENU
@@ -168,7 +159,7 @@ __forceinline HGENMENU Menu_AddSubGroupMenuItem(GroupMenuParam *gmp, TMO_MenuIte // builds the tray menu
// wParam=lParam=0
// returns a HMENU identifying the menu.
-#define MS_CLIST_MENUBUILDTRAY "CList/MenuBuildTray"
+#define MS_CLIST_MENUBUILDTRAY "CList/MenuBuildTray"
// add a new item to the tray menus
// wParam=0
diff --git a/include/m_clistint.h b/include/m_clistint.h index 4510b963cf..31203835e6 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -239,22 +239,21 @@ typedef struct _menuProto * CLIST_INTERFACE structure definition
***************************************************************************/
-typedef struct {
+struct ClcProtoStatus
+{
char *szProto;
DWORD dwStatus;
-}
- ClcProtoStatus;
+};
-typedef struct
+struct ClcCacheEntryBase
{
MCONTACT hContact;
TCHAR* tszName;
TCHAR* tszGroup;
int bIsHidden;
-}
- ClcCacheEntryBase;
+};
-typedef struct
+struct CLIST_INTERFACE
{
int version;
@@ -487,18 +486,18 @@ typedef struct int (*pfnGetAverageMode)(int *pNetProtoCount);
void (*pfnInitAutoRebuild)(HWND hwnd);
void (*pfnSetContactCheckboxes)(ClcContact *cc, int checked);
-}
- CLIST_INTERFACE;
-
-extern CLIST_INTERFACE cli, *pcli;
+};
-// Miranda 0.4.3.0+
// retrieves the pointer to a CLIST_INTERFACE structure
// NOTE: valid only for the clist clone building, not for the regular use
#define MS_CLIST_RETRIEVE_INTERFACE "CList/RetrieveInterface"
-__forceinline void mir_getCLI()
-{ pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
-}
+#ifndef MIR_APP_EXPORTS
+ extern CLIST_INTERFACE *pcli;
+
+ __forceinline void mir_getCLI()
+ { pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ }
+#endif
#endif // M_CLISTINT_H__
diff --git a/include/m_system.h b/include/m_system.h index d29911c99f..2065a13813 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -197,7 +197,7 @@ of shutting down */
#define MS_SYSTEM_GETBUILDSTRING "Miranda/GetBuildString"
-#ifdef _STATIC
+#ifdef MIR_APP_EXPORTS
INT_PTR MirandaIsTerminated(WPARAM, LPARAM);
__forceinline INT_PTR Miranda_Terminated(void)
diff --git a/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters b/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters index 29bb3c0e63..6e654a40eb 100644 --- a/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters +++ b/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters @@ -105,9 +105,6 @@ <ClCompile Include="src\CLUIFrames\cluiframes.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
- <ClCompile Include="src\CLUIFrames\groupmenu.cpp">
- <Filter>Source Files\CLUIFrames</Filter>
- </ClCompile>
<ClCompile Include="src\clnplus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -120,6 +117,9 @@ <ClCompile Include="src\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\CLUIFrames\groupmenu.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\CLUIFrames\cluiframes.h">
diff --git a/plugins/Clist_nicer/clist_nicer_12.vcxproj.filters b/plugins/Clist_nicer/clist_nicer_12.vcxproj.filters index 29bb3c0e63..6e654a40eb 100644 --- a/plugins/Clist_nicer/clist_nicer_12.vcxproj.filters +++ b/plugins/Clist_nicer/clist_nicer_12.vcxproj.filters @@ -105,9 +105,6 @@ <ClCompile Include="src\CLUIFrames\cluiframes.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
- <ClCompile Include="src\CLUIFrames\groupmenu.cpp">
- <Filter>Source Files\CLUIFrames</Filter>
- </ClCompile>
<ClCompile Include="src\clnplus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -120,6 +117,9 @@ <ClCompile Include="src\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\CLUIFrames\groupmenu.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\CLUIFrames\cluiframes.h">
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 93dba7710d..c68a3c16d1 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -24,9 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <commonheaders.h>
-//////////////////////////////Group MENU/////////////////////////
-int hGroupMenuObject;
-HANDLE hPreBuildGroupMenuEvent;
+/////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////// Group MENU //////////////////////////////
HGENMENU hGroupMainMenuItemProxy;
HGENMENU hHideShowMainMenuItem;
@@ -45,47 +44,7 @@ HGENMENU hNewSubGroupMenuItem; void InitSubGroupMenus(void);
-//Groupmenu exec param(ownerdata)
-typedef struct
-{
- char *szServiceName;
- int Param1, Param2;
-}
-GroupMenuExecParam, *lpGroupMenuExecParam;
-
-static INT_PTR BuildGroupMenu(WPARAM, LPARAM)
-{
- NotifyEventHooks(hPreBuildGroupMenuEvent, 0, 0);
-
- HMENU hMenu = CreatePopupMenu();
- Menu_Build(hMenu, hGroupMenuObject);
- return (INT_PTR)hMenu;
-}
-
-static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
-{
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)mir_calloc(sizeof(GroupMenuExecParam));
- if (mmep == NULL)
- return 0;
-
- TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
- // we need just one parametr.
- mmep->szServiceName = mir_strdup(pmi->pszService);
- GroupMenuParam *gmp = (GroupMenuParam*)wParam;
- if (gmp != NULL) {
- mmep->Param1 = gmp->wParam;
- mmep->Param2 = gmp->lParam;
- }
-
- HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi, mmep);
-
- char buf[1024];
- mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
- Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
- return (INT_PTR)hNewItem;
-}
-
-INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
+INT_PTR GroupMenu_OnAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
if (mii == NULL)
@@ -103,7 +62,7 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
+ mii->hSubMenu = Menu_GetStatusMenu();
}
if (hAppearanceMenuItemProxy == (HANDLE)lParam) {
hMenuOldContext = GetSubMenu(LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT)), 3);
@@ -115,39 +74,11 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) CheckMenuItem(hMenuOldContext, POPUP_SHOWSTATUSICONS, MF_BYCOMMAND | (cfg::dat.dwFlags & CLUI_FRAME_STATUSICONS ? MF_CHECKED : MF_UNCHECKED));
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)hMenuOldContext;
+ mii->hSubMenu = hMenuOldContext;
}
return TRUE;
}
-//called with:
-//wparam - ownerdata
-//lparam - lparam from winproc
-INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam)
-{
- if (wParam != 0) {
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
- if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
- //bug in help.c,it used wparam as parent window handle without reason.
- mmep->Param1 = 0;
- CallService(mmep->szServiceName, mmep->Param1, lParam);
- }
- else CallService(mmep->szServiceName, mmep->Param1, mmep->Param2);
- }
- return 1;
-}
-
-INT_PTR FreeOwnerDataGroupMenu(WPARAM, LPARAM lParam)
-{
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)lParam;
- if (mmep != NULL) {
- mir_free(mmep->szServiceName);
- mir_free(mmep);
- }
-
- return 0;
-}
-
INT_PTR HideGroupsHelper(WPARAM, LPARAM)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
@@ -166,28 +97,26 @@ INT_PTR UseGroupsHelper(WPARAM, LPARAM) INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
{
- SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT,
- !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0),
- 0);
+ SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT, !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0), 0);
return 0;
}
static int OnBuildGroupMenu(WPARAM, LPARAM)
{
- int flags = (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CMIF_CHECKED : 0);
- Menu_ModifyItem(hHideOfflineUsersMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
+ bool bEnabled = 0 != cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
+ Menu_EnableItem(hHideOfflineUsersMenuItem, bEnabled);
- flags = SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? CMIF_CHECKED : 0;
- Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
+ bEnabled = 0 != SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0);
+ Menu_EnableItem(hHideOfflineUsersOutHereMenuItem, bEnabled);
- flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? CMIF_CHECKED : 0;
- Menu_ModifyItem(hHideEmptyGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
+ bEnabled = 0 != (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
+ Menu_EnableItem(hHideEmptyGroupsMenuItem, bEnabled);
- flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? 0 : CMIF_CHECKED;
- Menu_ModifyItem(hDisableGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
+ bEnabled = 0 != (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
+ Menu_EnableItem(hDisableGroupsMenuItem, bEnabled);
- Menu_ModifyItem(hGroupMainMenuItemProxy, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(hAppearanceMenuItemProxy, NULL, INVALID_HANDLE_VALUE, flags);
+ Menu_EnableItem(hGroupMainMenuItemProxy, bEnabled);
+ Menu_EnableItem(hAppearanceMenuItemProxy, bEnabled);
return 0;
}
@@ -203,26 +132,15 @@ void InitIconLibMenuIcons(void) void InitGroupMenus(void)
{
- CreateServiceFunction("CLISTMENUSGroup/ExecService", GroupMenuExecService);
- CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu", FreeOwnerDataGroupMenu);
- CreateServiceFunction("CLISTMENUSGroup/GroupMenuonAddService", GroupMenuonAddService);
+ CreateServiceFunction("CLISTMENUSGroup/GroupMenuOnAddService", GroupMenu_OnAddService);
CreateServiceFunction("CLISTMENUSGroup/HideGroupsHelper", HideGroupsHelper);
CreateServiceFunction("CLISTMENUSGroup/UseGroupsHelper", UseGroupsHelper);
CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper", HideOfflineRootHelper);
- CreateServiceFunction("CList/AddGroupMenuItem", AddGroupMenuItem);
- CreateServiceFunction(MS_CLIST_MENUBUILDGROUP, BuildGroupMenu);
- hPreBuildGroupMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
InitSubGroupMenus();
- // Group menu
- 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");
-
// add exit command to menu
GroupMenuParam gmp;
@@ -231,98 +149,86 @@ void InitGroupMenus(void) mi.pszService = "CloseAction";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
mi.name.a = LPGEN("E&xit");
- AddGroupMenuItem(0, (LPARAM)&mi);
+ 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 = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideShowMainMenuItem = Menu_AddGroupMenuItem(&mi);
mi.position = 200000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.name.a = LPGEN("&Find/add contacts...");
- AddGroupMenuItem(0, (LPARAM)&mi);
+ Menu_AddGroupMenuItem(&mi);
mi.position = 300000;
mi.pszService = "";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
mi.name.a = LPGEN("&Main menu");
- hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hGroupMainMenuItemProxy = Menu_AddGroupMenuItem(&mi);
mi.position = 300100;
mi.pszService = "";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
mi.name.a = LPGEN("&Status");
- hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hGroupStatusMenuItemProxy = Menu_AddGroupMenuItem(&mi);
mi.position = 390100;
mi.hIcolibItem = iconItem[1].hIcolib;
mi.name.a = LPGEN("Appearance");
- hAppearanceMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hAppearanceMenuItemProxy = Menu_AddGroupMenuItem(&mi);
mi.position = 400000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.name.a = LPGEN("&Options...");
- AddGroupMenuItem(0, (LPARAM)&mi);
+ Menu_AddGroupMenuItem(&mi);
mi.position = 500000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
mi.name.a = LPGEN("&About the contact list...");
- AddGroupMenuItem(0, (LPARAM)&mi);
+ 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 = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ 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.lParam = 0; gmp.wParam = -1;
- hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ 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 = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.name.a = LPGEN("Hide &empty groups");
- hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.name.a = LPGEN("Disable &groups");
- hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
}
-//////////////////////////////END Group MENU/////////////////////////
-
//////////////////////////////SubGroup MENU/////////////////////////
-int hSubGroupMenuObject;
-
HANDLE hSubGroupMainMenuItemProxy;
HANDLE hSubGroupStatusMenuItemProxy;
HANDLE hPreBuildSubGroupMenuEvent;
HGENMENU hHideOfflineUsersHereMenuItem;
-//SubGroupmenu exec param(ownerdata)
-typedef struct
-{
- char *szServiceName;
- int Param1, Param2;
-}
-SubGroupMenuExecParam, *lpSubGroupMenuExecParam;
-
static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
{
ClcGroup *group = (ClcGroup*)wParam;
@@ -331,97 +237,6 @@ static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM) return 0;
}
-static INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM)
-{
- NotifyEventHooks(hPreBuildSubGroupMenuEvent, wParam, 0);
-
- HMENU hMenu = CreatePopupMenu();
- Menu_Build(hMenu, hSubGroupMenuObject, wParam);
- return (INT_PTR)hMenu;
-}
-
-static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
-{
- lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)mir_alloc(sizeof(SubGroupMenuExecParam));
- if (mmep == NULL)
- return 0;
-
- TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
-
- // we need just one parametr.
- GroupMenuParam *gmp = (GroupMenuParam*)wParam;
- mmep->szServiceName = mir_strdup(pmi->pszService);
- if (gmp != NULL) {
- mmep->Param1 = gmp->wParam;
- mmep->Param2 = gmp->lParam;
- }
-
- HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi, mmep);
-
- char buf[1024];
- mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
- Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
- return (INT_PTR)hNewItem;
-}
-
-INT_PTR SubGroupMenuCheckService(WPARAM, LPARAM)
-{
- return 0;
-}
-
-INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM)
-{
- MENUITEMINFO *mii = (MENUITEMINFO *)wParam;
- if (mii == NULL)
- return 0;
-
- /*
- if (hHideShowMainMenuItem == (HANDLE)lParam) {
- mii->fMask |= MIIM_STATE;
- mii->fState |= MFS_DEFAULT;
- }
- if (hSubGroupMainMenuItemProxy == (HANDLE)lParam) {
- mii->fMask |= MIIM_SUBMENU;
- //mi.fType = MFT_STRING;
- mii->hSubMenu = Menu_GetMainMenu();
- }
-
- if (hSubGroupStatusMenuItemProxy == (HANDLE)lParam) {
- mii->fMask |= MIIM_SUBMENU;
- //mi.fType = MFT_STRING;
- mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
- }
- */
- return TRUE;
-};
-
-//called with:
-//wparam - ownerdata
-//lparam - lparam from winproc
-INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam) {
- if (wParam!=0) {
- lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
- if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
- //bug in help.c,it used wparam as parent window handle without reason.
- mmep->Param1 = 0;
- CallService(mmep->szServiceName, mmep->Param1, lParam);
- }
- else
- CallService(mmep->szServiceName, mmep->Param1, mmep->Param2);
- }
- return 1;
-}
-
-INT_PTR FreeOwnerDataSubGroupMenu(WPARAM, LPARAM lParam)
-{
- lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)lParam;
- if (mmep != NULL) {
- mir_free(mmep->szServiceName);
- mir_free(mmep);
- }
- return 0;
-}
-
// wparam menu handle to pass to clc.c
INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM)
{
@@ -431,59 +246,43 @@ INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM) void InitSubGroupMenus(void)
{
- CreateServiceFunction("CLISTMENUSSubGroup/ExecService", SubGroupMenuExecService);
- CreateServiceFunction("CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu", FreeOwnerDataSubGroupMenu);
- CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuonAddService", SubGroupMenuonAddService);
CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);
- CreateServiceFunction("CList/AddSubGroupMenuItem", AddSubGroupMenuItem);
- CreateServiceFunction(MS_CLIST_MENUBUILDSUBGROUP, BuildSubGroupMenu);
- hPreBuildSubGroupMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);
- // SubGroup menu
- 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_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
-
// add exit command to menu
- GroupMenuParam gmp;
+ 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 = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ 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 = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ 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.lParam = 0;
gmp.wParam = POPUP_RENAMEGROUP;
- AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ 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;
- AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ Menu_AddSubGroupMenuItem(&mi, &gmp);
}
//////////////////////////////END SubGroup MENU/////////////////////////
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 3d4195c00e..6a5a3937ca 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -48,11 +48,6 @@ LONG g_cxsmIcon, g_cysmIcon; void SetDBButtonStates(MCONTACT hContact);
-HMENU BuildGroupPopupMenu(ClcGroup* group)
-{
- return (HMENU)CallService(MS_CLIST_MENUBUILDSUBGROUP, (WPARAM)group, 0);
-}
-
int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
pcli->pfnClcBroadcast(INTM_AVATARCHANGED, wParam, lParam);
@@ -691,7 +686,7 @@ LBL_Def: if (dat->selection != -1 && hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMCHECK | CLCHT_ONITEMLABEL)) {
if (contact->type == CLCIT_GROUP) {
- hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDSUBGROUP, (WPARAM)contact->group, 0);
+ hMenu = Menu_BuildSubGroupMenu(contact->group);
ClientToScreen(hwnd, &pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
CheckMenuItem(hMenu, POPUP_GROUPHIDEOFFLINE, contact->group->hideOffline ? MF_CHECKED : MF_UNCHECKED);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 120c984609..bd4e65f1a5 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1543,7 +1543,7 @@ buttons_done: break; case POPUP_SHOWMETAICONS: cfg::dat.dwFlags ^= CLUI_USEMETAICONS; - pcli->pfnInitAutoRebuild(hwnd); + pcli->pfnInitAutoRebuild(pcli->hwndContactTree); break; case POPUP_FRAME: cfg::dat.dwFlags ^= CLUI_FRAME_CLISTSUNKEN; @@ -1629,8 +1629,7 @@ buttons_done: } } if (PtInRect(&rc, pt)) { - HMENU hMenu; - hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDGROUP, 0, 0); + HMENU hMenu = Menu_BuildGroupMenu(); TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL); DestroyTrayMenu(hMenu); return 0; diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 8cf100d225..b785b163e3 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -37,7 +37,6 @@ extern HICON overlayicons[10]; extern int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
extern int SetHideOffline(WPARAM wParam, LPARAM lParam);
-HMENU BuildGroupPopupMenu(ClcGroup *group);
ClcContact *CreateClcContact(void);
CListEvent *fnCreateEvent(void);
void ReloadThemedOptions();
@@ -192,7 +191,6 @@ extern "C" int __declspec(dllexport) CListInitialise() // get the clist interface
pcli->hInst = g_hInst;
- pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
pcli->pfnCompareContacts = CompareContacts;
pcli->pfnCreateClcContact = CreateClcContact;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 22ced59186..1fc1c4a043 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -117,18 +117,9 @@ void InitMenu() Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_ImportAll);
- bool bSubGroups = 1 == ServiceExists(MS_CLIST_MENUBUILDSUBGROUP);
-
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
- if (bSubGroups) {
- CMenuItem miroot;
- miroot.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
- miroot.name.a = QUOTES_PROTOCOL_NAME;
- mi.root = Menu_AddContactMenuItem(&miroot, QUOTES_PROTOCOL_NAME);
- }
- else mi.root = NULL;
-
+ mi.root = Menu_CreateRoot(MO_CONTACT, _T(QUOTES_PROTOCOL_NAME), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
mi.name.t = LPGENT("Refresh");
mi.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);
mi.pszService = "Quotes/RefreshContact";
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index b95da08213..4e6e31cdb9 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -234,18 +234,10 @@ static int onModulesLoaded(WPARAM, LPARAM) g_hMenu[0] = MyAddMenuItem(sim301, 110000, g_hICO[ICO_CM_EST], MODULENAME"/SIM_EST", CMIF_NOTOFFLINE);
g_hMenu[1] = MyAddMenuItem(sim302, 110001, g_hICO[ICO_CM_DIS], MODULENAME"/SIM_DIS", CMIF_NOTOFFLINE);
- if (ServiceExists(MS_CLIST_MENUBUILDSUBGROUP)) {
- g_hMenu[2] = MyAddMenuItem(sim312[0], 110002, NULL, NULL);
- g_hMenu[3] = MyAddSubItem(g_hMenu[2], sim232[0], 110003, 110002, MODULENAME"/SIM_ST_DIS");
- g_hMenu[4] = MyAddSubItem(g_hMenu[2], sim232[1], 110004, 110002, MODULENAME"/SIM_ST_ENA");
- g_hMenu[5] = MyAddSubItem(g_hMenu[2], sim232[2], 110005, 110002, MODULENAME"/SIM_ST_TRY");
- }
- else {
- g_hMenu[2] = 0;
- g_hMenu[3] = MyAddMenuItem(sim232W[0], 110003, NULL, MODULENAME"/SIM_ST_DIS");
- g_hMenu[4] = MyAddMenuItem(sim232W[1], 110004, NULL, MODULENAME"/SIM_ST_ENA");
- g_hMenu[5] = MyAddMenuItem(sim232W[2], 110005, NULL, MODULENAME"/SIM_ST_TRY");
- }
+ g_hMenu[2] = MyAddMenuItem(sim312[0], 110002, NULL, NULL);
+ g_hMenu[3] = MyAddSubItem(g_hMenu[2], sim232[0], 110003, 110002, MODULENAME"/SIM_ST_DIS");
+ g_hMenu[4] = MyAddSubItem(g_hMenu[2], sim232[1], 110004, 110002, MODULENAME"/SIM_ST_ENA");
+ g_hMenu[5] = MyAddSubItem(g_hMenu[2], sim232[2], 110005, 110002, MODULENAME"/SIM_ST_TRY");
if (bPGPloaded) {
g_hMenu[6] = MyAddMenuItem(sim306, 110006, mode2icon(MODE_PGP | SECURED, 2), MODULENAME"/PGP_SET", 0);
@@ -257,20 +249,11 @@ static int onModulesLoaded(WPARAM, LPARAM) g_hMenu[9] = MyAddMenuItem(sim309, 110009, mode2icon(MODE_GPG, 2), MODULENAME"/GPG_DEL", 0);
}
- if (ServiceExists(MS_CLIST_MENUBUILDSUBGROUP)) {
- g_hMenu[10] = MyAddMenuItem(sim311[0], 110010, NULL, NULL);
- g_hMenu[11] = MyAddSubItem(g_hMenu[10], sim231[0], 110011, 110010, MODULENAME"/MODE_NAT");
- g_hMenu[12] = MyAddSubItem(g_hMenu[10], sim231[1], 110012, 110010, MODULENAME"/MODE_PGP");
- g_hMenu[13] = MyAddSubItem(g_hMenu[10], sim231[2], 110013, 110010, MODULENAME"/MODE_GPG");
- g_hMenu[14] = MyAddSubItem(g_hMenu[10], sim231[3], 110014, 110010, MODULENAME"/MODE_RSA");
- }
- else {
- g_hMenu[10] = 0;
- g_hMenu[11] = MyAddMenuItem(sim231W[0], 110011, NULL, MODULENAME"/MODE_NAT");
- g_hMenu[12] = MyAddMenuItem(sim231W[1], 110012, NULL, MODULENAME"/MODE_PGP");
- g_hMenu[13] = MyAddMenuItem(sim231W[2], 110013, NULL, MODULENAME"/MODE_GPG");
- g_hMenu[14] = MyAddMenuItem(sim231W[3], 110014, NULL, MODULENAME"/MODE_RSA");
- }
+ g_hMenu[10] = MyAddMenuItem(sim311[0], 110010, NULL, NULL);
+ g_hMenu[11] = MyAddSubItem(g_hMenu[10], sim231[0], 110011, 110010, MODULENAME"/MODE_NAT");
+ g_hMenu[12] = MyAddSubItem(g_hMenu[10], sim231[1], 110012, 110010, MODULENAME"/MODE_PGP");
+ g_hMenu[13] = MyAddSubItem(g_hMenu[10], sim231[2], 110013, 110010, MODULENAME"/MODE_GPG");
+ g_hMenu[14] = MyAddSubItem(g_hMenu[10], sim231[3], 110014, 110010, MODULENAME"/MODE_RSA");
InitSRMMIcons();
return 0;
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index 24822fa83c..003a2c9a88 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -315,7 +315,7 @@ void RebuildGroup() mi.position = 250000;
mi.hIcolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.name.a = MODULELONGNAME;
- mhRoot = Menu_AddGroupMenuItem(0, &mi);
+ mhRoot = Menu_AddGroupMenuItem(&mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
break;
@@ -324,7 +324,7 @@ void RebuildGroup() mi.position = 250100;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.name.a = LPGEN("Export/import contact");
- mhExIm = Menu_AddGroupMenuItem(0, &mi);
+ mhExIm = Menu_AddGroupMenuItem(&mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
break;
@@ -341,14 +341,14 @@ void RebuildGroup() mi.name.a = LPGEN("Export all contacts");
mi.position = 250200;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
- hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
+ hMenuItem[item++] = Menu_AddGroupMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORTALL;
mi.name.a = LPGEN("Import all contacts");
mi.position = 250300;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
- hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
+ hMenuItem[item++] = Menu_AddGroupMenuItem(&mi);
}
/******************************
@@ -403,7 +403,7 @@ void RebuildSubGroup() mi.position = 1050000;
mi.hIcolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.name.a = MODULELONGNAME;
- mhRoot = Menu_AddSubGroupMenuItem(0, &mi);
+ mhRoot = Menu_AddSubGroupMenuItem(&mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
break;
@@ -412,7 +412,7 @@ void RebuildSubGroup() mi.position = 1050100;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.name.a = LPGEN("Export/import group");
- mhExIm = Menu_AddSubGroupMenuItem(0, &mi);
+ mhExIm = Menu_AddSubGroupMenuItem(&mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
break;
@@ -430,9 +430,8 @@ void RebuildSubGroup() mi.name.a = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
mi.position = 1050200;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
- gmp.lParam = 0;
gmp.wParam = TRUE;
- hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
+ hMenuItem[item++] = Menu_AddSubGroupMenuItem(&mi, &gmp);
// Import
mir_strcpy(tDest, "/ImportGroup"); //mi.pszService
@@ -440,9 +439,8 @@ void RebuildSubGroup() mi.name.a = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
mi.position = 1050300;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
- gmp.lParam = 0;
gmp.wParam = FALSE;
- hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
+ hMenuItem[item++] = Menu_AddSubGroupMenuItem(&mi, &gmp);
}
/******************************
diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp index 3903953df5..89b4e8f7f4 100644 --- a/src/core/stdclist/src/clistmenus.cpp +++ b/src/core/stdclist/src/clistmenus.cpp @@ -36,3 +36,15 @@ 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 deff5b4d14..36f7a7bb33 100644 --- a/src/core/stdclist/src/commonheaders.h +++ b/src/core/stdclist/src/commonheaders.h @@ -63,3 +63,5 @@ 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 efb6a00d7c..be4175b8e9 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -139,6 +139,7 @@ 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/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 8377782a84..5e01f4a12c 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -61,16 +61,10 @@ void fnClcOptionsChanged(void) cli.pfnClcBroadcast(INTM_RELOADOPTIONS, 0, 0);
}
-HMENU fnBuildGroupPopupMenu(ClcGroup* group)
+// stub. does nothing
+HMENU fnBuildGroupPopupMenu(ClcGroup *group)
{
- HMENU hMenu = LoadMenu(cli.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;
+ return Menu_BuildSubGroupMenu(group);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -279,10 +273,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, cli.pfnRegisterFileDropping(hwnd);
if (dat == NULL) {
dat = (struct ClcData *) mir_calloc(sizeof(struct ClcData));
- SetWindowLongPtr(hwnd, 0, (LONG_PTR) dat);
+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat);
}
{
- for (int i=0; i <= FONTID_MAX; i++)
+ for (int i = 0; i <= FONTID_MAX; i++)
dat->fontInfo[i].changed = 1;
}
dat->selection = -1;
@@ -306,7 +300,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.code = CLN_LISTREBUILT;
nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
break;
@@ -348,14 +342,14 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, HBITMAP hBmp = CreateBitmap(rc.right, rc.bottom, 1, depth, NULL);
HBITMAP hBmpMask = CreateBitmap(rc.right, rc.bottom, 1, 1, NULL);
HDC hdcMem = CreateCompatibleDC(hdc);
- HBITMAP hoBmp = (HBITMAP) SelectObject(hdcMem, hBmp);
+ HBITMAP hoBmp = (HBITMAP)SelectObject(hdcMem, hBmp);
HBRUSH hBrush = CreateSolidBrush(dat->useWindowsColours ? GetSysColor(COLOR_HIGHLIGHT) : dat->selBkColour);
FillRect(hdcMem, &rc, hBrush);
DeleteObject(hBrush);
HBITMAP hoMaskBmp = (HBITMAP)SelectObject(hdcMem, hBmpMask);
FillRect(hdcMem, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
- SelectObject(hdcMem, hoMaskBmp);
+ SelectObject(hdcMem, hoMaskBmp);
SelectObject(hdcMem, hoBmp);
DeleteDC(hdcMem);
ReleaseDC(hwnd, hdc);
@@ -374,7 +368,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case WM_GETDLGCODE:
if (lParam) {
- MSG *msg = (MSG *) lParam;
+ MSG *msg = (MSG *)lParam;
if (msg->message == WM_KEYDOWN) {
if (msg->wParam == VK_TAB)
return 0;
@@ -403,7 +397,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_GROUPSCHANGED:
{
- DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *) lParam;
+ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (dbcws->value.type == DBVT_ASCIIZ || dbcws->value.type == DBVT_UTF8) {
int groupId = atoi(dbcws->szSetting) + 1;
TCHAR szFullName[512];
@@ -412,7 +406,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (cli.pfnFindItem(hwnd, dat, groupId | HCONTACT_ISGROUP, &contact, &group, NULL)) {
mir_tstrcpy(szFullName, contact->szText);
while (group->parent) {
- for (i=0; i < group->parent->cl.count; i++)
+ for (i = 0; i < group->parent->cl.count; i++)
if (group->parent->cl.items[i]->group == group)
break;
if (i == group->parent->cl.count) {
@@ -431,12 +425,12 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, }
if (dbcws->value.type == DBVT_ASCIIZ) {
- WCHAR* wszGrpName = mir_a2u(dbcws->value.pszVal+1);
+ WCHAR* wszGrpName = mir_a2u(dbcws->value.pszVal + 1);
eq = !mir_tstrcmp(szFullName, wszGrpName);
mir_free(wszGrpName);
}
else {
- char* szGrpName = NEWSTR_ALLOCA(dbcws->value.pszVal+1);
+ char* szGrpName = NEWSTR_ALLOCA(dbcws->value.pszVal + 1);
WCHAR* wszGrpName;
Utf8Decode(szGrpName, &wszGrpName);
eq = !mir_tstrcmp(szFullName, wszGrpName);
@@ -467,7 +461,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_HIDDENCHANGED:
{
- DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *) lParam;
+ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN)
break;
if (dbcws->value.type == DBVT_DELETED || dbcws->value.bVal == 0) {
@@ -507,7 +501,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
nm.hItem = (HANDLE)wParam;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
dat->needsResort = 1;
}
}
@@ -542,14 +536,14 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, recalcScrollBar = 1;
cli.pfnFindItem(hwnd, dat, wParam, &contact, NULL, NULL);
if (contact) {
- contact->iImage = (WORD) lParam;
+ contact->iImage = (WORD)lParam;
cli.pfnNotifyNewContact(hwnd, wParam);
dat->needsResort = 1;
}
}
}
else { // item in list already
- if (contact->iImage == (WORD) lParam)
+ if (contact->iImage == (WORD)lParam)
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
@@ -558,7 +552,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, recalcScrollBar = 1;
}
else {
- contact->iImage = (WORD) lParam;
+ contact->iImage = (WORD)lParam;
if (!cli.pfnIsHiddenMode(dat, status))
contact->flags |= CONTACTF_ONLINE;
else
@@ -601,7 +595,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
if (contact->type == CLCIT_CONTACT) {
- DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *) lParam;
+ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (dbcws->value.type == DBVT_DELETED || dbcws->value.bVal == 0)
contact->flags &= ~CONTACTF_NOTONLIST;
else
@@ -650,7 +644,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
case WM_PRINTCLIENT:
- cli.pfnPaintClc(hwnd, dat, (HDC) wParam, NULL);
+ cli.pfnPaintClc(hwnd, dat, (HDC)wParam, NULL);
break;
case WM_NCPAINT:
@@ -659,7 +653,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, HRGN hClientRgn;
ClientToScreen(hwnd, &ptTopLeft);
hClientRgn = CreateRectRgn(0, 0, 1, 1);
- CombineRgn(hClientRgn, (HRGN) wParam, NULL, RGN_COPY);
+ CombineRgn(hClientRgn, (HRGN)wParam, NULL, RGN_COPY);
OffsetRgn(hClientRgn, -ptTopLeft.x, -ptTopLeft.y);
InvalidateRgn(hwnd, hClientRgn, FALSE);
DeleteObject(hClientRgn);
@@ -713,7 +707,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, UINT scrollLines;
if (!SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &scrollLines, FALSE))
scrollLines = 3;
- cli.pfnScrollTo(hwnd, dat, dat->yScroll - (short) HIWORD(wParam) * dat->rowHeight * (signed) scrollLines / WHEEL_DELTA, 0);
+ cli.pfnScrollTo(hwnd, dat, dat->yScroll - (short)HIWORD(wParam) * dat->rowHeight * (signed)scrollLines / WHEEL_DELTA, 0);
}
return 0;
@@ -757,7 +751,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nmkey.hdr.code = NM_KEYDOWN;
nmkey.nVKey = wParam;
nmkey.uFlags = HIWORD(lParam);
- if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nmkey))
+ if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nmkey))
return 0;
}
}
@@ -822,11 +816,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
else {
TCHAR szNew[2];
- szNew[0] = (TCHAR) wParam;
+ szNew[0] = (TCHAR)wParam;
szNew[1] = '\0';
if (mir_tstrlen(dat->szQuickSearch) >= _countof(dat->szQuickSearch) - 1) {
MessageBeep(MB_OK);
@@ -845,7 +839,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, dat->selection = index;
else {
MessageBeep(MB_OK);
- dat->szQuickSearch[ mir_tstrlen(dat->szQuickSearch) - 1] = '\0';
+ dat->szQuickSearch[mir_tstrlen(dat->szQuickSearch) - 1] = '\0';
cli.pfnSaveStateAndRebuildList(hwnd, dat);
}
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
@@ -869,7 +863,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, return 0;
case WM_TIMER:
- switch(wParam) {
+ switch (wParam) {
case TIMERID_RENAME:
cli.pfnBeginRenameSelection(hwnd, dat);
break;
@@ -905,7 +899,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, it.hItem = (contact->type == CLCIT_GROUP) ? (HANDLE)contact->groupId : (HANDLE)contact->hContact;
it.cbSize = sizeof(it);
dat->hInfoTipItem = cli.pfnContactToHItem(contact);
- NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM) & it);
+ NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)& it);
break;
}
case TIMERID_REBUILDAFTER:
@@ -932,12 +926,12 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, KillTimer(hwnd, TIMERID_INFOTIP);
KillTimer(hwnd, TIMERID_RENAME);
cli.pfnEndRename(hwnd, dat, 1);
- dat->ptDragStart.x = (short) LOWORD(lParam);
- dat->ptDragStart.y = (short) HIWORD(lParam);
+ dat->ptDragStart.x = (short)LOWORD(lParam);
+ dat->ptDragStart.y = (short)HIWORD(lParam);
if (!dat->filterSearch)
dat->szQuickSearch[0] = 0;
- hit = cli.pfnHitTest(hwnd, dat, (short) LOWORD(lParam), (short) HIWORD(lParam), &contact, &group, &hitFlags);
+ hit = cli.pfnHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, &group, &hitFlags);
if (hit != -1) {
if (hit == dat->selection && hitFlags & CLCHT_ONITEMLABEL && dat->exStyle & CLS_EX_EDITLABELS) {
SetCapture(hwnd);
@@ -977,7 +971,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
if (!(hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMLABEL | CLCHT_ONITEMCHECK))) {
NMCLISTCONTROL nm;
@@ -991,7 +985,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
nm.iColumn = hitFlags & CLCHT_ONITEMEXTRA ? HIBYTE(HIWORD(hitFlags)) : -1;
nm.pt = dat->ptDragStart;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
if (hitFlags & (CLCHT_ONITEMCHECK | CLCHT_ONITEMEXTRA))
break;
@@ -1000,12 +994,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (dat->selection != -1)
cli.pfnEnsureVisible(hwnd, dat, hit, 0);
UpdateWindow(hwnd);
- if (dat->selection != -1 && (contact->type == CLCIT_CONTACT || contact->type == CLCIT_GROUP)
- && !(hitFlags & (CLCHT_ONITEMEXTRA | CLCHT_ONITEMCHECK))) {
- SetCapture(hwnd);
- dat->iDragItem = dat->selection;
- dat->dragStage = DRAGSTAGE_NOTMOVED;
- dat->dragAutoScrolling = 0;
+ if (dat->selection != -1 && (contact->type == CLCIT_CONTACT || contact->type == CLCIT_GROUP) && !(hitFlags & (CLCHT_ONITEMEXTRA | CLCHT_ONITEMCHECK))) {
+ SetCapture(hwnd);
+ dat->iDragItem = dat->selection;
+ dat->dragStage = DRAGSTAGE_NOTMOVED;
+ dat->dragAutoScrolling = 0;
}
break;
@@ -1016,7 +1009,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
if (GetKeyState(VK_MENU) & 0x8000 || GetKeyState(VK_F10) & 0x8000)
break;
- dat->iHotTrack = cli.pfnHitTest(hwnd, dat, (short) LOWORD(lParam), (short) HIWORD(lParam), NULL, NULL, NULL);
+ dat->iHotTrack = cli.pfnHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), NULL, NULL, NULL);
if (iOldHotTrack != dat->iHotTrack) {
if (iOldHotTrack == -1)
SetCapture(hwnd);
@@ -1030,15 +1023,15 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, }
KillTimer(hwnd, TIMERID_INFOTIP);
if (wParam == 0 && dat->hInfoTipItem == NULL) {
- dat->ptInfoTip.x = (short) LOWORD(lParam);
- dat->ptInfoTip.y = (short) HIWORD(lParam);
+ dat->ptInfoTip.x = (short)LOWORD(lParam);
+ dat->ptInfoTip.y = (short)HIWORD(lParam);
SetTimer(hwnd, TIMERID_INFOTIP, dat->infoTipTimeout, NULL);
}
break;
}
if ((dat->dragStage & DRAGSTAGEM_STAGE) == DRAGSTAGE_NOTMOVED && !(dat->exStyle & CLS_EX_DISABLEDRAGDROP)) {
- if (abs((short) LOWORD(lParam) - dat->ptDragStart.x) >= GetSystemMetrics(SM_CXDRAG)
- || abs((short) HIWORD(lParam) - dat->ptDragStart.y) >= GetSystemMetrics(SM_CYDRAG))
+ if (abs((short)LOWORD(lParam) - dat->ptDragStart.x) >= GetSystemMetrics(SM_CXDRAG)
+ || abs((short)HIWORD(lParam) - dat->ptDragStart.y) >= GetSystemMetrics(SM_CYDRAG))
dat->dragStage = (dat->dragStage & ~DRAGSTAGEM_STAGE) | DRAGSTAGE_ACTIVE;
}
if ((dat->dragStage & DRAGSTAGEM_STAGE) == DRAGSTAGE_ACTIVE) {
@@ -1048,8 +1041,8 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, int target;
GetClientRect(hwnd, &clRect);
- pt.x = (short) LOWORD(lParam);
- pt.y = (short) HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
hNewCursor = LoadCursor(NULL, IDC_NO);
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
if (dat->dragAutoScrolling) {
@@ -1066,7 +1059,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
dat->dragStage &= ~DRAGSTAGEF_OUTSIDE;
}
switch (target) {
@@ -1085,15 +1078,15 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (pt.x >= 0 && pt.x < clRect.right
&& ((pt.y < 0 && pt.y > -dat->dragAutoScrollHeight)
- || (pt.y >= clRect.bottom && pt.y < clRect.bottom + dat->dragAutoScrollHeight))) {
- if (!dat->dragAutoScrolling) {
- if (pt.y < 0)
- dat->dragAutoScrolling = -1;
- else
- dat->dragAutoScrolling = 1;
- SetTimer(hwnd, TIMERID_DRAGAUTOSCROLL, dat->scrollTime, NULL);
- }
- SendMessage(hwnd, WM_TIMER, TIMERID_DRAGAUTOSCROLL, 0);
+ || (pt.y >= clRect.bottom && pt.y < clRect.bottom + dat->dragAutoScrollHeight))) {
+ if (!dat->dragAutoScrolling) {
+ if (pt.y < 0)
+ dat->dragAutoScrolling = -1;
+ else
+ dat->dragAutoScrolling = 1;
+ SetTimer(hwnd, TIMERID_DRAGAUTOSCROLL, dat->scrollTime, NULL);
+ }
+ SendMessage(hwnd, WM_TIMER, TIMERID_DRAGAUTOSCROLL, 0);
}
dat->dragStage |= DRAGSTAGEF_OUTSIDE;
@@ -1104,7 +1097,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.flags = 0;
nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
nm.pt = pt;
- if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm))
+ if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm))
return 0;
}
break;
@@ -1123,9 +1116,9 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (dat->iDragItem == -1)
break;
- SetCursor((HCURSOR) GetClassLongPtr(hwnd, GCLP_HCURSOR));
+ SetCursor((HCURSOR)GetClassLongPtr(hwnd, GCLP_HCURSOR));
if (dat->exStyle & CLS_EX_TRACKSELECT) {
- dat->iHotTrack = cli.pfnHitTest(hwnd, dat, (short) LOWORD(lParam), (short) HIWORD(lParam), NULL, NULL, NULL);
+ dat->iHotTrack = cli.pfnHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), NULL, NULL, NULL);
if (dat->iHotTrack == -1)
ReleaseCapture();
}
@@ -1180,7 +1173,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, nm.flags = 0;
nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
nm.pt = pt;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
break;
default:
diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp index 596a5e3116..517feaef52 100644 --- a/src/mir_app/src/clistmenus.cpp +++ b/src/mir_app/src/clistmenus.cpp @@ -30,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "clc.h"
#include "genmenu.h"
+void InitGroupMenus();
+
#define MS_CLIST_HKSTATUS "Clist/HK/SetStatus"
#define FIRSTCUSTOMMENUITEMID 30000
@@ -1145,6 +1147,9 @@ void InitCustomMenus(void) Menu_ConfigureObject(hContactMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hContactMenuObject, MCO_OPT_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataContactMenu");
+ // other menus
+ InitGroupMenus();
+
// initialize hotkeys
CreateServiceFunction(MS_CLIST_HKSTATUS, HotkeySetStatus);
diff --git a/src/mir_app/src/groupmenu.cpp b/src/mir_app/src/groupmenu.cpp new file mode 100644 index 0000000000..ea7c929ee5 --- /dev/null +++ b/src/mir_app/src/groupmenu.cpp @@ -0,0 +1,250 @@ +/*
+
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-08 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "stdafx.h"
+
+/////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////// Group MENU //////////////////////////////
+
+int hGroupMenuObject, hSubGroupMenuObject;
+static HANDLE hEventPreBuildGroupMenu, hEventPreBuildSubGroupMenu;
+
+// Groupmenu exec param(ownerdata)
+
+struct GroupMenuExecParam
+{
+ char *szServiceName;
+ int Param1, Param2;
+};
+
+MIR_APP_DLL(HMENU) Menu_BuildGroupMenu()
+{
+ NotifyEventHooks(hEventPreBuildGroupMenu, 0, 0);
+
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hGroupMenuObject);
+ return hMenu;
+}
+
+MIR_APP_DLL(HGENMENU) Menu_AddGroupMenuItem(TMO_MenuItem *pmi, GroupMenuParam *gmp)
+{
+ GroupMenuExecParam *mmep = (GroupMenuExecParam*)mir_calloc(sizeof(GroupMenuExecParam));
+ if (mmep == NULL)
+ return 0;
+
+ // we need just one parametr.
+ mmep->szServiceName = mir_strdup(pmi->pszService);
+ if (gmp != NULL) {
+ mmep->Param1 = gmp->wParam;
+ mmep->Param2 = gmp->lParam;
+ }
+
+ HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi, mmep);
+
+ char buf[1024];
+ mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return hNewItem;
+}
+
+// called with:
+// wparam - ownerdata
+// lparam - lparam from winproc
+INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam != 0) {
+ GroupMenuExecParam * mmep = (GroupMenuExecParam *)wParam;
+ if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
+ //bug in help.c,it used wparam as parent window handle without reason.
+ mmep->Param1 = 0;
+ CallService(mmep->szServiceName, mmep->Param1, lParam);
+ }
+ else CallService(mmep->szServiceName, mmep->Param1, mmep->Param2);
+ }
+ return 1;
+}
+
+INT_PTR FreeOwnerDataGroupMenu(WPARAM, LPARAM lParam)
+{
+ GroupMenuExecParam * mmep = (GroupMenuExecParam *)lParam;
+ if (mmep != NULL) {
+ mir_free(mmep->szServiceName);
+ mir_free(mmep);
+ }
+
+ return 0;
+}
+
+INT_PTR HideGroupsHelper(WPARAM, LPARAM)
+{
+ int newVal = !(GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
+ db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)newVal);
+ SendMessage(cli.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
+ return 0;
+}
+
+INT_PTR UseGroupsHelper(WPARAM, LPARAM)
+{
+ int newVal = !(GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
+ db_set_b(NULL, "CList", "UseGroups", (BYTE)newVal);
+ SendMessage(cli.hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
+ return 0;
+}
+
+INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
+{
+ SendMessage(cli.hwndContactTree, CLM_SETHIDEOFFLINEROOT,
+ !SendMessage(cli.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0),
+ 0);
+ return 0;
+}
+
+INT_PTR CreateGroupHelper(WPARAM, LPARAM)
+{
+ SendMessage(cli.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, 0, 0);
+ SendMessage(cli.hwndContactTree, CLM_SETUSEGROUPS, 1, 0);
+ Clist_CreateGroup(0, 0);
+ return 0;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////// SubGroup MENU //////////////////////////////
+
+struct SubGroupMenuExecParam
+{
+ char *szServiceName;
+ int Param1, Param2;
+};
+
+MIR_APP_DLL(HMENU) Menu_BuildSubGroupMenu(ClcGroup *group)
+{
+ NotifyEventHooks(hEventPreBuildSubGroupMenu, (WPARAM)group, 0);
+
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hSubGroupMenuObject, (WPARAM)group, 0);
+ 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));
+ if (mmep == NULL)
+ return 0;
+
+ // we need just one parametr.
+ mmep->szServiceName = mir_strdup(pmi->pszService);
+ if (gmp != NULL) {
+ mmep->Param1 = gmp->wParam;
+ mmep->Param2 = gmp->lParam;
+ }
+
+ HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi, mmep);
+
+ char buf[1024];
+ mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return hNewItem;
+}
+
+static INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM)
+{
+ TCheckProcParam * CParam = (TCheckProcParam*)wParam;
+ if (CParam) {
+ SubGroupMenuExecParam * mmep = (SubGroupMenuExecParam *)(CParam->MenuItemOwnerData);
+ if (mmep)
+ mmep->Param2 = CParam->lParam;
+ }
+ return 1;
+}
+
+// called with:
+// wparam - ownerdata
+// lparam - lparam from winproc
+static INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam != 0) {
+ SubGroupMenuExecParam * mmep = (SubGroupMenuExecParam *)wParam;
+ if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
+ //bug in help.c,it used wparam as parent window handle without reason.
+ mmep->Param1 = 0;
+ CallService(mmep->szServiceName, mmep->Param1, lParam);
+ }
+ else CallService(mmep->szServiceName, mmep->Param1, lParam);
+ }
+ return 1;
+}
+
+static INT_PTR FreeOwnerDataSubGroupMenu(WPARAM, LPARAM lParam)
+{
+ SubGroupMenuExecParam * mmep = (SubGroupMenuExecParam *)lParam;
+ if (mmep != NULL) {
+ mir_free(mmep->szServiceName);
+ mir_free(mmep);
+ }
+ return 0;
+}
+
+// wparam menu handle to pass to clc.c
+// lparam WM_COMMAND HWND
+static INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam)
+{
+ SendMessage(lParam ? (HWND)lParam : (HWND)cli.hwndContactTree, WM_COMMAND, wParam, 0);
+ return 0;
+}
+
+void InitGroupMenus(void)
+{
+ // 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);
+
+ 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");
+
+ // SubGroup menu
+ CreateServiceFunction("CLISTMENUSSubGroup/ExecService", SubGroupMenuExecService);
+ CreateServiceFunction("CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu", FreeOwnerDataSubGroupMenu);
+ CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService", SubGroupMenuCheckService);
+ CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);
+
+ hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
+
+ 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");
+}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index f8cb51b46f..584a79020a 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -229,3 +229,7 @@ Menu_BuildContactMenu @226 Menu_BuildMainMenu @227
Menu_GetMainMenu @228
Menu_GetStatusMenu @229
+Menu_BuildSubGroupMenu @230
+Menu_AddGroupMenuItem @231
+Menu_AddSubGroupMenuItem @232
+Menu_BuildGroupMenu @233
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 0e85f44f5c..52c1014550 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -229,3 +229,7 @@ Menu_BuildContactMenu @226 Menu_BuildMainMenu @227
Menu_GetMainMenu @228
Menu_GetStatusMenu @229
+Menu_BuildSubGroupMenu @230
+Menu_AddGroupMenuItem @231
+Menu_AddSubGroupMenuItem @232
+Menu_BuildGroupMenu @233
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index aba85570c5..a93754f9a4 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -122,6 +122,8 @@ int ImageList_ReplaceIcon_IconLibLoaded(HIMAGELIST hIml, int nIndex, HICON hIcon /**** clistmenus.cpp ********************************************************************/
+extern CLIST_INTERFACE cli;
+
extern int hMainMenuObject, hContactMenuObject, hStatusMenuObject;
extern HANDLE hPreBuildMainMenuEvent, hPreBuildContactMenuEvent;
extern HANDLE hShutdownEvent, hPreShutdownEvent;
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index 7fd2a39ca5..00027b4c75 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -585,6 +585,7 @@ #define IDM_COPYLINK 40016
#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
|