summaryrefslogtreecommitdiff
path: root/protocols/MSN
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-30 20:27:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-30 20:27:23 +0000
commita8c93cfbf235c31cf604cb6bd40009e9bf88f36a (patch)
tree0eaf9592ee3cd752e8f2d0273132de0004aa1f6e /protocols/MSN
parent6b893bc94df93321a216ba62c3d56a6e08086e36 (diff)
- fix for the old perversion with manual protocol root calculation;
- protocol menu root is always created by the core; - other minor problems with protocol menus in main menu went away git-svn-id: http://svn.miranda-ng.org/main/trunk@14462 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r--protocols/MSN/src/msn_menu.cpp23
-rw-r--r--protocols/MSN/src/msn_proto.cpp7
-rw-r--r--protocols/MSN/src/msn_proto.h2
3 files changed, 1 insertions, 31 deletions
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 2458b7aeb1..43b52d153b 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -269,22 +269,7 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM)
void CMsnProto::MsnInitMainMenu(void)
{
CMenuItem mi;
-
- HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (hRoot == NULL) {
- mi.position = 500085000;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hIcolibItem = GetIconHandle(IDI_MSN);
- mi.name.t = m_tszUserName;
- hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi);
- }
- else {
- MsnRemoveMainMenus();
- mainMenuRoot = NULL;
- }
-
- mi.flags = 0;
- mi.root = hRoot;
+ mi.root = Menu_GetProtocolRoot(this);
#ifdef OBSOLETE
mi.pszService = MS_SET_NICKNAME_UI;
@@ -326,12 +311,6 @@ void CMsnProto::MsnInitMainMenu(void)
MSN_EnableMenuItems(m_iStatus >= ID_STATUS_ONLINE);
}
-void CMsnProto::MsnRemoveMainMenus(void)
-{
- if (mainMenuRoot)
- Menu_RemoveItem(mainMenuRoot);
-}
-
void CMsnProto::MSN_EnableMenuItems(bool bEnable)
{
for (int i = 0; i < _countof(menuItemsMain); i++)
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 8bf72194d9..5c9955d37b 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -151,8 +151,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
CMsnProto::~CMsnProto()
{
- MsnRemoveMainMenus();
-
MSN_FreeGroups();
Threads_Uninit();
AvatarQueue_Uninit();
@@ -1230,11 +1228,6 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings);
break;
- case EV_PROTO_ONRENAME:
- if (mainMenuRoot)
- Menu_ModifyItem(mainMenuRoot, m_tszUserName);
- break;
-
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index 5020d88ad2..952c32db05 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -254,11 +254,9 @@ struct CMsnProto : public PROTO<CMsnProto>
/////////////////////////////////////////////////////////////////////////////////////////
// MSN menus
- HGENMENU mainMenuRoot;
HGENMENU menuItemsMain[4];
void MsnInitMainMenu(void);
- void MsnRemoveMainMenus(void);
void MSN_EnableMenuItems(bool parEnable);
void MsnInvokeMyURL(bool ismail, const char* url);