From 2df91a43744f16707f02decf880ae73f3be8d954 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Sep 2012 20:07:53 +0000 Subject: fix for popup & main menus git-svn-id: http://svn.miranda-ng.org/main/trunk@1614 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/MraIcons.cpp | 15 ++++++++------- protocols/MRA/MraProto.cpp | 4 ++-- protocols/MRA/MraProto.h | 6 ++---- protocols/MRA/Mra_svcs.cpp | 15 --------------- 4 files changed, 12 insertions(+), 28 deletions(-) (limited to 'protocols') diff --git a/protocols/MRA/MraIcons.cpp b/protocols/MRA/MraIcons.cpp index 2d8e3118c1..d3d6828238 100644 --- a/protocols/MRA/MraIcons.cpp +++ b/protocols/MRA/MraIcons.cpp @@ -9,9 +9,9 @@ GUI_DISPLAY_ITEM gdiMenuItems[] = { MRA_MY_ALBUM, MRA_MY_ALBUM_STR, IDI_MRA_PHOTO, &CMraProto::MraViewAlbum }, { MRA_MY_BLOG, MRA_MY_BLOG_STR, IDI_MRA_BLOGS, &CMraProto::MraReadBlog }, { MRA_MY_BLOGSTATUS, MRA_MY_BLOGSTATUS_STR, IDI_BLOGSTATUS, &CMraProto::MraReplyBlogStatus }, - { MRA_MY_VIDEO, MRA_MY_VIDEO_STR, IDI_MRA_VIDEO, &CMraProto::MyVideo }, - { MRA_MY_ANSWERS, MRA_MY_ANSWERS_STR, IDI_MRA_ANSWERS, &CMraProto::MyAnswers }, - { MRA_MY_WORLD, MRA_MY_WORLD_STR, IDI_MRA_WORLD, &CMraProto::MyWorld }, + { MRA_MY_VIDEO, MRA_MY_VIDEO_STR, IDI_MRA_VIDEO, &CMraProto::MraViewVideo }, + { MRA_MY_ANSWERS, MRA_MY_ANSWERS_STR, IDI_MRA_ANSWERS, &CMraProto::MraAnswers }, + { MRA_MY_WORLD, MRA_MY_WORLD_STR, IDI_MRA_WORLD, &CMraProto::MraWorld }, { MRA_ZHUKI, MRA_ZHUKI_STR, IDI_MRA_ZHUKI, &CMraProto::MraZhuki }, { MRA_CHAT, MRA_CHAT_STR, IDI_MRA_CHAT, &CMraProto::MraChat }, { MRA_WEB_SEARCH, MRA_WEB_SEARCH_STR, IDI_MRA_WEB_SEARCH, &CMraProto::MraWebSearch }, @@ -148,13 +148,14 @@ void CMraProto::DestroyXStatusIcons() ///////////////////////////////////////////////////////////////////////////////////////// -void CMraProto::InitMenus() +void CMraProto::InitMainMenu() { - // Main menu initialization HICON hMainIcon = (HICON)LoadImage(masMraSettings.hInstance, MAKEINTRESOURCE(IDI_MRA), IMAGE_ICON, 0, 0, LR_SHARED); CListCreateMenu(200001, 500085000, hMainIcon, NULL, TRUE, gdiMenuItems, SIZEOF(gdiMenuItems), hMainMenuItems); +} - // Contact menu initialization +void CMraProto::InitContactMenu() +{ CListCreateMenu(2000060000, -500050000, NULL, NULL, FALSE, gdiContactMenuItems, SIZEOF(gdiContactMenuItems), hContactMenuItems); } @@ -198,7 +199,7 @@ void CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, HICON hMain for (size_t i = 0; i < dwCount; i++) { memmove(pszServiceFunctionName, pgdiItems[i].lpszName, lstrlenA(pgdiItems[i].lpszName)+1); if (pgdiItems[i].lpFunc) - CreateObjectSvc(szServiceFunction, pgdiItems[i].lpFunc); + CreateObjectSvc(pgdiItems[i].lpszName, pgdiItems[i].lpFunc); mi.position = int(lPosition + i); mi.icolibItem = pgdiItems[i].hIconHandle; mi.ptszName = pgdiItems[i].lpwszDescr; diff --git a/protocols/MRA/MraProto.cpp b/protocols/MRA/MraProto.cpp index be7c61cc98..d0c0a22348 100644 --- a/protocols/MRA/MraProto.cpp +++ b/protocols/MRA/MraProto.cpp @@ -72,7 +72,7 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : HookEvent(ME_SYSTEM_PRESHUTDOWN, &CMraProto::OnPreShutdown); HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, &CMraProto::MraExtraIconsRebuild); - InitMenus(); + InitContactMenu(); // xstatus menu InitXStatusIcons(); @@ -769,7 +769,7 @@ int CMraProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) // case EV_PROTO_ONOPTIONS: return OnOptionsInit( wParam, lParam ); case EV_PROTO_ONMENU: -// MenuInit(); + InitMainMenu(); break; } return 1; diff --git a/protocols/MRA/MraProto.h b/protocols/MRA/MraProto.h index 7c9dafe4a2..5b9eccf903 100644 --- a/protocols/MRA/MraProto.h +++ b/protocols/MRA/MraProto.h @@ -166,9 +166,6 @@ struct CMraProto : public PROTO_INTERFACE, public MZeroedObject INT_PTR __cdecl MraGotoInbox(WPARAM, LPARAM); INT_PTR __cdecl MraShowInboxStatus(WPARAM, LPARAM); INT_PTR __cdecl MraEditProfile(WPARAM, LPARAM); - INT_PTR __cdecl MyVideo(WPARAM, LPARAM); - INT_PTR __cdecl MyAnswers(WPARAM, LPARAM); - INT_PTR __cdecl MyWorld(WPARAM, LPARAM); INT_PTR __cdecl MraZhuki(WPARAM, LPARAM); INT_PTR __cdecl MraChat(WPARAM, LPARAM); INT_PTR __cdecl MraWebSearch(WPARAM, LPARAM); @@ -317,7 +314,8 @@ struct CMraProto : public PROTO_INTERFACE, public MZeroedObject void MraAPCQueueDestroy(PFIFO_MT pffmtAPCQueue); void __cdecl MraUserAPCThreadProc(LPVOID lpParameter); - void InitMenus(); + void InitMainMenu(); + void InitContactMenu(); void CListCreateMenu(LONG lPosition, LONG lPopupPosition, HICON hMainIcon, LPSTR pszContactOwner, BOOL bIsStatus, const struct GUI_DISPLAY_ITEM *pgdiItems, size_t dwCount, HANDLE *hResult); void CListShowMenuItem(HANDLE hMenuItem, BOOL bShow); diff --git a/protocols/MRA/Mra_svcs.cpp b/protocols/MRA/Mra_svcs.cpp index ea600236cd..e5548986b4 100644 --- a/protocols/MRA/Mra_svcs.cpp +++ b/protocols/MRA/Mra_svcs.cpp @@ -204,21 +204,6 @@ INT_PTR CMraProto::MraEditProfile(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR CMraProto::MyVideo(WPARAM wParam, LPARAM lParam) -{ - return MraViewVideo(0, 0); -} - -INT_PTR CMraProto::MyAnswers(WPARAM wParam, LPARAM lParam) -{ - return MraAnswers(0, 0); -} - -INT_PTR CMraProto::MyWorld(WPARAM wParam, LPARAM lParam) -{ - return MraWorld(0, 0); -} - INT_PTR CMraProto::MraZhuki(WPARAM wParam, LPARAM lParam) { MraMPopSessionQueueAddUrl(hMPopSessionQueue, MRA_ZHUKI_URL, sizeof(MRA_ZHUKI_URL)); -- cgit v1.2.3