Changeset 5002
- Timestamp:
- 10/24/07 03:15:20 (9 months ago)
- Files:
-
- WiredAdditions/trunk/NSEvent-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSFileManager-WIAdditions.m (modified) (1 diff)
- WiredAdditions/trunk/NSObject-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSObject-WIAdditions.m (modified) (2 diffs)
- WiredAdditions/trunk/NSString-WIAdditions.m (modified) (1 diff)
- WiredAdditions/trunk/NSThread-WIAdditions.m (modified) (1 diff)
- WiredAdditions/trunk/NSWindow-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSWindow-WIAdditions.m (modified) (1 diff)
- WiredAdditions/trunk/WIAddress.h (deleted)
- WiredAdditions/trunk/WIApplication.h (modified) (2 diffs)
- WiredAdditions/trunk/WIError.h (deleted)
- WiredAdditions/trunk/WIError.m (deleted)
- WiredAdditions/trunk/WIEventQueue.h (modified) (2 diffs)
- WiredAdditions/trunk/WIGraphView.m (modified) (11 diffs)
- WiredAdditions/trunk/WIImageViewWithImagePicker.m (modified) (2 diffs)
- WiredAdditions/trunk/WIProgressIndicator.h (modified) (1 diff)
- WiredAdditions/trunk/WIReadWriteLock.h (modified) (1 diff)
- WiredAdditions/trunk/WISearchField.m (modified) (2 diffs)
- WiredAdditions/trunk/WISplitView.h (modified) (1 diff)
- WiredAdditions/trunk/WISplitView.m (modified) (3 diffs)
- WiredAdditions/trunk/WITextView.h (modified) (1 diff)
- WiredAdditions/trunk/WIWindowController.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredAdditions/trunk/NSEvent-WIAdditions.h
r4958 r5002 27 27 */ 28 28 29 @interface NSEvent(WIEventAdditions)30 31 29 #ifndef NSEscapeFunctionKey 32 30 #define NSEscapeFunctionKey 27 33 31 #endif 34 32 33 @interface NSEvent(WIEventAdditions) 35 34 36 35 - (unichar)character; WiredAdditions/trunk/NSFileManager-WIAdditions.m
r4798 r5002 113 113 BOOL isDirectory; 114 114 115 return [self fileExistsAtPath:path isDirectory:&isDirectory] && isDirectory;115 return ([self fileExistsAtPath:path isDirectory:&isDirectory] && isDirectory); 116 116 } 117 117 WiredAdditions/trunk/NSObject-WIAdditions.h
r4874 r5002 31 31 + (NSBundle *)bundle; 32 32 - (NSBundle *)bundle; 33 34 + (void)cancelPreviousPerformRequestsWithTarget:(id)target selector:(SEL)selector; 33 35 34 36 - (void)performSelector:(SEL)selector afterDelay:(NSTimeInterval)delay; WiredAdditions/trunk/NSObject-WIAdditions.m
r4957 r5002 47 47 #pragma mark - 48 48 49 + (void)cancelPreviousPerformRequestsWithTarget:(id)target selector:(SEL)selector { 50 [NSObject cancelPreviousPerformRequestsWithTarget:target selector:selector object:NULL]; 51 } 52 53 54 #pragma mark - 55 49 56 - (void)performSelector:(SEL)selector afterDelay:(NSTimeInterval)delay { 50 57 [self performSelector:selector withObject:NULL afterDelay:delay]; … … 54 61 55 62 - (void)performSelectorOnce:(SEL)selector afterDelay:(NSTimeInterval)delay { 56 [self performSelectorOnce:selector withObject:NULL afterDelay:delay]; 63 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:selector object:NULL]; 64 [self performSelector:selector withObject:NULL afterDelay:delay]; 57 65 } 58 66 WiredAdditions/trunk/NSString-WIAdditions.m
r4960 r5002 54 54 CFRelease(uuid); 55 55 56 return [(NSString *) string autorelease];56 return [(NSString *) string autorelease]; 57 57 } 58 58 WiredAdditions/trunk/NSThread-WIAdditions.m
r4438 r5002 32 32 33 33 34 @interface NSThread(Private)35 36 + (void)_setMainThread;37 38 @end39 40 41 34 @implementation NSThread(WIThreadAdditions) 42 35 43 36 + (void)load { 44 [NSThread _setMainThread];37 WIMainThread = [NSThread currentThread]; 45 38 } 46 39 WiredAdditions/trunk/NSWindow-WIAdditions.h
r4988 r5002 32 32 33 33 - (BOOL)isOnScreen; 34 - ( float)toolbarHeight;34 - (CGFloat)toolbarHeight; 35 35 36 36 - (void)setPropertiesFromDictionary:(NSDictionary *)dictionary; WiredAdditions/trunk/NSWindow-WIAdditions.m
r4988 r5002 51 51 52 52 53 - ( float)toolbarHeight {53 - (CGFloat)toolbarHeight { 54 54 NSToolbar *toolbar; 55 55 WiredAdditions/trunk/WIApplication.h
r4438 r5002 28 28 29 29 @interface WIApplication : NSApplication { 30 NSTimeInterval _terminationDelay;31 32 IBOutlet NSWindow *_releaseNotesWindow; 33 IBOutlet NSTextView *_releaseNotesTextView;30 IBOutlet NSWindow *_releaseNotesWindow; 31 IBOutlet NSTextView *_releaseNotesTextView; 32 33 NSTimeInterval _terminationDelay; 34 34 } 35 36 37 #define WIApplicationDidChangeActiveNotification @"WIApplicationDidChangeActiveNotification"38 #define WIApplicationDidChangeFlagsNotification @"WIApplicationDidChangeFlagsNotification"39 40 35 41 36 - (NSApplicationTerminateReply)runTerminationDelayPanelWithTimeInterval:(NSTimeInterval)delay; … … 44 39 45 40 @end 41 42 43 #define WIApplicationDidChangeActiveNotification @"WIApplicationDidChangeActiveNotification" 44 #define WIApplicationDidChangeFlagsNotification @"WIApplicationDidChangeFlagsNotification" WiredAdditions/trunk/WIEventQueue.h
r4971 r5002 49 49 50 50 51 #define WIEventFileDeleteNotification @"WIEventFileDeleteNotification"52 #define WIEventFileWriteNotification @"WIEventFileWriteNotification"53 #define WIEventFileExtendNotification @"WIEventFileExtendNotification"54 #define WIEventFileAttributeChangeNotification @"WIEventFileAttributeChangeNotification"55 #define WIEventFileLinkCountChangeNotification @"WIEventFileLinkCountChangeNotification"56 #define WIEventFileRenameNotification @"WIEventFileRenameNotification"57 #define WIEventFileRevokeNotification @"WIEventFileRevokeNotification"58 59 60 51 + (WIEventQueue *)sharedQueue; 61 52 … … 66 57 67 58 @end 59 60 61 #define WIEventFileDeleteNotification @"WIEventFileDeleteNotification" 62 #define WIEventFileWriteNotification @"WIEventFileWriteNotification" 63 #define WIEventFileExtendNotification @"WIEventFileExtendNotification" 64 #define WIEventFileAttributeChangeNotification @"WIEventFileAttributeChangeNotification" 65 #define WIEventFileLinkCountChangeNotification @"WIEventFileLinkCountChangeNotification" 66 #define WIEventFileRenameNotification @"WIEventFileRenameNotification" 67 #define WIEventFileRevokeNotification @"WIEventFileRevokeNotification" WiredAdditions/trunk/WIGraphView.m
r4438 r5002 191 191 NSInteger i, inPoints, outPoints; 192 192 193 // --- draw background194 193 [_canvas setSize:rect.size]; 195 194 [_canvas lockFocus]; … … 198 197 [_canvas unlockFocus]; 199 198 200 // --- get sizes201 199 inPoints = [_inData count]; 202 200 outPoints = [_outData count]; 203 201 204 // --- get in data range205 202 if(inPoints < rect.size.width / 3.0) { 206 203 inData = _inData; … … 213 210 } 214 211 215 // --- get out data range216 212 if(outPoints < rect.size.width / 3.0) { 217 213 outData = _outData; … … 224 220 } 225 221 226 // --- get maximum values227 222 inMax = inPoints > 0 ? [[inData maximumNumber] doubleValue] : 0.0; 228 223 outMax = outPoints > 0 ? [[outData maximumNumber] doubleValue] : 0.0; … … 230 225 231 226 if(outPoints > 0) { 232 // --- set initial out point, starting at right side233 227 height = max > 0.0 234 228 ? (rect.size.height - 1.0) * ([[outData objectAtIndex:0] doubleValue] / max) … … 239 233 [path moveToPoint:point]; 240 234 241 // --- connect out points242 235 for(i = 1; i < outPoints; i++) { 243 236 height = max > 0.0 … … 251 244 [path closePath]; 252 245 253 // --- draw out254 246 [_canvas lockFocus]; 255 247 [_outColor set]; … … 263 255 264 256 if(inPoints > 0.0) { 265 // --- set initial in point, starting at right side266 257 height = max > 0.0 267 258 ? rect.size.height * ([[inData objectAtIndex:0] doubleValue] / max) … … 272 263 [path moveToPoint:point]; 273 264 274 // --- connect in points275 265 for(i = 1; i < inPoints; i++) { 276 266 height = max > 0.0 … … 284 274 [path closePath]; 285 275 286 // --- draw in287 276 [_canvas lockFocus]; 288 277 [_inColor set]; … … 295 284 } 296 285 297 // --- draw image298 286 [_canvas compositeToPoint:rect.origin operation:NSCompositeSourceOver]; 299 287 } WiredAdditions/trunk/WIImageViewWithImagePicker.m
r4837 r5002 205 205 206 206 - (id)initWithCoder:(NSCoder *)coder { 207 if((self = [super initWithCoder:coder])) 208 [self _initImageViewWithImagePicker]; 207 self = [super initWithCoder:coder]; 208 209 [self _initImageViewWithImagePicker]; 209 210 210 211 return self; … … 214 215 215 216 - (id)initWithFrame:(NSRect)frame { 216 if((self = [super initWithFrame:frame])) 217 [self _initImageViewWithImagePicker]; 217 self = [super initWithFrame:frame]; 218 219 [self _initImageViewWithImagePicker]; 218 220 219 221 return self; WiredAdditions/trunk/WIProgressIndicator.h
r4438 r5002 31 31 } 32 32 33 34 33 - (void)setTag:(NSInteger)tag; 35 34 - (NSInteger)tag; WiredAdditions/trunk/WIReadWriteLock.h
r4438 r5002 42 42 } 43 43 44 45 44 - (BOOL)tryLockForReading; 46 45 - (BOOL)tryLockForWriting; WiredAdditions/trunk/WISearchField.m
r4438 r5002 93 93 94 94 - (id)initWithFrame:(NSRect)frame { 95 if((self = [super initWithFrame:frame])) 96 [self _initSearchField]; 95 self = [super initWithFrame:frame]; 96 97 [self _initSearchField]; 97 98 98 99 return self; … … 102 103 103 104 - (id)initWithCoder:(NSCoder *)coder { 104 if((self = [super initWithCoder:coder])) 105 [self _initSearchField]; 105 self = [super initWithCoder:coder]; 106 107 [self _initSearchField]; 106 108 107 109 return self; WiredAdditions/trunk/WISplitView.h
r4438 r5002 31 31 } 32 32 33 34 33 - (void)setAutosaveName:(NSString *)value; 35 34 - (NSString *)autosaveName; WiredAdditions/trunk/WISplitView.m
r4438 r5002 38 38 39 39 @end 40 41 40 42 41 … … 84 83 85 84 - (id)initWithFrame:(NSRect)rect { 86 if((self = [super initWithFrame:rect])) 87 [self _initSplitView]; 85 self = [super initWithFrame:rect]; 86 87 [self _initSplitView]; 88 88 89 89 return self; … … 93 93 94 94 - (id)initWithCoder:(NSCoder *)coder { 95 if((self = [super initWithCoder:coder])) 96 [self _initSplitView]; 95 self = [super initWithCoder:coder]; 96 97 [self _initSplitView]; 97 98 98 99 return self; WiredAdditions/trunk/WITextView.h
r4438 r5002 33 33 } 34 34 35 36 35 - (void)setString:(NSString *)string withFilter:(WITextFilter *)filter; 37 36 - (void)appendString:(NSString *)string withFilter:(WITextFilter *)filter; WiredAdditions/trunk/WIWindowController.m
r4956 r5002 185 185 186 186 - (id)initWithWindow:(NSWindow *)window { 187 if((self = [super initWithWindow:window])) 188 [self _initWindowController]; 189 190 return self; 191 } 192 193 194 195 - (id)initWithWindowNibName:(NSString *)windowNibName { 196 if((self = [super initWithWindowNibName:windowNibName])) 197 [self _initWindowController]; 198 187 self = [super initWithWindow:window]; 188 189 [self _initWindowController]; 190 199 191 return self; 200 192 }
