From cbeb26aff86cba1439b595c0157cd3972f560dc1 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 7 Jun 2015 07:34:58 +0000 Subject: SkypeWeb: Unneeded buttons removed. git-svn-id: http://svn.miranda-ng.org/main/trunk@14037 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 2 +- protocols/SkypeWeb/src/skype_contacts.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 4b40ff5970..2f9a6658d6 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -238,7 +238,7 @@ INT_PTR CSkypeProto::OnLeaveChatRoom(WPARAM hContact, LPARAM) { if (!IsOnline()) return 1; - if (hContact && IDYES == MessageBox(NULL, TranslateT("This chat is going to be destroyed forever with all its contents. This action cannot be undone. Are you sure?"), TranslateT("Warning"), MB_YESNOCANCEL | MB_ICONQUESTION)) + if (hContact && IDYES == MessageBox(NULL, TranslateT("This chat is going to be destroyed forever with all its contents. This action cannot be undone. Are you sure?"), TranslateT("Warning"), MB_YESNO | MB_ICONQUESTION)) { ptrT idT(getTStringA(hContact, "ChatRoomID")); diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 4a1202a50b..cd8c80c358 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -298,6 +298,8 @@ INT_PTR CSkypeProto::OnGrantAuth(WPARAM hContact, LPARAM) int CSkypeProto::OnContactDeleted(MCONTACT hContact, LPARAM) { + if (!IsOnline()) return 1; + if (hContact && !isChatRoom(hContact)) PushRequest(new DeleteContactRequest(m_szTokenSecret, db_get_sa(hContact, m_szModuleName, SKYPE_SETTINGS_ID))); return 0; @@ -305,7 +307,9 @@ int CSkypeProto::OnContactDeleted(MCONTACT hContact, LPARAM) INT_PTR CSkypeProto::BlockContact(WPARAM hContact, LPARAM) { - if (IDYES == MessageBox(NULL, TranslateT("Are you sure?"), TranslateT("Warning"), MB_YESNOCANCEL | MB_ICONQUESTION)) + if (!IsOnline()) return 1; + + if (IDYES == MessageBox(NULL, TranslateT("Are you sure?"), TranslateT("Warning"), MB_YESNO | MB_ICONQUESTION)) SendRequest(new BlockContactRequest(m_szTokenSecret, ptrA(db_get_sa(hContact, m_szModuleName, SKYPE_SETTINGS_ID))), &CSkypeProto::OnBlockContact, (void *)hContact); return 0; } -- cgit v1.2.3