Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.c
changeset 837:4eae2ddccf9c
prev797:3bb52a384b64
next839:51f1c4195790
author nkeynes
date Thu Aug 28 01:39:51 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Extract the disc title (where available) and display in the title bar
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoaui.c Fri Aug 01 03:58:25 2008 +0000
1.2 +++ b/src/cocoaui/cocoaui.c Thu Aug 28 01:39:51 2008 +0000
1.3 @@ -58,6 +58,14 @@
1.4 - (void) setAppleMenu:(NSMenu *)aMenu;
1.5 @end
1.6
1.7 +gboolean cocoa_gui_disc_changed( gdrom_disc_t disc, const gchar *disc_name, void *user_data )
1.8 +{
1.9 + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1.10 + LxdreamMainWindow *window = (LxdreamMainWindow *)user_data;
1.11 + [window updateTitle];
1.12 + [pool release];
1.13 +}
1.14 +
1.15 /**
1.16 * Produces the menu title by looking the text up in gettext, removing any
1.17 * underscores, and returning the result as an NSString.
1.18 @@ -306,6 +314,8 @@
1.19 [window makeKeyAndOrderFront: nil];
1.20 [NSApp activateIgnoringOtherApps: YES];
1.21
1.22 + register_gdrom_disc_change_hook( cocoa_gui_disc_changed, window );
1.23 +
1.24 [pool release];
1.25 return TRUE;
1.26 }
.