Diff for /np2/macosx/Attic/configure.cpp between versions 1.3 and 1.5

version 1.3, 2003/10/23 21:00:24 version 1.5, 2003/10/24 20:46:13
Line 12 Line 12
 #include        "ini.h"  #include        "ini.h"
 #include        "sysmng.h"  #include        "sysmng.h"
 #include        "configure.h"  #include        "configure.h"
   #include        "dialogutils.h"
   
         int                     sound_renewals = 0;          int                     sound_renewals = 0;
 static  WindowRef       configWin;  static  WindowRef       configWin;
Line 19  static WindowRef configWin; Line 20  static WindowRef configWin;
 #define AVE(a, b)                                       \  #define AVE(a, b)                                       \
                         (((a) + (b)) / 2)                          (((a) + (b)) / 2)
   
 static void endLoop(void) {  #define getSelectedValue(a,b)   GetControlValue(getControlRefByID(a,b,configWin))
     OSStatus    err;  
     HideSheetWindow(configWin);  
     DisposeWindow(configWin);  
     err=QuitAppModalLoopForWindow(configWin);  
 }  
   
 ControlRef getControlRefByID(OSType sign, int id, WindowRef win) {  
     ControlRef  conRef;  
     ControlID   conID;  
   
     conID.signature=sign;  
     conID.id=id;  
     GetControlByID(win, &conID, &conRef);  
     return conRef;  
 }      
   
 static SInt16 getSelectedValue(OSType sign, int id) {  
     SInt16      value;  
       
     value=GetControlValue(getControlRefByID(sign, id, configWin));  
   
     return value;  
 }  
   
 static int getMultiple(void) {  static int getMultiple(void) {
     int multi;      int multi;
Line 264  static pascal OSStatus cfWinproc(EventHa Line 242  static pascal OSStatus cfWinproc(EventHa
                 }                  }
   
                 sysmng_update(update);                  sysmng_update(update);
                 endLoop();                  endLoop(configWin);
                 err=noErr;                  err=noErr;
                 break;                  break;
                                   
             case kHICommandCancel:              case kHICommandCancel:
                 endLoop();                  endLoop(configWin);
                 err=noErr;                  err=noErr;
                 break;                  break;
         }          }
Line 291  static void makeNibWindow (IBNibRef nibR Line 269  static void makeNibWindow (IBNibRef nibR
         { kEventClassWindow, kEventWindowActivated } };          { kEventClassWindow, kEventWindowActivated } };
         EventHandlerRef ref;          EventHandlerRef ref;
                   
         InstallWindowEventHandler (configWin, NewEventHandlerUPP(cfWinproc), 2, list, (void *)configWin, &ref);          InstallWindowEventHandler (configWin, NewEventHandlerUPP(cfWinproc), GetEventTypeCount(list), list, (void *)configWin, &ref);
         ShowSheetWindow(configWin, hWndMain);          ShowSheetWindow(configWin, hWndMain);
                   
         err=RunAppModalLoopForWindow(configWin);          err=RunAppModalLoopForWindow(configWin);

Removed from v.1.3  
changed lines
  Added in v.1.5


RetroPC.NET-CVS <cvs@retropc.net>