From 100e8865998c7487bbdba02a8405b7b05226876c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Dec 2014 11:24:45 +0000 Subject: account merge dialog to be closed on exit git-svn-id: http://svn.miranda-ng.org/main/trunk@11484 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 9 +++++++++ plugins/Import/src/import.h | 2 +- plugins/Import/src/main.cpp | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 4d4904b6bc..0d9bef7cdf 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -303,6 +303,7 @@ static INT_PTR CALLBACK AccountsMatcherProc(HWND hwndDlg, UINT uMsg, WPARAM wPar switch (uMsg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); + hwndAccMerge = hwndDlg; hwndList = GetDlgItem(hwndDlg, IDC_LIST); { LVCOLUMN col = { 0 }; @@ -346,6 +347,14 @@ static INT_PTR CALLBACK AccountsMatcherProc(HWND hwndDlg, UINT uMsg, WPARAM wPar } break; + case WM_CLOSE: + DestroyWindow(hwndDlg); + break; + + case WM_DESTROY: + hwndAccMerge = NULL; + break; + case WM_NOTIFY: LPNMHDR hdr = (LPNMHDR)lParam; if (hdr->idFrom != IDC_LIST) diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index f20ae8300c..12f08d7f59 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -107,7 +107,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei); int CreateGroup(const TCHAR* name, MCONTACT hContact); extern HINSTANCE hInst; -extern HWND hdlgProgress; +extern HWND hdlgProgress, hwndAccMerge; extern int nImportOption; extern int nCustomOptions; extern TCHAR importFile[]; diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 1c90c5c792..571f55060f 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -30,7 +30,7 @@ static HANDLE hImportService = NULL; HINSTANCE hInst; INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam); -static HWND hwndWizard = NULL; +HWND hwndWizard, hwndAccMerge; int hLangpack; PLUGININFOEX pluginInfo = @@ -101,6 +101,8 @@ static int OnExit(WPARAM wParam, LPARAM lParam) { if (hwndWizard) SendMessage(hwndWizard, WM_CLOSE, 0, 0); + if (hwndAccMerge) + SendMessage(hwndAccMerge, WM_CLOSE, 0, 0); return 0; } -- cgit v1.2.3