--- np2/macosx/dialog/screenopt.cpp 2003/11/08 17:54:27 1.2 +++ np2/macosx/dialog/screenopt.cpp 2004/05/23 04:07:57 1.4 @@ -51,6 +51,12 @@ static void initScreenWindow(void) { setControlValue('sl/f', 2, np2cfg.wait[2]); setControlValue('sl/f', 3, np2cfg.wait[4]); setControlValue('sl/f', 4, np2cfg.realpal); + +#if defined(SUPPORT_PC9821) + DisableControl(getControlRefByID('Gral', 0, screenWin)); + DisableControl(getControlRefByID('16cl', 0, screenWin)); +#endif + } static pascal OSStatus cfWinproc(EventHandlerCallRef myHandler, EventRef event, void* userData) { @@ -181,7 +187,6 @@ static pascal OSStatus PrefsTabEventHand static void makeNibWindow (IBNibRef nibRef) { OSStatus err; short i; - ControlRef targetCon[5]; err = CreateWindowFromNib(nibRef, CFSTR("ScreenDialog"), &screenWin); if (err == noErr) { @@ -196,13 +201,15 @@ static void makeNibWindow (IBNibRef nibR { kEventClassControl, kEventControlValueFieldChanged } }; for (i=0;i<5;i++) { - targetCon[i] = getControlRefByID('sl/f',i,screenWin); - InstallControlEventHandler( targetCon[i], sliderEventHandlerProc , GetEventTypeCount(sliderControlEvents), sliderControlEvents, (void *)targetCon[i], NULL ); + ControlRef target; + target = getControlRefByID('sl/f', i, screenWin); + InstallControlEventHandler(target, sliderEventHandlerProc, GetEventTypeCount(sliderControlEvents), sliderControlEvents, (void *)target, NULL ); } EventHandlerRef ref; InstallWindowEventHandler (screenWin, NewEventHandlerUPP(cfWinproc), GetEventTypeCount(list), list, (void *)screenWin, &ref); - ShowSheetWindow(screenWin, hWndMain); + + ShowSheetWindow(screenWin, hWndMain); err=RunAppModalLoopForWindow(screenWin); }