summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-01-08 19:47:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-01-08 19:47:44 +0000
commit9d2c010c3cd02546f5c2b22270fe8724b8bda46b (patch)
tree43b5421c606b5f91165bbb6171ffa9e0fb090f05 /src/modules/database
parent8333824d99bf9f627056a76020ead12ccf36942c (diff)
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
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/profilemanager.cpp7
1 files changed, 5 insertions, 2 deletions
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);