X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=netinstall%2Fsource.cc;h=c18f79c4c1175f6ca16b179794ce0c8cf95d41ac;hb=57eecac7a5bb6c31460e67c4b63425974db96a68;hp=a1aa889f957039de58d1847af6dd245a796ecbe5;hpb=76143592836b20b1feceeebb355259dfc9e93dea;p=chise%2Fxemacs-chise.git- diff --git a/netinstall/source.cc b/netinstall/source.cc index a1aa889..c18f79c 100644 --- a/netinstall/source.cc +++ b/netinstall/source.cc @@ -11,6 +11,7 @@ * * Written by DJ Delorie * + * Sync'ed with cinstall 2001-10-16 */ /* The purpose of this file is to manage the dialog box that lets the @@ -25,7 +26,7 @@ #include "msg.h" #include "log.h" -static int rb[] = { IDC_SOURCE_DOWNLOAD, IDC_SOURCE_NETINST, IDC_SOURCE_CWD, 0 }; +static int rb[] = { IDC_SOURCE_NETINST, IDC_SOURCE_DOWNLOAD, IDC_SOURCE_CWD, 0 }; static void check_if_enable_next (HWND h) @@ -36,13 +37,14 @@ check_if_enable_next (HWND h) static void load_dialog (HWND h) { + int i; rbset (h, rb, source); - check_if_enable_next (h); } static void save_dialog (HWND h) { + int i; source = rbget (h, rb); } @@ -56,7 +58,6 @@ dialog_cmd (HWND h, int id, HWND hwndctl, UINT code) case IDC_SOURCE_NETINST: case IDC_SOURCE_CWD: save_dialog (h); - check_if_enable_next (h); break; case IDOK: @@ -72,8 +73,10 @@ dialog_cmd (HWND h, int id, HWND hwndctl, UINT code) case IDCANCEL: NEXT (0); break; + + default: + break; } - return FALSE; } static BOOL CALLBACK @@ -83,6 +86,12 @@ dialog_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) { case WM_INITDIALOG: load_dialog (h); + // Check to see if any radio buttons are selected. If not, select a default. + if ((!SendMessage(GetDlgItem (h, IDC_SOURCE_DOWNLOAD), BM_GETCHECK, 0, 0) == BST_CHECKED) + && (!SendMessage(GetDlgItem (h, IDC_SOURCE_CWD), BM_GETCHECK, 0, 0) == BST_CHECKED)) + { + SendMessage(GetDlgItem (h, IDC_SOURCE_NETINST), BM_SETCHECK, BST_CHECKED, 0); + } return FALSE; case WM_COMMAND: return HANDLE_WM_COMMAND (h, wParam, lParam, dialog_cmd); @@ -94,6 +103,8 @@ void do_source (HINSTANCE h) { int rv = 0; + /* source = IDC_SOURCE_CWD;*/ + source = IDC_SOURCE_NETINST; rv = DialogBox (h, MAKEINTRESOURCE (IDD_SOURCE), 0, dialog_proc); if (rv == -1) fatal (IDS_DIALOG_FAILED);