Author: manolo
Date: 2012-09-26 07:34:02 -0700 (Wed, 26 Sep 2012)
New Revision: 9684
Log:
Removed deprecation warning for FSCompareFSRefs().

Modified:
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2012-09-20 11:23:38 UTC (rev 9683)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2012-09-26 14:34:02 UTC (rev 9684)
@@ -1331,20 +1331,12 @@
     if ( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
          !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) {
       // only transform the application type for unbundled apps
-      CFBundleRef bundle = CFBundleGetMainBundle();
-      if ( bundle ) {
-       FSRef execFs;
-       CFURLRef execUrl = CFBundleCopyExecutableURL( bundle );
-       CFURLGetFSRef( execUrl, &execFs );
-        
-       FSRef bundleFs;
-       GetProcessBundleLocation( &cur_psn, &bundleFs );
-        
-       if ( !FSCompareFSRefs( &execFs, &bundleFs ) )
-          bundle = NULL;
-        
-        CFRelease(execUrl);
-      }
+      NSBundle *bundle = [NSBundle mainBundle];
+      if (bundle) {
+       NSString *exe = [bundle executablePath];
+       NSString *bpath = [bundle bundlePath];
+       if ([bpath isEqualToString:exe]) bundle = nil;
+       }
             
       if ( !bundle )
       {

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

Reply via email to