Changeset 9526
- Timestamp:
- 2005-04-01T09:47:48+12:00 (19 years ago)
- Location:
- trunk/gsdl/src/w32server
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/resource.h
r1292 r9526 35 35 #define ID_OK_BUTTON 1021 36 36 #define ID_CANCEL_BUTTON 1022 37 #define ID_RADIO_DEFAULT 1023 37 38 #define ID_PROJECT_SETTINGS 40001 38 39 #define ID_PROJECT_EXIT 40002 -
trunk/gsdl/src/w32server/settings.cpp
r4642 r9526 343 343 static void check_browser_settings (int &browser, char *browser_exe, 344 344 int netscapeneeded) { 345 346 345 // sort out which browser to use 347 346 if ((browser == GS_NETSCAPE) && (netscape_exe[0] == '\0')) … … 359 358 360 359 // get the browser's executable 361 if (browser == GS_NETSCAPE) { 360 if (browser == GS_DEFAULT) { 361 strcpy (browser_exe, default_browser_exe); 362 } else if (browser == GS_NETSCAPE) { 362 363 strcpy (browser_exe, netscape_exe); 363 364 } else if (browser == GS_IEXPLORE) { … … 395 396 396 397 check_installed_browsers (netscapeneeded); 397 gsdl_browser = GS_IEXPLORE; 398 gsdl_browser = GS_IEXPLORE; // !! TO DO: Change this to GS_DEFAULT to use the default browser by default !! 398 399 strcpy (gsdl_browser_exe, default_browser_exe); 399 400 check_browser_settings (gsdl_browser, gsdl_browser_exe, netscapeneeded); … … 526 527 527 528 static int read_dialog_browser_field (HWND hwndDlg) { 529 if (SendDlgItemMessage(hwndDlg, ID_RADIO_DEFAULT, 530 BM_GETCHECK, 0, 0) == 1) return GS_DEFAULT; 528 531 if (SendDlgItemMessage(hwndDlg, ID_RADIO_NETSCAPE, 529 532 BM_GETCHECK, 0, 0) == 1) return GS_NETSCAPE; … … 538 541 539 542 static void set_dialog_browser_field (HWND hwndDlg, int browser, char *othername) { 540 // if we are trying to set the browser to netscape or543 // if we are trying to set the browser to default, netscape or 541 544 // internet explorer and we can't find them, set the browser 542 545 // to 'other' 546 if ((browser == GS_DEFAULT) && (default_browser_exe[0] == '\0')) 547 browser = GS_NETSCAPE; 543 548 if ((browser == GS_NETSCAPE) && (netscape_exe[0] == '\0')) 544 549 browser = GS_IEXPLORE; … … 549 554 550 555 // update the radio buttons 556 SendDlgItemMessage(hwndDlg, ID_RADIO_DEFAULT, BM_SETCHECK, 557 (browser == GS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED, 0); 551 558 SendDlgItemMessage(hwndDlg, ID_RADIO_NETSCAPE, BM_SETCHECK, 552 559 (browser == GS_NETSCAPE) ? BST_CHECKED : BST_UNCHECKED, 0); … … 557 564 558 565 // update the other name field 559 if (browser == GS_NETSCAPE) { 566 if (browser == GS_DEFAULT) { 567 SetDlgItemText(hwndDlg, ID_OTHER_NAME, default_browser_exe); 568 } else if (browser == GS_NETSCAPE) { 560 569 SetDlgItemText(hwndDlg, ID_OTHER_NAME, netscape_exe); 561 570 } else if (browser == GS_IEXPLORE) { … … 611 620 dialog_update_enables(hwndDlg); 612 621 613 // make sure that the netscape and internet explorer622 // make sure that the default browser, netscape and internet explorer 614 623 // radio buttons are only enabled if they could be found 624 if (default_browser_exe[0] == '\0') 625 EnableWindow (GetDlgItem (hwndDlg, ID_RADIO_DEFAULT), FALSE); 615 626 if (netscape_exe[0] == '\0') 616 627 EnableWindow (GetDlgItem (hwndDlg, ID_RADIO_NETSCAPE), FALSE); … … 661 672 } 662 673 return 1; 674 675 case ID_RADIO_DEFAULT: 676 set_dialog_browser_field (hwndDlg, GS_DEFAULT, NULL); 677 dialog_update_enables(hwndDlg); 678 return 1; 663 679 664 680 case ID_RADIO_NETSCAPE: -
trunk/gsdl/src/w32server/settings.h
r4642 r9526 32 32 #define GS_IEXPLORE 1 33 33 #define GS_OTHER 2 34 #define GS_DEFAULT 3 34 35 35 36 #include "text_t.h"
Note:
See TracChangeset
for help on using the changeset viewer.