diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-08 05:41:39 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-08 05:41:39 +0000 |
commit | b47cd6efc1e90fba4e81b4d5503fefdee80eb808 (patch) | |
tree | e06574625a869c6713678dc9aea770957d04478b /plugins/Import/src/miranda.cpp | |
parent | ce4b1a5b8f6ef72363f7aab778408e2cd317565e (diff) |
disable Next button when profile not selected
git-svn-id: http://svn.miranda-ng.org/main/trunk@12670 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import/src/miranda.cpp')
-rw-r--r-- | plugins/Import/src/miranda.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 62dd92db0a..351422704c 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -81,6 +81,10 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM }
SendDlgItemMessage(hwndDlg, IDC_LIST, LB_SETCURSEL, 0, 0);
SendMessage(hwndDlg, WM_COMMAND, MAKELONG(IDC_LIST, LBN_SELCHANGE), 0);
+ TCHAR filename[MAX_PATH];
+ GetDlgItemText(hwndDlg, IDC_FILENAME, filename, SIZEOF(filename));
+ if (_taccess(filename, 4))
+ SendMessage(GetParent(hwndDlg), WIZM_DISABLEBUTTON, 1, 0);
return TRUE;
case WM_COMMAND:
@@ -107,8 +111,10 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM case IDC_LIST:
if (HIWORD(wParam) == LBN_SELCHANGE) {
int sel = SendDlgItemMessage(hwndDlg, IDC_LIST, LB_GETCURSEL, 0, 0);
- if (sel != LB_ERR)
+ if (sel != LB_ERR) {
SetDlgItemText(hwndDlg, IDC_FILENAME, (TCHAR*)SendDlgItemMessage(hwndDlg, IDC_LIST, LB_GETITEMDATA, sel, 0));
+ SendMessage(GetParent(hwndDlg), WIZM_ENABLEBUTTON, 1, 0);
+ }
}
break;
@@ -131,6 +137,7 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM if (GetOpenFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_FILENAME, str);
SendDlgItemMessage(hwndDlg, IDC_LIST, LB_SETCURSEL, -1, 0);
+ SendMessage(GetParent(hwndDlg), WIZM_ENABLEBUTTON, 1, 0);
}
}
break;
|