Revision: 7795
http://skim-app.svn.sourceforge.net/skim-app/?rev=7795&view=rev
Author: hofman
Date: 2012-11-06 13:09:09 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
pass self as context for FSEvent
Modified Paths:
--------------
trunk/SKScriptMenu.m
Modified: trunk/SKScriptMenu.m
===================================================================
--- trunk/SKScriptMenu.m 2012-11-05 17:59:52 UTC (rev 7794)
+++ trunk/SKScriptMenu.m 2012-11-06 13:09:09 UTC (rev 7795)
@@ -52,9 +52,11 @@
FSEventStreamRef streamRef;
NSArray *scriptFolders;
NSArray *sortDescriptors;
+ BOOL menuNeedsUpdate;
}
@property (nonatomic, readonly) NSMenu *scriptMenu;
+@property (nonatomic) BOOL menuNeedsUpdate;
+ (id)sharedController;
@@ -66,10 +68,8 @@
@implementation SKScriptMenuController
-@synthesize scriptMenu;
+@synthesize scriptMenu, menuNeedsUpdate;
-static BOOL menuNeedsUpdate = NO;
-
+ (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) {
- menuNeedsUpdate = YES;
+ [(id)clientCallBackInfo setMenuNeedsUpdate:YES];
}
- (id)init {
@@ -111,7 +111,7 @@
streamRef = FSEventStreamCreate(kCFAllocatorDefault,
(FSEventStreamCallback)&fsevents_callback, // callback
- NULL, // context
+ (void *)self, // 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