From 5a3fa95fbe1930c035cd1adffee0792b7d1d8846 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Mar 2013 20:37:12 +0000 Subject: GTalk menu item is inserted now into the Jabber protocol menu git-svn-id: http://svn.miranda-ng.org/main/trunk@4190 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/jabber_11.vcxproj | 1 + protocols/JabberG/jabber_11.vcxproj.filters | 3 +++ protocols/JabberG/src/jabber_menu.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/jabber_11.vcxproj b/protocols/JabberG/jabber_11.vcxproj index 8a17792102..42b365c162 100644 --- a/protocols/JabberG/jabber_11.vcxproj +++ b/protocols/JabberG/jabber_11.vcxproj @@ -264,6 +264,7 @@ + diff --git a/protocols/JabberG/jabber_11.vcxproj.filters b/protocols/JabberG/jabber_11.vcxproj.filters index 4f8501af1d..916485ff20 100644 --- a/protocols/JabberG/jabber_11.vcxproj.filters +++ b/protocols/JabberG/jabber_11.vcxproj.filters @@ -260,6 +260,9 @@ Header Files + + Header Files + diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 70ea480613..d70d2c5241 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MENUITEM_SERVER 2 #define MENUITEM_RESOURCES 10 -static HANDLE hChooserMenu; +static HANDLE hChooserMenu, hStatusMenuInit; static int iChooserMenuPos = 30000; static HGENMENU g_hMenuRequestAuth; @@ -193,6 +193,8 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) void g_MenuInit(void) { + hStatusMenuInit = CreateHookableEvent(ME_JABBER_MENUINIT); + HookEvent(ME_CLIST_PREBUILDCONTACTMENU, JabberPrebuildContactMenu); CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService); @@ -348,6 +350,8 @@ void g_MenuInit(void) void g_MenuUninit(void) { + DestroyHookableEvent(hStatusMenuInit); + CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuRequestAuth, 0); CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuGrantAuth, 0); CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuRevokeAuth, 0); @@ -844,6 +848,8 @@ void CJabberProto::MenuInit() m_pepServices.RebuildMenu(); CheckMenuItems(); + + NotifyFastHook(hStatusMenuInit, (WPARAM)hJabberRoot, (LPARAM)&m_JabberApi); } ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3