From 6a3c12bfd2a1829ac537a3b615d42c1e956a0586 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 4 Oct 2014 02:12:42 +0000 Subject: Tox: - fixed network setting loading - code reordering git-svn-id: http://svn.miranda-ng.org/main/trunk@10680 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'protocols/Tox/src/tox_proto.cpp') diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 342b86e696..485c049c33 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -1,12 +1,10 @@ #include "common.h" CToxProto::CToxProto(const char* protoName, const TCHAR* userName) : -PROTO(protoName, userName) + PROTO(protoName, userName) { accountName = mir_tstrdup(userName); - InitToxCore(); - CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit); SetAllContactsStatus(ID_STATUS_OFFLINE); @@ -49,8 +47,6 @@ PROTO(protoName, userName) CToxProto::~CToxProto() { - UninitToxCore(); - mir_free(accountName); } @@ -236,11 +232,14 @@ int __cdecl CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM case EV_PROTO_ONLOAD: return OnAccountLoaded(wParam, lParam); - case EV_PROTO_ONCONTACTDELETED: - return OnContactDeleted(wParam, lParam); + case EV_PROTO_ONRENAME: + return OnAccountRenamed(wParam, lParam); case EV_PROTO_ONEXIT: - return OnPreShutdown(wParam, lParam); + return OnAccountUnloaded(wParam, lParam); + + case EV_PROTO_ONCONTACTDELETED: + return OnContactDeleted(wParam, lParam); } return 1; -- cgit v1.2.3