From 9d2c010c3cd02546f5c2b22270fe8724b8bda46b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Jan 2013 19:47:44 +0000 Subject: fix for the service-mode plugins' start in Profile Manager git-svn-id: http://svn.miranda-ng.org/main/trunk@3023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/profilemanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 49cc0ae72f..e3e07f74c4 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -48,7 +48,7 @@ struct DetailsPageData { struct DlgProfData { PROPSHEETHEADER * psh; - HWND hwndOK; // handle to OK button + HWND hwndOK, hwndSM; PROFILEMANAGERDATA * pd; HANDLE hFileNotify; }; @@ -181,6 +181,7 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case WM_SHOWWINDOW: if (wParam) { + EnableWindow(dat->hwndSM, FALSE); SetWindowText(dat->hwndOK, TranslateT("&Create")); SendMessage(hwndDlg, WM_INPUTCHANGED, 0, 0); } @@ -420,6 +421,7 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_SHOWWINDOW: if (wParam) { SetWindowText(dat->hwndOK, TranslateT("&Run")); + EnableWindow(dat->hwndSM, TRUE); EnableWindow(dat->hwndOK, ListView_GetSelectedCount(hwndList) == 1); } break; @@ -528,6 +530,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, dat = (struct DetailsData*)mir_alloc(sizeof(struct DetailsData)); dat->prof = prof; prof->hwndOK = GetDlgItem(hwndDlg, IDOK); + prof->hwndSM = GetDlgItem(hwndDlg, IDC_SM_COMBO); EnableWindow(prof->hwndOK, FALSE); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); @@ -726,7 +729,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, break; case WM_DESTROY: - { + if (dat->currentPage != 1) { LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETCURSEL, 0, 0); if (curSel != CB_ERR) { int idx = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETITEMDATA, (WPARAM)curSel, 0); -- cgit v1.2.3