Revision: 7797
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7797&view=rev
Author:   hofman
Date:     2012-11-07 12:24:49 +0000 (Wed, 07 Nov 2012)
Log Message:
-----------
revert earlier change to flag in script menu, local variable does not work 
because the FSEvent can't properly handle its context info

Modified Paths:
--------------
    trunk/SKScriptMenu.m

Modified: trunk/SKScriptMenu.m
===================================================================
--- trunk/SKScriptMenu.m        2012-11-06 15:22:54 UTC (rev 7796)
+++ trunk/SKScriptMenu.m        2012-11-07 12:24:49 UTC (rev 7797)
@@ -52,11 +52,9 @@
     FSEventStreamRef streamRef;
     NSArray *scriptFolders;
     NSArray *sortDescriptors;
-    BOOL menuNeedsUpdate;
 }
 
 @property (nonatomic, readonly) NSMenu *scriptMenu;
-@property (nonatomic) BOOL menuNeedsUpdate;
 
 + (id)sharedController;
 
@@ -68,8 +66,10 @@
 
 @implementation SKScriptMenuController
 
-@synthesize scriptMenu, menuNeedsUpdate;
+static BOOL menuNeedsUpdate = NO;
 
+@synthesize scriptMenu;
+
 + (id)sharedController {
     static SKScriptMenuController *sharedController = nil;
     if (sharedController == nil)
@@ -78,7 +78,7 @@
 }
 
 static void fsevents_callback(FSEventStreamRef streamRef, void 
*clientCallBackInfo, int numEvents, const char *const eventPaths[], const 
FSEventStreamEventFlags *eventMasks, const uint64_t *eventIDs) {
-    [(id)clientCallBackInfo setMenuNeedsUpdate:YES];
+    menuNeedsUpdate = YES;
 }
 
 - (id)init {
@@ -111,7 +111,7 @@
             
             streamRef = FSEventStreamCreate(kCFAllocatorDefault,
                                             
(FSEventStreamCallback)&fsevents_callback, // callback
-                                            (void *)self, // context
+                                            NULL, // context
                                             (CFArrayRef)[scriptFolders 
valueForKey:@"path"], // pathsToWatch
                                             kFSEventStreamEventIdSinceNow, // 
sinceWhen
                                             1.0, // latency

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to