ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/BeOS/prefs_editor_beos.cpp
(Generate patch)

Comparing BasiliskII/src/BeOS/prefs_editor_beos.cpp (file contents):
Revision 1.10 by cebix, 2001-05-26T12:31:00Z vs.
Revision 1.11 by cebix, 2001-07-15T14:19:08Z

# Line 80 | Line 80 | const uint32 MSG_NOSOUND = 'nosn';
80   const uint32 MSG_SER_A = 'sera';                        // "Serial/Network" pane
81   const uint32 MSG_SER_B = 'serb';
82   const uint32 MSG_ETHER = 'ethr';
83 + const uint32 MSG_UDPTUNNEL = 'udpt';
84  
85   const uint32 MSG_RAMSIZE = 'rmsz';                      // "Memory/Misc" pane
86   const uint32 MSG_MODELID_5 = 'mi05';
# Line 221 | Line 222 | private:
222          void read_volumes_prefs(void);
223          void hide_show_graphics_ctrls(void);
224          void read_graphics_prefs(void);
225 +        void hide_show_serial_ctrls(void);
226 +        void read_serial_prefs(void);
227          void add_serial_names(BPopUpMenu *menu, uint32 msg);
228          void read_memory_prefs(void);
229  
# Line 248 | Line 251 | private:
251          BMenuField *scr_mode_menu;
252          BCheckBox *nosound_checkbox;
253          BCheckBox *ether_checkbox;
254 +        BCheckBox *udptunnel_checkbox;
255 +        NumberControl *udpport_ctrl;
256          RAMSlider *ramsize_slider;
257          PathControl *extfs_control;
258          PathControl *rom_control;
# Line 593 | Line 598 | BView *PrefsWindow::create_graphics_pane
598  
599  
600   /*
601 < *  Create "Serial Ports" pane
601 > *  Create "Serial/Network" pane
602   */
603  
604 + void PrefsWindow::hide_show_serial_ctrls(void)
605 + {
606 +        if (udptunnel_checkbox->Value() == B_CONTROL_ON) {
607 +                ether_checkbox->SetEnabled(false);
608 +                udpport_ctrl->SetEnabled(true);
609 +        } else {
610 +                ether_checkbox->SetEnabled(true);
611 +                udpport_ctrl->SetEnabled(false);
612 +        }
613 + }
614 +
615 + void PrefsWindow::read_serial_prefs(void)
616 + {
617 +        PrefsReplaceInt32("udpport", udpport_ctrl->Value());
618 + }
619 +
620   void PrefsWindow::add_serial_names(BPopUpMenu *menu, uint32 msg)
621   {
622          BSerialPort *port = new BSerialPort;
# Line 655 | Line 676 | BView *PrefsWindow::create_serial_pane(v
676          pane->AddChild(ether_checkbox);
677          ether_checkbox->SetValue(PrefsFindString("ether") ? B_CONTROL_ON : B_CONTROL_OFF);
678  
679 +        udptunnel_checkbox = new BCheckBox(BRect(10, 67, right, 72), "udptunnel", GetString(STR_UDPTUNNEL_CTRL), new BMessage(MSG_UDPTUNNEL));
680 +        pane->AddChild(udptunnel_checkbox);
681 +        udptunnel_checkbox->SetValue(PrefsFindBool("udptunnel") ? B_CONTROL_ON : B_CONTROL_OFF);
682 +
683 +        udpport_ctrl = new NumberControl(BRect(10, 87, right / 2, 105), 118, "udpport", GetString(STR_UDPPORT_CTRL), PrefsFindInt32("udpport"), NULL);
684 +        pane->AddChild(udpport_ctrl);
685 +
686 +        hide_show_serial_ctrls();
687          return pane;
688   }
689  
# Line 938 | Line 967 | void PrefsWindow::MessageReceived(BMessa
967                                  PrefsRemoveItem("ether");
968                          break;
969  
970 +                case MSG_UDPTUNNEL:
971 +                        PrefsReplaceBool("udptunnel", udptunnel_checkbox->Value() == B_CONTROL_ON);
972 +                        hide_show_serial_ctrls();
973 +                        break;
974 +
975                  case MSG_RAMSIZE:
976                          PrefsReplaceInt32("ramsize", ramsize_slider->Value() * 1024 * 1024);
977                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines