Mac OS X updates: Added dialog box requesting user to wait while font cache is being built. Added experimental speech synthesis support.

This commit is contained in:
Martin Fuhrer 2008-01-04 05:39:15 +00:00
parent 12e3dcaf7f
commit 926ee26f67
4 changed files with 36 additions and 6 deletions

View file

@ -11,7 +11,9 @@
#if defined(WIN32) || defined(__BEOS__) #if defined(WIN32) || defined(__BEOS__)
#undef FORKED_FONTS #undef FORKED_FONTS
#endif #endif
#ifdef __APPLE__
#undef FORKED_FONTS
#endif
#include "SDL.h" #include "SDL.h"

View file

@ -3,7 +3,8 @@
// Tux Paint // Tux Paint
// //
// Created by Darrell Walisser on Sat Mar 15 2003. // 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$ // $Id$
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
@ -34,7 +35,6 @@ int DisplayPageSetup(const SDL_Surface *surface);
bool displayPrintSetupSheet; bool displayPrintSetupSheet;
bool displayPrintSheet; bool displayPrintSheet;
} }
- -
@end @end

View file

@ -3,7 +3,8 @@
// Tux Paint // Tux Paint
// //
// Created by Darrell Walisser on Sat Mar 15 2003. // 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 // 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 // it under the terms of the GNU General Public License as published by

View file

@ -279,6 +279,8 @@ typedef struct safer_dirent
/* Apple */ /* Apple */
#include "macosx_print.h" #include "macosx_print.h"
#include "message.h"
#include "speech.h"
#include "wrapperdata.h" #include "wrapperdata.h"
extern WrapperData macosx; extern WrapperData macosx;
@ -986,6 +988,11 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font,
return NULL; return NULL;
} }
#ifdef __APPLE__
if (macosx.buildingFontCache == 1)
displayMessage( MSG_FONT_CACHE );
#endif
#ifndef NO_SDLPANGO #ifndef NO_SDLPANGO
if (font->typ == FONT_TYPE_PANGO) if (font->typ == FONT_TYPE_PANGO)
{ {
@ -1002,6 +1009,14 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font,
} }
#endif #endif
#ifdef __APPLE__
if (macosx.buildingFontCache = 1)
{
macosx.buildingFontCache = 0;
hideMessage();
}
#endif
if (font->typ == FONT_TYPE_TTF) if (font->typ == FONT_TYPE_TTF)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -2196,6 +2211,12 @@ static void mainloop(void)
cursor_y = min(cursor_y + font_height, canvas->h - font_height); cursor_y = min(cursor_y + font_height, canvas->h - font_height);
playsound(screen, 0, SND_RETURN, 1, SNDPOS_RIGHT, SNDDIST_NEAR); 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); im_softreset(&im_data);
} }
else if (*im_cp == L'\t') else if (*im_cp == L'\t')
@ -2208,6 +2229,12 @@ static void mainloop(void)
texttool_len = 0; texttool_len = 0;
cursor_textwidth = 0; cursor_textwidth = 0;
} }
#ifndef NOSOUND
#ifdef __APPLE__
if (use_sound)
speak_string(texttool_str);
#endif
#endif
im_softreset(&im_data); im_softreset(&im_data);
} }
else if (iswprint(*im_cp)) else if (iswprint(*im_cp))