[AD] Re: GCC 4 warnings for MacOS X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Sorry, I diff'ed against the wrong version in the repository (1.22 instead of 1.23). Please find the correct patch below (it reinstates the call to setAppleMenu)

Pete

On Friday, June 10, 2005, at 05:54  pm, Peter Hull wrote:

OK, I have a potential patch that I think should work - please see the thread on A.cc for more details:
http://www.allegro.cc/forums/view_thread.php?_id=497928

Pete



===================================================================
RCS file: /cvsroot/alleg/allegro/src/macosx/main.m,v
retrieving revision 1.23
diff -u -r1.23 main.m
--- src/macosx/main.m   31 May 2005 08:20:24 -0000      1.23
+++ src/macosx/main.m   10 Jun 2005 16:57:57 -0000
@@ -187,6 +187,12 @@

 @end

+/* This prevents warnings that 'NSApplication might not
+ * respond to setAppleMenu' on OS X 10.4
+ */
+@interface NSApplication(AllegroOSX)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end


 /* main:
@@ -223,8 +229,7 @@
       keyEquivalent: @""];
    [[NSApp mainMenu] addItem: temp_item];
    [[NSApp mainMenu] setSubmenu: menu forItem: temp_item];
-   /* It seems setAppleMenu: no longer exists in MacOS 10.4 (?) */
-   /* [NSApp setAppleMenu: menu]; */
+   [NSApp setAppleMenu: menu];
    NSString *quit = @"Quit ";
    menu_item = [[NSMenuItem allocWithZone: [NSMenu menuZone]]
initWithTitle: [quit stringByAppendingString: [[NSProcessInfo processInfo] processName]]





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/