summaryrefslogtreecommitdiff
path: root/plugins/Import
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-28 16:56:12 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-28 16:56:12 +0000
commit6ba54d61145df936ec934902fcca87ad352526ad (patch)
tree592fb3265cf2c040073083382b56db7cd5538ddf /plugins/Import
parent33f3028e95f2810ff1c75a5813e717b48c55ec79 (diff)
Import: importing all contact settings
git-svn-id: http://svn.miranda-ng.org/main/trunk@16371 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r--plugins/Import/src/import.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 73ccd3f47a..6bf2ca229d 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -548,6 +548,21 @@ static MCONTACT AddContact(char *szProto, char *pszUniqueSetting, DBVARIANT *id,
return hContact;
}
+struct ImportContactData
+{
+ MCONTACT from, to;
+ const char *szBaseProto;
+};
+
+int ModulesEnumProc(const char *szModuleName, DWORD ofsModuleName, LPARAM lParam)
+{
+ ImportContactData *icd = (ImportContactData*)lParam;
+ if (!mir_strcmp(icd->szBaseProto, szModuleName))
+ return 0;
+ CopySettings(icd->from, szModuleName, icd->to, szModuleName);
+ return 0;
+}
+
void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst)
{
if (pda->pa == NULL)
@@ -555,7 +570,11 @@ void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst)
char *szDstAcc = pda->pa->szModuleName;
- // Hidden?
+ ImportContactData icd = { hSrc, hDst, pda->szSrcAcc };
+
+ CallService(MS_DB_MODULES_ENUM, (WPARAM)&icd, (LPARAM)ModulesEnumProc);
+
+ /*// Hidden?
DBVARIANT dbv;
if (!myGet(hSrc, "CList", "Hidden", &dbv)) {
db_set(hDst, "CList", "Hidden", &dbv);
@@ -602,7 +621,7 @@ void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst)
if (!myGet(hSrc, pda->szSrcAcc, "About", &dbv)) {
db_set(hDst, szDstAcc, "About", &dbv);
srcDb->FreeVariant(&dbv);
- }
+ }*/
}
/////////////////////////////////////////////////////////////////////////////////////////