diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-30 20:27:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-30 20:27:23 +0000 |
commit | a8c93cfbf235c31cf604cb6bd40009e9bf88f36a (patch) | |
tree | 0eaf9592ee3cd752e8f2d0273132de0004aa1f6e /protocols/IRCG | |
parent | 6b893bc94df93321a216ba62c3d56a6e08086e36 (diff) |
- 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
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 8 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 19 | ||||
-rw-r--r-- | protocols/IRCG/src/stdafx.h | 2 |
3 files changed, 2 insertions, 27 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 4b60263266..26601b2d0f 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -146,9 +146,6 @@ CIrcProto::~CIrcProto() Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL;
Netlib_CloseHandle(hNetlibDCC); hNetlibDCC = NULL;
- if (hMenuRoot)
- Menu_RemoveItem(hMenuRoot);
-
mir_free(m_alias);
CloseHandle(m_evWndCreate);
@@ -839,11 +836,6 @@ int __cdecl CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l InitMainMenus();
break;
- case EV_PROTO_ONRENAME:
- if (hMenuRoot)
- Menu_ModifyItem(hMenuRoot, m_tszUserName);
- break;
-
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 83f25fec4b..579c409c47 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -23,25 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CIrcProto::InitMainMenus(void)
{
- HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (hRoot == NULL) {
- // Root popupmenuitem
- CMenuItem mi;
- mi.name.t = m_tszUserName;
- mi.position = -1999901010;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hIcolibItem = GetIconHandle(IDI_MAIN);
- hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
- }
- else {
- if (hMenuRoot) {
- Menu_RemoveItem(hMenuRoot);
- hMenuRoot = NULL;
- }
- }
-
CMenuItem mi;
- mi.root = hRoot;
+ mi.root = Menu_GetProtocolRoot(this);
mi.name.a = LPGEN("&Quick connect");
mi.hIcolibItem = GetIconHandle(IDI_QUICK);
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index 8cdf9c96b7..850c2f44e1 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -337,7 +337,7 @@ struct CIrcProto : public PROTO<CIrcProto> DWORD m_bConnectRequested;
DWORD m_bConnectThreadRunning;
- HGENMENU hMenuRoot, hMenuQuick, hMenuServer, hMenuJoin, hMenuNick, hMenuList;
+ HGENMENU hMenuQuick, hMenuServer, hMenuJoin, hMenuNick, hMenuList;
HANDLE hNetlibDCC;
bool bTempDisableCheck, bTempForceCheck, bEcho;
|