From 315ffb3628684434969b1f740860036a280dddfc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Mar 2013 20:54:17 +0000 Subject: Google account autodetect git-svn-id: http://svn.miranda-ng.org/main/trunk@4208 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/menu.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'protocols/GTalkExt/src/menu.cpp') diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index ea241e6f55..31aa364710 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -20,6 +20,7 @@ //*************************************************************************************** #include "stdafx.h" +#include "db.h" #include "resources.h" #include "options.h" #include "inbox.h" @@ -37,18 +38,20 @@ INT_PTR OpenMailboxMenuHandler(WPARAM wParam, LPARAM lParam, LPARAM param) int InitMenus(WPARAM wParam, LPARAM lParam) { IJabberInterface *ji = (IJabberInterface*)lParam; + LPCSTR szModuleName = ji->Sys()->GetModuleName(); + if ( IsGoogleAccount(szModuleName)) { + char szServiceName[100]; + mir_snprintf(szServiceName, SIZEOF(szServiceName), "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX); + CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName); - char szServiceName[100]; - mir_snprintf(szServiceName, SIZEOF(szServiceName), "%s/%s", ji->Sys()->GetModuleName(), MS_GTALKEXT_OPENMAILBOX); - CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)ji->Sys()->GetModuleName()); - - CLISTMENUITEM cmi = { sizeof(cmi) }; - cmi.flags = CMIF_CHILDPOPUP; - cmi.hParentMenu = HGENMENU(wParam); - cmi.hIcon = g_hPopupIcon; - cmi.position = 200101; - cmi.pszName = LPGEN("Open mailbox"); - cmi.pszService = szServiceName; - Menu_AddProtoMenuItem(&cmi); + CLISTMENUITEM cmi = { sizeof(cmi) }; + cmi.flags = CMIF_CHILDPOPUP; + cmi.hParentMenu = HGENMENU(wParam); + cmi.hIcon = g_hPopupIcon; + cmi.position = 200101; + cmi.pszName = LPGEN("Open mailbox"); + cmi.pszService = szServiceName; + Menu_AddProtoMenuItem(&cmi); + } return 0; } -- cgit v1.2.3