diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-31 09:42:28 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-31 09:42:28 +0000 |
commit | 03512ff2ed0f3d1ed6857ee85b0eb7268931ec3f (patch) | |
tree | 3d6520e755793440ba8afbe4fbfb22012746c8ee | |
parent | c8e2e90a1acac55b97a8dd6c009483c2987bdf6c (diff) |
Removed obsolete functions like setting Nickname
Ensure presence of wlid
Setting desired status on startup
git-svn-id: http://svn.miranda-ng.org/main/trunk@13931 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/MSN/res/msn.rc | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_lists.cpp | 6 | ||||
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.h | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_srv.cpp | 4 |
7 files changed, 20 insertions, 8 deletions
diff --git a/protocols/MSN/res/msn.rc b/protocols/MSN/res/msn.rc index 57430555d5..a59f01f92e 100644 --- a/protocols/MSN/res/msn.rc +++ b/protocols/MSN/res/msn.rc @@ -34,18 +34,18 @@ BEGIN EDITTEXT IDC_HANDLE,72,18,100,12,ES_AUTOHSCROLL
RTEXT "Password:",IDC_STATIC,16,36,52,8
EDITTEXT IDC_PASSWORD,72,34,100,12,ES_PASSWORD | ES_AUTOHSCROLL
- RTEXT "Nickname:",IDC_STATIC,16,52,52,8
- EDITTEXT IDC_HANDLE2,72,50,100,12,ES_AUTOHSCROLL
+ RTEXT "Nickname:",IDC_STATIC,16,52,52,8,NOT WS_VISIBLE
+ EDITTEXT IDC_HANDLE2,72,50,100,12,ES_AUTOHSCROLL | NOT WS_VISIBLE
CONTROL "Create a new Windows Live account",IDC_NEWMSNACCOUNTLINK,
"Hyperlink",WS_TABSTOP,21,68,208,8
GROUPBOX "Expert",IDC_STATIC,4,84,298,88,WS_GROUP
CONTROL "Send message font color/size info inside messages",IDC_SENDFONTINFO,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,95,280,10
CONTROL "Disable all contacts not included into my contact list",IDC_DISABLE_ANOTHER_CONTACTS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,106,280,10
+ "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,12,106,280,10
CONTROL "Manage server groups",IDC_MANAGEGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,116,280,10
CONTROL "Allow people on my contact list send messages to mobile device",IDC_MOBILESEND,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,126,280,10
+ "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,12,126,280,10
CONTROL "Run the following application when new Hotmail arrives",IDC_RUN_APP_ON_HOTMAIL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,137,280,10
EDITTEXT IDC_MAILER_APP,22,153,237,12,ES_AUTOHSCROLL
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 8e51383a71..7401d5f7d4 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -921,7 +921,7 @@ LBL_InvalidCommand: msnLoggedIn = true;
isConnectSuccess = true;
emailEnabled = MyOptions.netId==NETID_MSN; // Let's assume it?
- MSN_SetServerStatus(m_iStatus);
+ MSN_SetServerStatus(m_iDesiredStatus);
MSN_EnableMenuItems(true);
// Fork refreshing and populating contact list to the background
ForkThread(&CMsnProto::msn_loginThread, NULL);
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index b8419abf25..d1b578b36d 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -203,8 +203,10 @@ void CMsnProto::Lists_Populate(void) while (hContact) {
MCONTACT hNext = db_find_next(hContact, m_szModuleName);
char szEmail[MSN_MAX_EMAIL_LEN] = "";
- if (db_get_static(hContact, m_szModuleName, "wlid", szEmail, sizeof(szEmail)))
- db_get_static(hContact, m_szModuleName, "e-mail", szEmail, sizeof(szEmail));
+ if (db_get_static(hContact, m_szModuleName, "wlid", szEmail, sizeof(szEmail))) {
+ if (db_get_static(hContact, m_szModuleName, "e-mail", szEmail, sizeof(szEmail)) == 0)
+ setString(hContact, "wlid", szEmail);
+ }
if (szEmail[0]) {
bool localList = getByte(hContact, "LocalList", 0) != 0;
int netId = getWord(hContact, "netId", localList?NETID_MSN:NETID_UNKNOWN);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index bbe49cf4b4..9cb69338a9 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -200,7 +200,6 @@ static INT_PTR MsnMenuSendNetMeeting(WPARAM wParam, LPARAM lParam) CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
return (ppro) ? ppro->MsnSendNetMeeting(wParam, lParam) : 0;
}
-#endif
/////////////////////////////////////////////////////////////////////////////////////////
// SetNicknameCommand - sets nick name
@@ -266,6 +265,7 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM) ShowWindow(hwndSetNickname, SW_SHOW);
return 0;
}
+#endif
//////////////////////////////////////////////////////////////////////////////////////
// Menus initialization
@@ -296,12 +296,14 @@ void CMsnProto::MsnInitMainMenu(void) mi.hParentMenu = hRoot;
mi.pszService = servicefunction;
+#ifdef OBSOLETE
mir_strcpy(tDest, MS_SET_NICKNAME_UI);
CreateProtoService(MS_SET_NICKNAME_UI, &CMsnProto::SetNicknameUI);
mi.position = 201001;
mi.icolibItem = GetIconHandle(IDI_MSN);
mi.pszName = LPGEN("Set &Nickname");
menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
+#endif
mir_strcpy(tDest, MSN_INVITE);
CreateProtoService(MSN_INVITE, &CMsnProto::MsnInviteCommand);
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 4edbd0fa4e..0758b6aed5 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -247,6 +247,7 @@ LBL_Continue: proto->setString("Password", password);
}
+#ifdef OBSOLETE
GetDlgItemText(hwndDlg, IDC_HANDLE2, screenStr, SIZEOF(screenStr));
if (!proto->getTString("Nick", &dbv)) {
if (mir_tstrcmp(dbv.ptszVal, screenStr))
@@ -268,6 +269,7 @@ LBL_Continue: proto->MSN_ABUpdateAttr(NULL, "MSN.IM.BLP", tValue ? "0" : "1");
break;
}
+#endif
proto->setByte("SendFontInfo", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDFONTINFO));
proto->setByte("RunMailerOnHotmail", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_RUN_APP_ON_HOTMAIL));
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index 271f6b6100..13206f0178 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -232,7 +232,9 @@ struct CMsnProto : public PROTO<CMsnProto> void MSN_ShowPopup(const MCONTACT hContact, const TCHAR* msg, int flags);
void MSN_ShowError(const char* msgtext, ...);
+#ifdef OBSOLETE
void MSN_SetNicknameUtf(const char* nickname);
+#endif
void MSN_SendNicknameUtf(const char* nickname);
typedef struct { TCHAR *szName; const char *szMimeType; unsigned char *data; size_t dataSize; } StoreAvatarData;
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 8906faa8e8..55826d5c59 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -284,15 +284,19 @@ void CMsnProto::MSN_SendNicknameUtf(const char* nickname) else
delSetting("Nick");
+#ifdef OBSOLETE
MSN_SetNicknameUtf(nickname[0] ? nickname : MyOptions.szEmail);
+#endif
ForkThread(&CMsnProto::msn_storeProfileThread, (void*)1);
}
+#ifdef OBSOLETE
void CMsnProto::MSN_SetNicknameUtf(const char* nickname)
{
msnNsThread->sendPacket("PRP", "MFN %s", ptrA(mir_urlEncode(nickname)));
}
+#endif
/////////////////////////////////////////////////////////////////////////////////////////
// msn_storeAvatarThread - update our own avatar on the server
|