summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_dialogs.cpp')
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp147
1 files changed, 0 insertions, 147 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 46f25de0a4..2cb8fd675e 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -752,153 +752,6 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- InviteChatParam *param = (InviteChatParam *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
-
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- param = (InviteChatParam *)lParam;
-
- HWND hwndClist = GetDlgItem(hwndDlg, IDC_CCLIST);
- SetWindowLongPtr(hwndClist, GWL_STYLE, GetWindowLongPtr(hwndClist, GWL_STYLE) & ~CLS_HIDEOFFLINE);
-
- // WindowSetIcon(hwndDlg, "msn");
- }
- break;
-
- case WM_CLOSE:
- ::EndDialog(hwndDlg, 0);
- break;
-
- case WM_NCDESTROY:
-// WindowFreeIcon(hwndDlg);
- delete param;
- break;
-
- case WM_NOTIFY:
- {
- NMCLISTCONTROL *nmc = (NMCLISTCONTROL *)lParam;
- if (nmc->hdr.idFrom == IDC_CCLIST)
- {
- switch (nmc->hdr.code)
- {
- case CLN_NEWCONTACT:
- if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- {
- wchar_t *contacts = NULL;
- if (param->id)
- {
- HANDLE hContact = param->ppro->GetChatRoomByCid(param->id);
- if (hContact && param->ppro->IsContactOnline(hContact))
- {
- contacts = param->ppro->GetChatUsers(param->id);
- }
- }
- param->ppro->ChatValidateContact(nmc->hItem, nmc->hdr.hwndFrom, contacts);
- }
- break;
-
- case CLN_LISTREBUILT:
- if (param)
- {
- wchar_t *contacts = NULL;
- if (param->id)
- {
- HANDLE hContact = param->ppro->GetChatRoomByCid(param->id);
- if (hContact && param->ppro->IsContactOnline(hContact))
- {
- contacts = param->ppro->GetChatUsers(param->id);
- }
- }
- param->ppro->ChatPrepare(NULL, nmc->hdr.hwndFrom, contacts);
- }
- break;
- }
- }
- }
- break;
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
- case IDC_ADDSCR:
- if (param->ppro->IsOnline())
- {
- wchar_t sid[SKYPE_SID_LIMIT];
- ::GetDlgItemText(hwndDlg, IDC_EDITSCR, sid, SIZEOF(sid));
-
- CLCINFOITEM cii = {0};
- cii.cbSize = sizeof(cii);
- cii.flags = CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS;
- cii.pszText = ::wcslwr(sid);
-
- HANDLE hItem = (HANDLE)::SendDlgItemMessage(
- hwndDlg,
- IDC_CCLIST,
- CLM_ADDINFOITEM,
- 0,
- (LPARAM)&cii);
- ::SendDlgItemMessage(hwndDlg, IDC_CCLIST, CLM_SETCHECKMARK, (LPARAM)hItem, 1);
- }
- break;
-
- case IDOK:
- {
- HWND hwndList = ::GetDlgItem(hwndDlg, IDC_CCLIST);
-
- StringList invitedContacts;
- 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);
- conversation->AddConsumers(needToAdd);
- }
- else
- {
- g_skype->CreateConference(conversation);
- conversation->SetOption(CConversation::P_OPT_JOINING_ENABLED, true);
- conversation->SetOption(CConversation::P_OPT_ENTRY_LEVEL_RANK, CParticipant::WRITER);
- conversation->SetOption(CConversation::P_OPT_DISCLOSE_HISTORY, 1);
- conversation->AddConsumers(needToAdd);
-
- SEString data;
- conversation->GetPropIdentity(data);
- chatID = ::mir_utf8decodeW(data);
-
- //param->ppro->JoinToChat(conversation);
- }
- if (chatID)
- ::EndDialog(hwndDlg, IDOK);
- else
- param->ppro->ShowNotification(::TranslateT("You did not select any contact"));
- }
- break;
-
- case IDCANCEL:
- ::EndDialog(hwndDlg, IDCANCEL);
- break;
- }
- }
- break;
- }
- return FALSE;
-}
-
void CSkypeProto::SaveToDB(HWND hwndPage, int iPage)
{
TCHAR text[2048];