summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_chatrooms.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-06-19 19:20:22 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-06-19 19:20:22 +0000
commitf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (patch)
treea14e3df46ea49e781a98e5ef3438aa25bc52e5b5 /protocols/SkypeWeb/src/skype_chatrooms.cpp
parenta0827f61f16f691962b378ab64ea27e5132dc506 (diff)
SkypeWeb: support change chat topic
git-svn-id: http://svn.miranda-ng.org/main/trunk@14269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 2f9a6658d6..70b31e4447 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -190,6 +190,9 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
OnLeaveChatRoom(FindChatRoom(chat_id), NULL);
break;
case 30:
+ CMString newTopic = ChangeTopicForm();
+ if (!newTopic.IsEmpty())
+ SendRequest(new SetChatPropertiesRequest(m_szRegToken, chat_id, "topic", ptrA(mir_utf8encodeT(newTopic.GetBuffer())), m_szServer));
break;
}
break;
@@ -718,4 +721,15 @@ void CSkypeProto::ResetOptions(HWND hwndDlg)
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, 1, 0);
SendMessage(hwndClist, CLM_GETHIDEOFFLINEROOT, 1, 0);
+}
+
+CMString CSkypeProto::ChangeTopicForm()
+{
+ CMString caption(FORMAT, _T("[%s] %s"), _A2T(m_szModuleName), TranslateT("Enter new chatroom topic"));
+ ENTER_STRING pForm = { sizeof(pForm) };
+ pForm.type = ESF_PASSWORD;
+ pForm.caption = caption;
+ pForm.ptszInitVal = NULL;
+ pForm.szModuleName = m_szModuleName;
+ return (!EnterString(&pForm)) ? CMString() : CMString(ptrT(pForm.ptszResult));
} \ No newline at end of file