diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-22 00:55:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-22 00:57:16 +0300 |
commit | d28931ebdfc4ff561d05ab000aee4cbb5ac24d62 (patch) | |
tree | e5cfd83eb231df123a3d744106a4e9b521fba409 /protocols/Tox | |
parent | 921f870dd0feec3230a8634abbd85c556e9f3d22 (diff) |
OnEvent(EV_PROTO_ONCONTACTDELETED) => PROTO_INTERFACE::OnContactDeleted
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 8 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 3 |
3 files changed, 4 insertions, 10 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 6c93559463..f6e72d7b47 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -199,22 +199,20 @@ INT_PTR CToxProto::OnGrantAuth(WPARAM hContact, LPARAM) return 0;
}
-int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM)
+void CToxProto::OnContactDeleted(MCONTACT hContact)
{
if (!IsOnline())
- return 0;
+ return;
if (!isChatRoom(hContact)) {
int32_t friendNumber = GetToxFriendNumber(hContact);
TOX_ERR_FRIEND_DELETE error;
if (!tox_friend_delete(m_toxThread->Tox(), friendNumber, &error)) {
debugLogA(__FUNCTION__": failed to delete friend (%d)", error);
- return error;
+ return;
}
SaveToxProfile(m_toxThread->Tox());
}
-
- return 0;
}
void CToxProto::OnFriendRequest(Tox*, const uint8_t *pubKey, const uint8_t *message, size_t /* length */, void *arg)
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 6e95610f26..004211284f 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -230,9 +230,6 @@ int CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONRENAME:
return OnAccountRenamed(wParam, lParam);
- case EV_PROTO_ONCONTACTDELETED:
- return OnContactDeleted(wParam, lParam);
-
case EV_PROTO_ONMENU:
return OnInitStatusMenu();
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index acf1cc0898..b89ce4118d 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -47,6 +47,7 @@ public: int UserIsTyping(MCONTACT hContact, int type) override;
int OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) override;
+ void OnContactDeleted(MCONTACT) override;
void OnModulesLoaded() override;
// icons
@@ -166,8 +167,6 @@ private: INT_PTR __cdecl OnRequestAuth(WPARAM hContact, LPARAM lParam);
INT_PTR __cdecl OnGrantAuth(WPARAM hContact, LPARAM);
- int __cdecl OnContactDeleted(MCONTACT, LPARAM);
-
static void OnFriendRequest(Tox *tox, const uint8_t *pubKey, const uint8_t *message, size_t length, void *arg);
static void OnFriendNameChange(Tox *tox, uint32_t friendNumber, const uint8_t *name, size_t length, void *arg);
static void OnStatusMessageChanged(Tox *tox, uint32_t friendNumber, const uint8_t *message, size_t length, void *arg);
|