diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-05-05 08:38:57 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-05-05 08:38:57 +0000 |
commit | 1229cee3091839af4dd181e28b55e4823079007e (patch) | |
tree | 7afa602a61bdc81de9135b5642ec11c5ee4ea229 /protocols/Skype/src/skype_events.cpp | |
parent | 1b39cc1afb501ea3973affcf864b8485e81251ff (diff) |
- reworked invitation to chat
- fixed chat contact's statuses
- added "Spawn conversation" button in contact dialog
- StringList now based on stl
git-svn-id: http://svn.miranda-ng.org/main/trunk@4586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index bbe7aaf9fe..c27bddb7f0 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -7,6 +7,21 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) this->InitCustomFolders();
this->InitInstanceHookList();
+ if (::ServiceExists(MS_BB_ADDBUTTON))
+ {
+ BBButton bbd = {0};
+ bbd.cbSize = sizeof(BBButton);
+ bbd.pszModuleName = MODULE;
+
+ bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON;
+ bbd.ptszTooltip = ::TranslateT("Spawn conference");
+ bbd.hIcon = CSkypeProto::GetIconHandle("confSpawn");
+ bbd.dwButtonID = BBB_ID_CONF_SPAWN;
+ bbd.dwDefPos = 100 + bbd.dwButtonID;
+
+ ::CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&bbd);
+ }
+
g_skype->SetOnMessageCallback(
(CSkype::OnMessaged)&CSkypeProto::OnMessage,
this);
@@ -75,6 +90,25 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam) return 0;
}
+int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam)
+{
+ HANDLE hContact = (HANDLE)wParam;
+ CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
+
+ if (cbcd->dwButtonId == BBB_ID_CONF_SPAWN)
+ {
+ if (this->IsOnline() && !this->IsChatRoom(hContact))
+ {
+ StringList targets;
+ targets.insert(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN));
+
+ this->StartChat(targets);
+ }
+ }
+
+ return 1;
+}
+
int CSkypeProto::OnMessagePreCreate(WPARAM, LPARAM lParam)
{
MessageWindowEvent *evt = (MessageWindowEvent *)lParam;
@@ -429,7 +463,7 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa cid,
sid,
CSkypeProto::Roles[rank],
- status);
+ CSkypeProto::MirandaToSkypeStatus(status));
}
}
}
@@ -464,9 +498,9 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa StringList alreadyInChat(this->GetChatUsers(cid));
StringList needToKick(::mir_utf8decodeW(data));
- for (int i = 0; i < needToKick.getCount(); i++)
+ for (size_t i = 0; i < needToKick.size(); i++)
{
- wchar_t *sid = needToKick[i];
+ const wchar_t *sid = needToKick[i];
if (::wcsicmp(sid, this->login) != 0 && !alreadyInChat.contains(sid))
this->KickChatContact(cid, sid);
}
|