- apply MacOSX "About Box Patch" from Jeremy Parsons (Br'fin). This fixes

bug [ 626261 ] About Box is awkwardly outdated
This commit is contained in:
Bryce Denney 2002-10-26 22:06:37 +00:00
parent ddd7d1c173
commit 954b737dda

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: carbon.cc,v 1.14 2002-10-25 11:44:36 bdenney Exp $
// $Id: carbon.cc,v 1.15 2002-10-26 22:06:37 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -43,6 +43,7 @@
#include "bochs.h"
#include "icon_bochs.h"
#include "font/vga.bitmap.h"
#include "bxversion.h"
// MAC OS INCLUDES
#include <Carbon/Carbon.h>
@ -409,7 +410,6 @@ pascal OSStatus CEvtHandleApplicationMenus (EventHandlerCallRef nextHandler,
OSErr err = noErr;
short i;
DialogPtr theDlog;
GetEventParameter (theEvent, kEventParamDirectObject,
typeHICommand, NULL, sizeof(HICommand),
@ -418,9 +418,32 @@ pascal OSStatus CEvtHandleApplicationMenus (EventHandlerCallRef nextHandler,
switch(commandStruct.commandID)
{
case kHICommandAbout:
theDlog = GetNewDialog(128, NULL, (WindowPtr)-1);
ModalDialog(NULL, &i);
DisposeDialog(theDlog);
{
DialogRef aboutDialog;
DialogItemIndex index;
CFStringRef cf_version;
char version[256];
sprintf(version, "Bochs x86 Emulator version %s (MacOS X port)", VER_STRING);
cf_version = CFStringCreateWithCString(NULL, version, kCFStringEncodingASCII);
AlertStdCFStringAlertParamRec aboutParam = {0};
aboutParam.version = kStdCFStringAlertVersionOne;
aboutParam.position = kWindowDefaultPosition;
aboutParam.defaultButton = kAlertStdAlertOKButton;
CreateStandardAlert(
kAlertNoteAlert,
cf_version,
NULL, /* can be NULL */
&aboutParam, /* can be NULL */
&aboutDialog);
RunStandardAlert(
aboutDialog,
NULL, /* can be NULL */
&index);
CFRelease( cf_version );
}
break;
case kHICommandQuit: