Search
lxdream.org :: lxdream/src/cocoaui/cocoa_gd.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoa_gd.c
changeset 736:a02d1475ccfd
prev691:ad3356543392
next758:99ae000d4e09
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoa_gd.c Thu Jun 19 04:40:37 2008 +0000
1.2 +++ b/src/cocoaui/cocoa_gd.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -37,21 +37,21 @@
1.4 [menu addItem: [NSMenuItem separatorItem]];
1.5 } else {
1.6 [[menu addItemWithTitle: [NSString stringWithCString: entry]
1.7 - action: @selector(gdrom_list_action:) keyEquivalent: @""]
1.8 - setTag: i];
1.9 + action: @selector(gdrom_list_action:) keyEquivalent: @""]
1.10 + setTag: i];
1.11 }
1.12 }
1.13 [menu addItem: [NSMenuItem separatorItem]];
1.14 [menu addItemWithTitle: NS_("Open image file...") action: @selector(mount_action:)
1.15 - keyEquivalent: @"i"];
1.16 + keyEquivalent: @"i"];
1.17 }
1.18 -
1.19 +
1.20 void cocoa_gdrom_menu_rebuild( NSMenu *menu )
1.21 {
1.22 while( [menu numberOfItems] > 0 ) {
1.23 [ menu removeItemAtIndex: 0 ];
1.24 }
1.25 -
1.26 +
1.27 cocoa_gdrom_menu_build( menu );
1.28 }
1.29
1.30 @@ -61,11 +61,11 @@
1.31 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1.32 NSMenu *menu = (NSMenu *)user_data;
1.33 int i;
1.34 -
1.35 +
1.36 if( list_changed ) {
1.37 cocoa_gdrom_menu_rebuild(menu);
1.38 }
1.39 -
1.40 +
1.41 for( i=0; i< [menu numberOfItems]; i++ ) {
1.42 if( i == selection ) {
1.43 [[menu itemAtIndex: i] setState: NSOnState];
1.44 @@ -80,7 +80,7 @@
1.45 {
1.46 NSMenu *menu = [[NSMenu alloc] initWithTitle: @"GD-Rom Settings"];
1.47 cocoa_gdrom_menu_build(menu);
1.48 -
1.49 +
1.50 register_gdrom_list_change_hook(cocoa_gdrom_menu_update, menu);
1.51 cocoa_gdrom_menu_update( FALSE, gdrom_list_get_selection(), menu );
1.52 return menu;
.