CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe <nihilus> 07/07/30 17:07:01
Modified files: . : ChangeLog gui : aqua.cpp Log message: Implemented OS-version checking and setCursor. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3869&r2=1.3870 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua.cpp?cvsroot=gnash&r1=1.24&r2=1.25 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3869 retrieving revision 1.3870 diff -u -b -r1.3869 -r1.3870 --- ChangeLog 30 Jul 2007 15:14:42 -0000 1.3869 +++ ChangeLog 30 Jul 2007 17:07:01 -0000 1.3870 @@ -14,6 +14,7 @@ * gui/Info.plist.in: Tidy up the version info, fixed icon. * gui/Makefile.am: Build OS X bundle if GUI == AQUA. + * gui/aqua.cpp: Implemented OS-version checking and setCursor. 2007-07-29 Rob Savoye <[EMAIL PROTECTED]> Index: gui/aqua.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/aqua.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- gui/aqua.cpp 26 Jul 2007 07:27:29 -0000 1.24 +++ gui/aqua.cpp 30 Jul 2007 17:07:01 -0000 1.25 @@ -18,7 +18,7 @@ // // -/* $Id: aqua.cpp,v 1.24 2007/07/26 07:27:29 nihilus Exp $ */ +/* $Id: aqua.cpp,v 1.25 2007/07/30 17:07:01 nihilus Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -95,8 +95,25 @@ bool AquaGui::init(int argc, char ***argv) /* Self-explainatory */ { + OSErr err; + long response; + Str255 text = " OS X version lower than 10.4 is not supported!", tmp = ""; + GNASH_REPORT_FUNCTION; + + /* Version check */ + err = Gestalt(gestaltSystemVersion, &response); + Boolean ok = ((err == noErr) && (response >= 0x00001040)); + + if (!ok) + { + StandardAlert(kAlertStopAlert, text, tmp, NULL, NULL); + ExitToShell(); + } + + /* Initialize the cursor */ InitCursor(); + #if 0 _glue.init(argc, argv); @@ -119,18 +136,17 @@ void AquaGui::setCursor(gnash_cursor_type newcursor) { GNASH_REPORT_FUNCTION; -#if 0 + switch(newcursor) { case gnash::CURSOR_HAND: - setCursor(); + SetThemeCursor(kThemePointingHandCursor); break; case gnash::CURSOR_INPUT: - setCursor() + SetThemeCursor(kThemeCrossCursor); break; default: - setCursor(); + SetThemeCursor(kThemeArrowCursor); } -#endif } @@ -173,14 +189,16 @@ bool AquaGui::createMenu() { - MenuRef specialmenuRef; - GNASH_REPORT_FUNCTION; +#if 0 + /* Enable 'About' */ + EnableMenuCommand(NULL, kHICommandAbout); + /* Enable 'Prefereces...' */ + EnableMenuCommand(NULL, kHICommandPreferences); +#endif - CreateNewMenu(202, 0, &specialmenuRef); // 202 is an arbitrary ID - SetMenuTitleWithCFString(specialmenuRef, CFSTR("Special")); - InsertMenu(specialmenuRef, 0); + //HIAboutBox(NULL); return true; } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit