aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2001-09-10 10:13:30 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2001-09-10 10:13:30 +0000
commit0ee85f853f8b5b61f70e0ea7420266595b4831d9 (patch)
tree3c64204108982a714265df0ac8cd483113d8dbcd
parent9abd0554055405582a153ad2aca9a4ad9ea97998 (diff)
downloadpostgresql-0ee85f853f8b5b61f70e0ea7420266595b4831d9.tar.gz
postgresql-0ee85f853f8b5b61f70e0ea7420266595b4831d9.zip
Change dialog windows.
-rw-r--r--src/interfaces/odbc/dlg_specific.c23
-rw-r--r--src/interfaces/odbc/psqlodbc.rc16
2 files changed, 19 insertions, 20 deletions
diff --git a/src/interfaces/odbc/dlg_specific.c b/src/interfaces/odbc/dlg_specific.c
index dcbd69be6b6..aaf9432c4fe 100644
--- a/src/interfaces/odbc/dlg_specific.c
+++ b/src/interfaces/odbc/dlg_specific.c
@@ -243,18 +243,17 @@ driver_optionsProc(HWND hdlg,
case WM_INITDIALOG:
SetWindowLong(hdlg, DWL_USER, lParam); /* save for OK etc */
ci = (ConnInfo *) lParam;
+ CheckDlgButton(hdlg, DRV_OR_DSN, 0);
if (ci && ci->dsn && ci->dsn[0])
{
- SetWindowText(hdlg, "Advanced Options (Common)");
- driver_optionsDraw(hdlg, NULL, 0, TRUE);
+ SetWindowText(hdlg, "Advanced Options (per DSN)");
}
else
{
- CheckDlgButton(hdlg, DRV_OR_DSN, 1);
SetWindowText(hdlg, "Advanced Options (Connection)");
ShowWindow(GetDlgItem(hdlg, DRV_OR_DSN), SW_HIDE);
- driver_optionsDraw(hdlg, ci, 1, FALSE);
}
+ driver_optionsDraw(hdlg, ci, 1, FALSE);
break;
case WM_COMMAND:
@@ -262,7 +261,7 @@ driver_optionsProc(HWND hdlg,
{
case IDOK:
ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER);
- driver_options_update(hdlg, IsDlgButtonChecked(hdlg, DRV_OR_DSN) ? ci : NULL,
+ driver_options_update(hdlg, IsDlgButtonChecked(hdlg, DRV_OR_DSN) ? NULL : ci,
ci && ci->dsn && ci->dsn[0]);
case IDCANCEL:
@@ -271,12 +270,12 @@ driver_optionsProc(HWND hdlg,
case IDDEFAULTS:
if (IsDlgButtonChecked(hdlg, DRV_OR_DSN))
+ driver_optionsDraw(hdlg, NULL, 2, TRUE);
+ else
{
ConnInfo *ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER);
driver_optionsDraw(hdlg, ci, 0, FALSE);
}
- else
- driver_optionsDraw(hdlg, NULL, 2, TRUE);
break;
case DRV_OR_DSN:
@@ -285,14 +284,14 @@ driver_optionsProc(HWND hdlg,
mylog("DRV_OR_DSN clicked\n");
if (IsDlgButtonChecked(hdlg, DRV_OR_DSN))
{
- ConnInfo *ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER);
- SetWindowText(hdlg, "Advanced Options (per DSN)");
- driver_optionsDraw(hdlg, ci, ci ? 1 : 0, ci == NULL);
+ SetWindowText(hdlg, "Advanced Options (Common)");
+ driver_optionsDraw(hdlg, NULL, 0, TRUE);
}
else
{
- SetWindowText(hdlg, "Advanced Options (Common)");
- driver_optionsDraw(hdlg, NULL, 0, TRUE);
+ ConnInfo *ci = (ConnInfo *) GetWindowLong(hdlg, DWL_USER);
+ SetWindowText(hdlg, "Advanced Options (per DSN)");
+ driver_optionsDraw(hdlg, ci, ci ? 1 : 0, ci == NULL);
}
}
break;
diff --git a/src/interfaces/odbc/psqlodbc.rc b/src/interfaces/odbc/psqlodbc.rc
index 182d7f6dbf4..de2dea24289 100644
--- a/src/interfaces/odbc/psqlodbc.rc
+++ b/src/interfaces/odbc/psqlodbc.rc
@@ -132,10 +132,10 @@ BEGIN
EDITTEXT DRV_CONNSETTINGS,61,165,225,25,ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,59,201,50,14,WS_GROUP
- PUSHBUTTON "Cancel",IDCANCEL,129,201,50,14
- PUSHBUTTON "Defaults",IDDEFAULTS,199,201,50,15
- CONTROL "DSN",DRV_OR_DSN,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
- BS_NOTIFY | WS_TABSTOP,243,208,30,10
+ PUSHBUTTON "Cancel",IDCANCEL,124,201,50,14
+ PUSHBUTTON "Defaults",IDDEFAULTS,189,201,50,15
+ CONTROL "Common",DRV_OR_DSN,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
+ BS_NOTIFY | WS_TABSTOP,233,208,40,10
END
DLG_OPTIONS_DS DIALOG DISCARDABLE 0, 0, 267, 161
@@ -249,10 +249,10 @@ BEGIN
EDITTEXT DRV_CONNSETTINGS,50,185,225,25,ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,45,220,50,14,WS_GROUP
- PUSHBUTTON "Cancel",IDCANCEL,115,220,50,14
- PUSHBUTTON "Defaults",IDDEFAULTS,185,220,50,15
- CONTROL "DSN",DRV_OR_DSN,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
- BS_NOTIFY | WS_TABSTOP,243,224,30,10
+ PUSHBUTTON "Cancel",IDCANCEL,110,220,50,14
+ PUSHBUTTON "Defaults",IDDEFAULTS,175,220,50,15
+ CONTROL "Common",DRV_OR_DSN,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
+ BS_NOTIFY | WS_TABSTOP,233,224,40,10
END
DLG_OPTIONS_DS DIALOG DISCARDABLE 0, 0, 267, 161