diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-09 22:00:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-09 22:00:39 +0300 |
commit | 810944bb10a541b1e047555b9bd965dccfccd5b1 (patch) | |
tree | b3fd7c32aeb0d9b30143f91188f6fdc2419d873e /plugins | |
parent | febc07d9130541053e61a3080e8f0dd9fa6699b2 (diff) |
fixes #1256 completely
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Import/src/import.cpp | 4 | ||||
-rw-r--r-- | plugins/Import/src/wizard.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 9f854ced14..527e922cfb 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -485,12 +485,15 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules) if (!Proto_GetAccount(p->szSrcAcc))
szNewInternalName = p->szSrcAcc; // but if the original internal name is available, keep it
+ CopySettings(NULL, p->szSrcAcc, NULL, szNewInternalName);
+
p->pa = Proto_CreateAccount(szNewInternalName, p->szBaseProto, p->tszSrcName);
if (p->pa == nullptr) {
AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto);
continue;
}
}
+ else CopySettings(NULL, p->szSrcAcc, NULL, p->pa->szModuleName);
char szSetting[100];
itoa(400 + p->iSrcIndex, szSetting, 10);
@@ -511,7 +514,6 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules) db_set_ws(NULL, "Protocols", szSetting, p->pa->tszAccountName);
}
- CopySettings(NULL, p->szSrcAcc, NULL, p->pa->szModuleName);
if (bImportSysAll)
arSkippedModules.insert(newStr(p->szSrcAcc));
}
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index 4f54560ddc..459b0f4391 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -165,6 +165,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP break;
case WM_DESTROY:
+ hwndWizard = nullptr;
if (g_bSendQuit)
PostQuitMessage(0);
}
|