summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-25 20:37:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-25 20:37:12 +0000
commit5a3fa95fbe1930c035cd1adffee0792b7d1d8846 (patch)
tree017dfe1d07b1dc16bddf1aa77e85eb19d385f551 /protocols/JabberG
parent3d411171eba820bffa2998f2442c197a553153f4 (diff)
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
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/jabber_11.vcxproj1
-rw-r--r--protocols/JabberG/jabber_11.vcxproj.filters3
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp8
3 files changed, 11 insertions, 1 deletions
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 @@
<ClCompile Include="src\ui_utils.cpp" />
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\include\m_jabber.h" />
<ClInclude Include="src\jabber.h" />
<ClInclude Include="src\jabber_byte.h" />
<ClInclude Include="src\jabber_caps.h" />
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 @@
<ClInclude Include="src\jabber_xstatus.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\m_jabber.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\jabber.rc">
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);
}
//////////////////////////////////////////////////////////////////////////