DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2221
Version: 1.3-feature
Fix Version: 1.3.0 (r6951)


A small change, as an svn diff output, to Fl_cocoa.mm so the
"About myprog" menu item displays the FLTK version being used.
This diff also reflects my previous suggestion for Fl_cocoa.mm changes.

===================================================================
--- Fl_cocoa.mm (revision 6958)
+++ Fl_cocoa.mm (working copy)
@@ -61,19 +61,17 @@
 #include <stdarg.h>
 
 #import <Cocoa/Cocoa.h>
-#include <AvailabilityMacros.h>
+
+#ifndef NSINTEGER_DEFINED //appears with 10.5 in NSObjCRuntime.h
 #if defined(__LP64__) && __LP64__
-typedef double CGFloat;
-#else
-typedef float CGFloat;
-#endif
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
 typedef long NSInteger;
 typedef unsigned long NSUInteger;
+#else
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
 #endif
+#endif
 
-
 // #define DEBUG_SELECT                // UNCOMMENT FOR SELECT()/THREAD 
DEBUGGING
 #ifdef DEBUG_SELECT
 #include <stdio.h>             // testing
@@ -1255,7 +1253,11 @@
                                             UInt32 _arg3, UInt32 _arg4,
UInt32 _arg5);
 }
 
-...@interface FLDelegate : NSObject {
+...@interface FLDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSWindowDelegate, NSApplicationDelegate>
+#endif
+{
 }
 - (void)windowDidMove:(NSNotification *)notif;
 - (void)windowDidResize:(NSNotification *)notif;
@@ -2746,6 +2748,22 @@
   return num_screens;
 }
 
+...@interface FLaboutItemTarget : NSObject 
+{
+}
+- (void)showPanel;
+...@end
+...@implementation FLaboutItemTarget
+- (void)showPanel
+{
+  NSDictionary *options;
+  options = [NSDictionary dictionaryWithObjectsAndKeys:
+            [NSString stringWithFormat:@" FLTK %d.%d Cocoa", FL_MAJOR_VERSION,
FL_MINOR_VERSION ], @"Copyright",
+            nil];
+  [NSApp  orderFrontStandardAboutPanelWithOptions:options];
+}
+...@end
+
 static NSMenu *appleMenu;
 static void createAppleMenu(void)
 {
@@ -2763,7 +2781,9 @@
   appleMenu = [[NSMenu alloc] initWithTitle:@""];
   /* Add menu items */
   title = [@"About " stringByAppendingString:(NSString*)nsappname];
-  [appleMenu addItemWithTitle:title
action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+  [appleMenu addItemWithTitle:title action:@selector(showPanel)
keyEquivalent:@""];
+  FLaboutItemTarget *about = [[FLaboutItemTarget alloc] init];
+  [[appleMenu itemAtIndex:0] setTarget:about];
   [appleMenu addItem:[NSMenuItem separatorItem]];
   // Services Menu
   services = [[[NSMenu alloc] init] autorelease];


Link: http://www.fltk.org/str.php?L2221
Version: 1.3-feature
Fix Version: 1.3.0 (r6951)

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to