From fc946bfa82e2af4b54bf45b20dbd58b03b26a5b1 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Tue, 5 May 2015 17:47:04 +0000 Subject: SkypeWeb: Remove token if username or password changed. git-svn-id: http://svn.miranda-ng.org/main/trunk@13449 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_events.cpp | 40 ++++++++++++++++---------------- protocols/SkypeWeb/src/skype_options.cpp | 2 ++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index 568927599b..44f9141e08 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -17,6 +17,26 @@ along with this program. If not, see . #include "stdafx.h" +INT_PTR CSkypeProto::GetCallEventText(WPARAM, LPARAM lParam) +{ + DBEVENTGETTEXT *pEvent = (DBEVENTGETTEXT *)lParam; + + INT_PTR nRetVal = 0; + char *pszText = Translate("Incoming call"); + + + if (pEvent->datatype == DBVT_TCHAR) + { + TCHAR *pwszText = _A2T(pszText); + nRetVal = (INT_PTR)mir_tstrdup(pwszText); + } + + else if (pEvent->datatype == DBVT_ASCIIZ) + nRetVal = (INT_PTR)mir_strdup(Translate(pszText)); + + return nRetVal; +} + INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) // it not work , ???? { DBEVENTINFO* dbei = (DBEVENTINFO*)lParam; @@ -56,24 +76,4 @@ void CSkypeProto::InitDBEvents() dbEventType.textService = MODULE"/GetCallText"; dbEventType.flags |= DETF_NONOTIFY; CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType); -} - -INT_PTR CSkypeProto::GetCallEventText(WPARAM, LPARAM lParam) -{ - DBEVENTGETTEXT *pEvent = (DBEVENTGETTEXT *)lParam; - - INT_PTR nRetVal = 0; - char *pszText = Translate("Incoming call"); - - - if (pEvent->datatype == DBVT_TCHAR) - { - TCHAR *pwszText = _A2T(pszText); - nRetVal = (INT_PTR)mir_wstrdup(pwszText); - } - - else if (pEvent->datatype == DBVT_ASCIIZ) - nRetVal = (INT_PTR)mir_strdup(Translate(pszText)); - - return nRetVal; } \ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index 13e506428e..91e81796a8 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -45,6 +45,8 @@ void CSkypeOptionsMain::OnInitDialog() void CSkypeOptionsMain::OnApply() { + if (m_proto->getStringA(SKYPE_SETTINGS_ID) != m_skypename.GetTextA() || m_proto->getStringA("Password") != m_password.GetTextA()) + m_proto->delSetting("TokenExpiresIn"); m_proto->setString(SKYPE_SETTINGS_ID, m_skypename.GetTextA()); m_proto->setString("Password", m_password.GetTextA()); ptrT group(m_group.GetText()); -- cgit v1.2.3