diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-28 19:56:11 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-28 19:56:11 +0000 |
commit | 1137908b0395c613b2827428fd846242eaddb999 (patch) | |
tree | 3b7d70ea4f780a23000ac8a3d4f46138871decbb /protocols/Skype | |
parent | f769a165fd3bb4f68d8cdee160ebd8f003fcc0e1 (diff) |
- fixed empty "<unknown contact>" chat rooms
- fixed crash on profile update
git-svn-id: http://svn.miranda-ng.org/main/trunk@4562 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 9 | ||||
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 11 | ||||
-rw-r--r-- | protocols/Skype/src/skype_profile.cpp | 9 |
4 files changed, 12 insertions, 19 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index 204b091e8b..f85ec85f36 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -78,14 +78,7 @@ HANDLE CSkypeProto::AddChatRoom(CConversation::Ref conversation) void CSkypeProto::ChatValidateContact(HANDLE hItem, HWND hwndList, const wchar_t *contacts)
{
if ( !this->IsProtoContact(hItem) || this->IsChatRoom(hItem))
- {
- /*HANDLE hContact = (HANDLE)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
- char *sid = ::DBGetString(hContact, this->m_szModuleName, "sid");
- if (!sid)
- ::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
- else if(contacts && ::strstr(contacts, sid))*/
- ::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
- }
+ ::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
void CSkypeProto::ChatPrepare(HANDLE hItem, HWND hwndList, const wchar_t *contacts)
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 96d09f9447..d94528c5f4 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -124,7 +124,7 @@ void CSkypeProto::RaiseMessageSendedEvent(HANDLE hContact, DWORD timestamp, cons ::strcpy(msg, message);
msg[msgLen - 1] = 0;
- ::memcpy((char *)&msg[msgLen], guid, 32);
+ ::memcpy((char *)&msg[msgLen], guid, guidLen);
DWORD flags = DBEF_UTF | DBEF_SENT;
if ( !isUnreaded)
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 33a37f4d09..90c5949d6a 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -644,14 +644,15 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP param->ppro->GetInviteContacts(NULL, hwndList, invitedContacts);
wchar_t *chatID = ::mir_wstrdup(param->id);
-
+
SEStringList needToAdd;
+ for (uint i = 0; i < (uint)invitedContacts.getCount(); i++)
+ needToAdd.append((char *)mir_ptr<char>(::mir_u2a(invitedContacts[i])));
+
CConversation::Ref conversation;
if (chatID)
{
g_skype->GetConversationByIdentity(::mir_utf8encodeW(chatID), conversation);
- for (uint i = 0; i < (uint)invitedContacts.getCount(); i++)
- needToAdd.append((char *)mir_ptr<char>(::mir_u2a(invitedContacts[i])));
conversation->AddConsumers(needToAdd);
}
else
@@ -666,12 +667,12 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP conversation->GetPropIdentity(data);
chatID = ::mir_utf8decodeW(data);
- param->ppro->JoinToChat(conversation);
+ //param->ppro->JoinToChat(conversation);
}
if (chatID)
::EndDialog(hwndDlg, IDOK);
else
- param->ppro->ShowNotification(TranslateT("You did not select any contact"));
+ param->ppro->ShowNotification(::TranslateT("You did not select any contact"));
}
break;
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp index 953550a214..31c81d9a97 100644 --- a/protocols/Skype/src/skype_profile.cpp +++ b/protocols/Skype/src/skype_profile.cpp @@ -194,12 +194,11 @@ void CSkypeProto::UpdateProfileFullName(SEObject *obj, HANDLE hContact) }
else
{
- SEString firstName, lastName;
- CContact *contact = (CContact *)obj;
- contact->GetFullname(firstName, lastName);
+ StringList names = fullname;
- ::db_set_ws(hContact, this->m_szModuleName, "FirstName", mir_ptr<wchar_t>(::mir_utf8decodeW(firstName)));
- ::db_set_ws(hContact, this->m_szModuleName, "LastName", mir_ptr<wchar_t>(::mir_utf8decodeW(lastName)));
+ ::db_set_ws(hContact, this->m_szModuleName, "FirstName", names[0]);
+ if (names.getCount() > 1)
+ ::db_set_ws(hContact, this->m_szModuleName, "LastName", names[1]);
}
::mir_free(fullname);
}
|