summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/AimOscar/src/theme.cpp')
-rw-r--r--protocols/AimOscar/src/theme.cpp22
1 files changed, 5 insertions, 17 deletions
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);
-}