From 1e2a3c77546e1d51383df4fa6df0925aafaacd0f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Feb 2016 07:57:31 +0000 Subject: bugfix: Facebook protocol menu gets multiplied if located in main menu git-svn-id: http://svn.miranda-ng.org/main/trunk@16203 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/proto.cpp | 4 ++++ protocols/FacebookRM/src/proto.h | 3 ++- protocols/FacebookRM/src/theme.cpp | 5 ++++- protocols/FacebookRM/src/version.h | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 77d07d4216..73b534eded 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -444,6 +444,10 @@ int FacebookProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); + + case EV_PROTO_ONMENU: + InitMenu(); + break; } return 1; diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 0d1108d2bb..fa2b1788a5 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -133,10 +133,11 @@ public: INT_PTR __cdecl OnMind(WPARAM,LPARAM); - // Initialiation + // Initialization void InitPopups(); void InitHotkeys(); void InitSounds(); + void InitMenu(); // Events int __cdecl OnModulesLoaded(WPARAM, LPARAM); diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 23d1fb889a..1b1e747f49 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -217,7 +217,7 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) return 0; } -int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) +void FacebookProto::InitMenu() { CMenuItem mi; mi.position = 201001; @@ -263,7 +263,10 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) mi.name.a = LPGEN("Check Newsfeeds"); mi.hIcolibItem = GetIconHandle("newsfeed"); Menu_AddProtoMenuItem(&mi, m_szModuleName); +} +int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) +{ ToggleStatusMenuItems(this->isOnline()); return 0; } diff --git a/protocols/FacebookRM/src/version.h b/protocols/FacebookRM/src/version.h index 88a676ca42..dc809ef68e 100644 --- a/protocols/FacebookRM/src/version.h +++ b/protocols/FacebookRM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 2 #define __RELEASE_NUM 11 -#define __BUILD_NUM 7 +#define __BUILD_NUM 8 #include -- cgit v1.2.3