Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.c
changeset 785:00235838aaec
prev780:4e4ea322cb84
next797:3bb52a384b64
author nkeynes
date Tue Jul 29 08:50:49 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Remove call to NSString stringByReplacingOccurrencesOfString:withString: as it's 10.5 only
Fix unrelated warnings
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoaui.c Mon Jul 28 10:13:13 2008 +0000
1.2 +++ b/src/cocoaui/cocoaui.c Tue Jul 29 08:50:49 2008 +0000
1.3 @@ -27,6 +27,9 @@
1.4 #include "config.h"
1.5 #include "display.h"
1.6 #include "gui.h"
1.7 +#include "gdrom/gdrom.h"
1.8 +#include "gdlist.h"
1.9 +#include "loader.h"
1.10 #include "cocoaui/cocoaui.h"
1.11
1.12 void cocoa_gui_update( void );
1.13 @@ -61,7 +64,19 @@
1.14 */
1.15 static NSString *NSMENU_( const char *text )
1.16 {
1.17 - return [[NSString stringWithUTF8String: gettext(text)] stringByReplacingOccurrencesOfString: @"_" withString: @""];
1.18 + const char *s = gettext(text);
1.19 + char buf[strlen(s)+1];
1.20 + char *d = buf;
1.21 +
1.22 + while( *s != '\0' ) {
1.23 + if( *s != '_' ) {
1.24 + *d++ = *s;
1.25 + }
1.26 + s++;
1.27 + }
1.28 + *d = '\0';
1.29 +
1.30 + return [NSString stringWithUTF8String: buf];
1.31 }
1.32
1.33 static void cocoa_gui_create_menu(void)
1.34 @@ -280,6 +295,7 @@
1.35 [NSApp activateIgnoringOtherApps: YES];
1.36
1.37 [pool release];
1.38 + return TRUE;
1.39 }
1.40
1.41 void gui_main_loop( gboolean run )
.