From ce418f5b2c85687ff1d8f9630224f7bb8b0f8393 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Mon, 29 Feb 2016 16:01:31 +0000 Subject: Import: dont import Protocol/p git-svn-id: http://svn.miranda-ng.org/main/trunk@16378 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 60 +++++-------------------------------------- 1 file changed, 7 insertions(+), 53 deletions(-) diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index b6d6f4ab98..f257153e75 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -551,15 +551,18 @@ static MCONTACT AddContact(char *szProto, char *pszUniqueSetting, DBVARIANT *id, struct ImportContactData { MCONTACT from, to; - const char *szBaseProto; + const char *szSrcProto, *szDstProto; }; int ModulesEnumProc(const char *szModuleName, DWORD, LPARAM lParam) { ImportContactData *icd = (ImportContactData*)lParam; - if (!mir_strcmp(icd->szBaseProto, szModuleName)) + if (!mir_strcmp(icd->szSrcProto, szModuleName)) + CopySettings(icd->from, szModuleName, icd->to, icd->szDstProto); + else if (!mir_strcmp(szModuleName, "Protocol")) return 0; - CopySettings(icd->from, szModuleName, icd->to, szModuleName); + else + CopySettings(icd->from, szModuleName, icd->to, szModuleName); return 0; } @@ -568,58 +571,9 @@ void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst) if (pda->pa == NULL) return; - ImportContactData icd = { hSrc, hDst, pda->szSrcAcc }; + ImportContactData icd = { hSrc, hDst, pda->szSrcAcc, pda->pa->szModuleName }; CallService(MS_DB_MODULES_ENUM, (WPARAM)&icd, (LPARAM)ModulesEnumProc); - - /*// Hidden? - DBVARIANT dbv; - if (!myGet(hSrc, "CList", "Hidden", &dbv)) { - db_set(hDst, "CList", "Hidden", &dbv); - srcDb->FreeVariant(&dbv); - } - - // Ignore settings - if (!myGet(hSrc, "Ignore", "Mask1", &dbv)) { - db_set(hDst, "Ignore", "Mask1", &dbv); - srcDb->FreeVariant(&dbv); - } - - // Apparent mode - if (!myGet(hSrc, pda->szSrcAcc, "ApparentMode", &dbv)) { - db_set(hDst, szDstAcc, "ApparentMode", &dbv); - srcDb->FreeVariant(&dbv); - } - - // Nick - if (!myGet(hSrc, pda->szSrcAcc, "Nick", &dbv)) { - db_set(hDst, szDstAcc, "Nick", &dbv); - srcDb->FreeVariant(&dbv); - } - - // Myhandle - if (!myGet(hSrc, pda->szSrcAcc, "MyHandle", &dbv)) { - db_set(hDst, szDstAcc, "MyHandle", &dbv); - srcDb->FreeVariant(&dbv); - } - - // First name - if (!myGet(hSrc, pda->szSrcAcc, "FirstName", &dbv)) { - db_set(hDst, szDstAcc, "FirstName", &dbv); - srcDb->FreeVariant(&dbv); - } - - // Last name - if (!myGet(hSrc, pda->szSrcAcc, "LastName", &dbv)) { - db_set(hDst, szDstAcc, "LastName", &dbv); - srcDb->FreeVariant(&dbv); - } - - // About - if (!myGet(hSrc, pda->szSrcAcc, "About", &dbv)) { - db_set(hDst, szDstAcc, "About", &dbv); - srcDb->FreeVariant(&dbv); - }*/ } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3