diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-25 09:06:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-25 09:06:37 +0000 |
commit | 8aa669fbc78ce229f45105df09ac25a2df8b8eff (patch) | |
tree | 14ea6da3b83456da5f0c421d3b7691415b68093f /protocols/GTalkExt/src/menu.cpp | |
parent | a881be4206c532a8d7dd1d65fbeed1e1a89e84d2 (diff) |
Google contact removed from clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@4185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/menu.cpp')
-rw-r--r-- | protocols/GTalkExt/src/menu.cpp | 59 |
1 files changed, 8 insertions, 51 deletions
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index 23e571c206..377b776091 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -20,7 +20,6 @@ //***************************************************************************************
#include "stdafx.h"
-#include "menu.h"
#include "resources.h"
#include "options.h"
#include "inbox.h"
@@ -28,66 +27,24 @@ static const LPSTR MS_GTALKEXT_OPENMAILBOX = SHORT_PLUGIN_NAME "/OpenMailbox";
static const LPTSTR _T(OPEN_MAILBOX_ITEM_CAPTION) = LPGENT("Open mailbox");
-HANDLE hOpenMailboxService = 0;
-HANDLE hOpenMailboxMenuItem = 0;
+extern HICON g_hPopupIcon;
+
HANDLE hOnPrebuildMenu = 0;
INT_PTR OpenMailboxMenuHandler(WPARAM wParam, LPARAM lParam)
{
- if (db_get_b((HANDLE)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
- OpenContactInbox((HANDLE)wParam);
- return 0;
-}
-
-int OnPrebuildMenu(WPARAM wParam, LPARAM lParam)
-{
- CLISTMENUITEM cmi = { sizeof(cmi) };
- cmi.flags = CMIM_FLAGS;
- if (!db_get_b((HANDLE)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
- cmi.flags |= CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hOpenMailboxMenuItem, (LPARAM)&cmi);
+ OpenContactInbox((HANDLE)wParam);
return 0;
}
-BOOL InitMenus(BOOL init)
+void InitMenus()
{
- if (init) {
- hOpenMailboxService = (HANDLE)CreateServiceFunction(MS_GTALKEXT_OPENMAILBOX, OpenMailboxMenuHandler);
- if (!hOpenMailboxService) {
- InitMenus(FALSE);
- return FALSE;
- }
-
- extern HICON g_hPopupIcon;
-
+ CreateServiceFunction(MS_GTALKEXT_OPENMAILBOX, OpenMailboxMenuHandler);
+/*!!!!!!!!!!!!!!!!!!!!!
CLISTMENUITEM cmi = { sizeof(cmi) };
cmi.flags = CMIF_TCHAR;
cmi.hIcon = g_hPopupIcon;
cmi.ptszName = _T(OPEN_MAILBOX_ITEM_CAPTION);
cmi.pszService = MS_GTALKEXT_OPENMAILBOX;
- hOpenMailboxMenuItem = Menu_AddContactMenuItem(&cmi);
-
- if (!hOpenMailboxMenuItem) {
- InitMenus(FALSE);
- return FALSE;
- }
-
- hOnPrebuildMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPrebuildMenu);
- if (!hOnPrebuildMenu) {
- InitMenus(FALSE);
- return FALSE;
- }
- }
- else {
- if (hOnPrebuildMenu) {
- UnhookEvent(hOnPrebuildMenu);
- hOnPrebuildMenu = 0;
- }
- if (hOpenMailboxService) {
- DestroyServiceFunction(hOpenMailboxService);
- hOpenMailboxService = 0;
- }
- }
-
- return TRUE;
-}
\ No newline at end of file + Menu_AddContactMenuItem(&cmi); */
+}
|