Ticket #8305: options_dialog.diff

File options_dialog.diff, 3.3 KB (added by SF/jamieson630, 21 years ago)

Rev. 1 patch against December 12 CVS

  • scummvm/gui/options.cpp

    RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
    retrieving revision 1.43
    diff -u -r1.43 options.cpp
     
    6666
    6767}
    6868
    69 void OptionsDialog::open() {
     69void OptionsDialog::internalOpen() {
    7070        Dialog::open();
    7171
    7272        // Reset result value
     
    122122        }
    123123}
    124124
    125 void OptionsDialog::close() {
     125void OptionsDialog::internalClose() {
    126126        if (getResult()) {
    127127                if (_fullscreenCheckbox) {
    128128                        if (_enableGraphicSettings) {
     
    172172        Dialog::close();
    173173}
    174174
    175 void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
     175void OptionsDialog::internalHandleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
    176176        switch (cmd) {
    177177        case kMasterVolumeChanged:
    178178                _masterVolumeLabel->setValue(_masterVolumeSlider->getValue());
  • scummvm/gui/options.h

    RCS file: /cvsroot/scummvm/scummvm/gui/options.h,v
    retrieving revision 1.13
    diff -u -r1.13 options.h
     
    3737
    3838class OptionsDialog : public Dialog {
    3939        typedef Common::String String;
     40
     41protected:
     42        // HACK: Jamieson630
     43        // The following are the actual implementation of
     44        // open, close and handleCommand. Since these must be
     45        // called directly from derived classes, and MSVC6 has
     46        // been choking on the notation needed to do so,
     47        // these functions are used instead to avoid a name
     48        // ambiguity.
     49        void internalOpen();
     50        void internalClose();
     51        void internalHandleCommand(CommandSender *sender, uint32 cmd, uint32 data);
     52
    4053public:
    4154        OptionsDialog(const String &domain, int x, int y, int w, int h);
    4255
    43         void open();
    44         void close();
    45         void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
     56        void open() { internalOpen(); }
     57        void close() { internalClose(); }
     58        void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { internalHandleCommand(sender, cmd, data); }
    4659
    4760        enum {
    4861                kOKCmd                                  = 'ok  '
  • scummvm/scumm/dialogs.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
    retrieving revision 1.90
    diff -u -r1.90 dialogs.cpp
     
    454454}
    455455
    456456void OptionsDialog::open() {
    457         GUI::OptionsDialog::open();
     457        internalOpen(); // GUI::OptionsDialog::open
    458458
    459459        // update checkboxes, too
    460460        subtitlesCheckbox->setState(_scumm->_noSubtitles == false);
     
    467467                ConfMan.set("nosubtitles", !subtitlesCheckbox->getState(), _domain);
    468468        }
    469469
    470         GUI::OptionsDialog::close();
    471 
     470        internalClose(); // GUI::OptionsDialog::close
    472471
    473472        // Sync the engine with the config manager
    474473        int soundVolumeMaster = ConfMan.getInt("master_volume");
     
    498497#endif
    499498                break;
    500499        default:
    501                 GUI::OptionsDialog::handleCommand(sender, cmd, data);
     500                internalHandleCommand(sender, cmd, data); // GUI::OptionsDialog::handleCommand
    502501        }
    503502}
    504503