diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-29 16:01:31 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-29 16:01:31 +0000 |
commit | ce418f5b2c85687ff1d8f9630224f7bb8b0f8393 (patch) | |
tree | 99d1630552394adc1f48b1d92d8012d6c5e3b5a0 /plugins/Import | |
parent | 7ec6beadc3938e353351f9fae686a8759b8fde88 (diff) |
Import: dont import Protocol/p
git-svn-id: http://svn.miranda-ng.org/main/trunk@16378 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/import.cpp | 60 |
1 files 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);
- }*/
}
/////////////////////////////////////////////////////////////////////////////////////////
|