diff --git a/src/fonts.h b/src/fonts.h index 00c7dee4d..e8a89c6dc 100644 --- a/src/fonts.h +++ b/src/fonts.h @@ -11,7 +11,9 @@ #if defined(WIN32) || defined(__BEOS__) #undef FORKED_FONTS #endif - +#ifdef __APPLE__ +#undef FORKED_FONTS +#endif #include "SDL.h" diff --git a/src/macosx_print.h b/src/macosx_print.h index d7ee4e9a8..28c5f831b 100644 --- a/src/macosx_print.h +++ b/src/macosx_print.h @@ -3,7 +3,8 @@ // Tux Paint // // Created by Darrell Walisser on Sat Mar 15 2003. -// Copyright (c) 2003 Darrell Walisser. All rights reserved. +// Modified by Martin Fuhrer 2007. +// Copyright (c) 2007 Darrell Walisser, Martin Fuhrer. All rights reserved. // $Id$ // // This program is free software; you can redistribute it and/or modify @@ -34,8 +35,7 @@ int DisplayPageSetup(const SDL_Surface *surface); bool displayPrintSetupSheet; bool displayPrintSheet; } - -- +- @end #endif OBJECTIVEC diff --git a/src/macosx_print.m b/src/macosx_print.m index 079011c38..ea9d93f88 100644 --- a/src/macosx_print.m +++ b/src/macosx_print.m @@ -3,7 +3,8 @@ // Tux Paint // // Created by Darrell Walisser on Sat Mar 15 2003. -// Copyright (c) 2003 Darrell Walisser. +// Modified by Martin Fuhrer 2007. +// Copyright (c) 2007 Darrell Walisser, Martin Fuhrer. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/tuxpaint.c b/src/tuxpaint.c index f5f1941be..1b47cc613 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -279,6 +279,8 @@ typedef struct safer_dirent /* Apple */ #include "macosx_print.h" +#include "message.h" +#include "speech.h" #include "wrapperdata.h" extern WrapperData macosx; @@ -985,6 +987,11 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font, fflush(stdout); return NULL; } + +#ifdef __APPLE__ + if (macosx.buildingFontCache == 1) + displayMessage( MSG_FONT_CACHE ); +#endif #ifndef NO_SDLPANGO if (font->typ == FONT_TYPE_PANGO) @@ -998,10 +1005,18 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font, SDLPango_SetDefaultColor(font->pango_context, &pango_color); SDLPango_SetText(font->pango_context, str, -1); - ret = SDLPango_CreateSurfaceDraw(font->pango_context); + ret = SDLPango_CreateSurfaceDraw(font->pango_context); } #endif +#ifdef __APPLE__ + if (macosx.buildingFontCache = 1) + { + macosx.buildingFontCache = 0; + hideMessage(); + } +#endif + if (font->typ == FONT_TYPE_TTF) { #ifdef DEBUG @@ -2196,6 +2211,12 @@ static void mainloop(void) cursor_y = min(cursor_y + font_height, canvas->h - font_height); playsound(screen, 0, SND_RETURN, 1, SNDPOS_RIGHT, SNDDIST_NEAR); +#ifndef NOSOUND +#ifdef __APPLE__ + if (use_sound) + speak_string(texttool_str); +#endif +#endif im_softreset(&im_data); } else if (*im_cp == L'\t') @@ -2208,6 +2229,12 @@ static void mainloop(void) texttool_len = 0; cursor_textwidth = 0; } +#ifndef NOSOUND +#ifdef __APPLE__ + if (use_sound) + speak_string(texttool_str); +#endif +#endif im_softreset(&im_data); } else if (iswprint(*im_cp))