From a8c93cfbf235c31cf604cb6bd40009e9bf88f36a Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Tue, 30 Jun 2015 20:27:23 +0000
Subject: - fix for the old perversion with manual protocol root calculation; -
 protocol menu root is always created by the core; - other minor problems with
 protocol menus in main menu went away

git-svn-id: http://svn.miranda-ng.org/main/trunk@14462 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 include/delphi/m_protoint.inc | 1 +
 include/m_genmenu.h           | 2 +-
 include/m_protoint.h          | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

(limited to 'include')

diff --git a/include/delphi/m_protoint.inc b/include/delphi/m_protoint.inc
index 716c52f85b..1416684b80 100644
--- a/include/delphi/m_protoint.inc
+++ b/include/delphi/m_protoint.inc
@@ -52,6 +52,7 @@ type
     hProtoIcon    :THANDLE;
     hNetlibUser   :THANDLE;
     hWindowList   :THANDLE;
+    hMainMenuItem :HGENMENU;
 	//////////////////////////////////////////////////////////////////////////////////////
 	//////////////////////////////////////////////////////////////////////////////////////
 	// Virtual functions
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index a159b34e22..3e9b93fbc7 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -245,7 +245,7 @@ __forceinline int Menu_ConfigureItem(HGENMENU hMenu, int iSetting, LPCSTR pszVal
 /////////////////////////////////////////////////////////////////////////////////////////
 // returns HGENMENU of the root item or NULL
 
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_GetProtocolRoot(const char *szProtoName);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_GetProtocolRoot(PROTO_INTERFACE *pThis);
 
 /////////////////////////////////////////////////////////////////////////////////////////
 // kills all menu items & submenus that belong to the hLangpack given
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 3c5cb5f39d..bff7adb764 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <m_system_cpp.h>
 #include <m_protosvc.h>
 #include <m_database.h>
+#include <m_genmenu.h>
 #include <m_utils.h>
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -93,6 +94,7 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject
 	HANDLE      m_hProtoIcon;      // icon to be displayed in the account manager
 	HANDLE      m_hNetlibUser;     // network agent
 	MWindowList m_hWindowList;     // list of all windows which belong to this protocol's instance
+	HGENMENU    m_hMainMenuItem;	 // if protocol menus are displayed in the main menu, this is the root
 
 	//////////////////////////////////////////////////////////////////////////////////////
 	// Helpers
-- 
cgit v1.2.3