summaryrefslogtreecommitdiff
path: root/protocols/AimOscar
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r--protocols/AimOscar/src/proto.cpp3
-rw-r--r--protocols/AimOscar/src/proto.h5
-rw-r--r--protocols/AimOscar/src/theme.cpp22
3 files changed, 6 insertions, 24 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp
index 5eb4e8d814..6083632b48 100644
--- a/protocols/AimOscar/src/proto.cpp
+++ b/protocols/AimOscar/src/proto.cpp
@@ -67,9 +67,6 @@ CAimProto::CAimProto(const char* aProtoName, const TCHAR* aUserName) :
CAimProto::~CAimProto()
{
- RemoveMainMenus();
- RemoveContactMenus();
-
if (hServerConn)
Netlib_CloseHandle(hServerConn);
if (hAvatarConn && hAvatarConn != (HANDLE)1)
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h
index fc4b9b9c37..5ee46474c8 100644
--- a/protocols/AimOscar/src/proto.h
+++ b/protocols/AimOscar/src/proto.h
@@ -136,7 +136,6 @@ struct CAimProto : public PROTO<CAimProto>
HGENMENU hMenuRoot;
HGENMENU hHTMLAwayContextMenuItem;
HGENMENU hAddToServerListContextMenuItem;
- HGENMENU hReadProfileMenuItem;
HGENMENU hBlockContextMenuItem;
HGENMENU hMainMenu[3];
@@ -387,9 +386,7 @@ struct CAimProto : public PROTO<CAimProto>
void InitMainMenus(void);
void InitContactMenus(void);
- void RemoveMainMenus(void);
- void RemoveContactMenus(void);
-
+
//////////////////////////////////////////////////////////////////////////////////////
// thread.cpp
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index 71b3a3b620..c8b6ab7fd0 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -231,8 +231,10 @@ void CAimProto::InitMainMenus(void)
hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
- RemoveMainMenus();
- hMenuRoot = NULL;
+ if (hMenuRoot) {
+ CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
+ hMenuRoot = NULL;
+ }
}
mi.pszService = service_name;
@@ -284,7 +286,7 @@ void CAimProto::InitContactMenus(void)
mi.icolibItem = GetIconHandle("profile");
mi.pszName = LPGEN("Read Profile");
mi.flags = CMIF_NOTOFFLINE;
- hReadProfileMenuItem = Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi);
mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/AddToServerList");
CreateProtoService("/AddToServerList", &CAimProto::AddToServerList);
@@ -302,17 +304,3 @@ void CAimProto::InitContactMenus(void)
mi.flags = CMIF_HIDDEN;
hBlockContextMenuItem = Menu_AddContactMenuItem(&mi);
}
-
-void CAimProto::RemoveMainMenus(void)
-{
- if (hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
-}
-
-void CAimProto::RemoveContactMenus(void)
-{
- CallService(MO_REMOVEMENUITEM, (WPARAM)hHTMLAwayContextMenuItem, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hReadProfileMenuItem, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hAddToServerListContextMenuItem, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hBlockContextMenuItem, 0);
-}