summaryrefslogtreecommitdiff
path: root/protocols/MSN/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/MSN/src/msn_menu.cpp16
-rw-r--r--protocols/MSN/src/msn_proto.cpp8
-rw-r--r--protocols/MSN/src/msn_proto.h2
4 files changed, 7 insertions, 21 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 9502935601..82532bd346 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -330,7 +330,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
replaceStr(msnExternalIP, tHeader["ClientIP"]);
abchMigrated = atol(tHeader["ABCHMigrated"]);
langpref = atol(tHeader["lang_preference"]);
- emailEnabled = atol(tHeader["EmailEnabled"]);
+ emailEnabled = atol(tHeader["EmailEnabled"]) != 0;
if (!MSN_RefreshContactList()) {
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 90874396bc..b6897742fc 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -131,14 +131,10 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
int listId = Lists_GetMask(szEmail);
bool noChat = !(listId & LIST_FL) || isMe || isChatRoom(hContact);
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME;
- mi.pszName = ((listId & LIST_BL) ? LPGEN("&Unblock") : LPGEN("&Block"));
- Menu_ModifyItem(hBlockMenuItem, &mi);
+ Menu_ModifyItem(hBlockMenuItem, (listId & LIST_BL) ? LPGENT("&Unblock") : LPGENT("&Block"));
Menu_ShowItem(hBlockMenuItem, !noChat);
- mi.pszName = isMe ? LPGEN("Open &Hotmail Inbox") : LPGEN("Send &Hotmail E-mail");
- Menu_ModifyItem(hOpenInboxMenuItem, &mi);
+ Menu_ModifyItem(hOpenInboxMenuItem, isMe ? LPGENT("Open &Hotmail Inbox") : LPGENT("Send &Hotmail E-mail"));
Menu_ShowItem(hOpenInboxMenuItem, emailEnabled);
#ifdef OBSOLETE
@@ -344,14 +340,8 @@ void CMsnProto::MsnRemoveMainMenus(void)
void CMsnProto::MSN_EnableMenuItems(bool bEnable)
{
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS;
- if (!bEnable)
- mi.flags |= CMIF_GRAYED;
-
for (int i = 0; i < _countof(menuItemsMain); i++)
- if (menuItemsMain[i] != NULL)
- Menu_ModifyItem(menuItemsMain[i], &mi);
+ Menu_ModifyItem(menuItemsMain[i], NULL, INVALID_HANDLE_VALUE, bEnable ? 0 : CMIF_GRAYED);
if (bEnable)
Menu_ShowItem(menuItemsMain[1], emailEnabled);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 6dcc54d15f..8bf72194d9 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -1231,12 +1231,8 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l
break;
case EV_PROTO_ONRENAME:
- if (mainMenuRoot) {
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_NAME | CMIF_TCHAR;
- clmi.ptszName = m_tszUserName;
- Menu_ModifyItem(mainMenuRoot, &clmi);
- }
+ if (mainMenuRoot)
+ Menu_ModifyItem(mainMenuRoot, m_tszUserName);
break;
case EV_PROTO_ONCONTACTDELETED:
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index abef0e03c2..5020d88ad2 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -171,7 +171,7 @@ struct CMsnProto : public PROTO<CMsnProto>
char* alertsoundname;
unsigned langpref;
- unsigned emailEnabled;
+ bool emailEnabled;
unsigned abchMigrated;
unsigned myFlags;