--- np2/macosx/toolwin.cpp 2003/11/03 17:36:24 1.2 +++ np2/macosx/toolwin.cpp 2003/11/08 17:54:26 1.8 @@ -12,6 +12,7 @@ #include "soundmng.h" #include "fdefine.h" + enum { IDC_TOOLHDDACC = 0, IDC_TOOLFDD1ACC, @@ -108,12 +109,26 @@ static const OSType subcommand[11] ={ '- static const ControlID popup[2] = { {'pop1', 1}, {'pop2', 2} }; +static DragReceiveHandlerUPP dr; +static bool isPUMA; + static void openpopup(HIPoint location); static void skinchange(void); -static DragReceiveHandlerUPP dr; // ---- +static void checkOSVersion(void) { + long res; + Gestalt(gestaltSystemVersion, &res); + if (res<0x1020) { + isPUMA = true; + } + else { + isPUMA = false; + } +} + + static PicHandle skinload(const char *path, Rect* bounds) { char fname[MAX_PATH]; @@ -441,6 +456,8 @@ static void toolwindestroy(void) { static pascal OSStatus cfWinproc(EventHandlerCallRef myHandler, EventRef event, void* userData) { OSStatus err = eventNotHandledErr; HICommand cmd; + ControlRef sub; + int i; if (GetEventClass(event)==kEventClassCommand && GetEventKind(event)==kEventCommandProcess ) { GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd); @@ -497,6 +514,21 @@ static pascal OSStatus cfWinproc(EventHa err=noErr; break; + case kEventWindowDrawContent: + case kEventWindowShown: + for (i=0; i