mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 09:28:02 +00:00
Merge branch 'master' of github.com:cappuccino/cappuccino
This commit is contained in:
commit
e37bfeeb09
7 files changed
+65
-43
No files matched your search
@@ -27,15 +27,31 @@
|
||||
{
|
||||
BOOL _mouseDownPressed @accessors(getter=isMouseDownPressed, setter=setMouseDownPressed:);
|
||||
unsigned _gravity @accessors(property=gravity);
|
||||
|
||||
CPColor _backgroundColor;
|
||||
CPColor _strokeColor;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
|
||||
+ (CPString)defaultThemeClass
|
||||
{
|
||||
return @"tooltip";
|
||||
}
|
||||
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[[CPColor colorWithHexString:@"E3E3E3"],
|
||||
[CPColor colorWithHexString:@"FFFFCA"],
|
||||
2.0,
|
||||
1.0,
|
||||
[CPColor blackColor]]
|
||||
forKeys:[@"stroke-color",
|
||||
@"background-color",
|
||||
@"border-radius",
|
||||
@"stroke-width",
|
||||
@"color"]];
|
||||
}
|
||||
|
||||
/*! compute the contentView frame from a given window frame
|
||||
@param aFrameRect the window frame
|
||||
*/
|
||||
@@ -67,21 +83,6 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Initialization
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
if (self = [super initWithFrame:aFrame styleMask:aStyleMask])
|
||||
{
|
||||
_strokeColor = [CPColor colorWithHexString:@"E3E3E3"];
|
||||
_backgroundColor = [CPColor colorWithHexString:@"FFFFCA"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark drawing
|
||||
|
||||
@@ -90,11 +91,13 @@
|
||||
[super drawRect:aRect];
|
||||
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
radius = 2,
|
||||
strokeWidth = 1;
|
||||
radius = [self currentValueForThemeAttribute:@"border-radius"],
|
||||
strokeWidth = [self currentValueForThemeAttribute:@"stroke-width"],
|
||||
strokeColor = [self currentValueForThemeAttribute:@"stroke-color"],
|
||||
bgColor = [self currentValueForThemeAttribute:@"background-color"];
|
||||
|
||||
CGContextSetStrokeColor(context, _strokeColor);
|
||||
CGContextSetFillColor(context, _backgroundColor);
|
||||
CGContextSetStrokeColor(context, strokeColor);
|
||||
CGContextSetFillColor(context, bgColor);
|
||||
CGContextSetLineWidth(context, strokeWidth);
|
||||
CGContextBeginPath(context);
|
||||
|
||||
|
||||
@@ -1766,6 +1766,24 @@ var themedButtonValues = nil,
|
||||
return ruleEditor;
|
||||
}
|
||||
|
||||
+ (_CPToolTipWindowView)themedTooltip
|
||||
{
|
||||
var toolTipView = [[_CPToolTipWindowView alloc] initWithFrame:CPRectMakeZero() styleMask:_CPToolTipWindowMask],
|
||||
|
||||
themeValues =
|
||||
[
|
||||
[@"stroke-color", [CPColor colorWithHexString:@"E3E3E3"]],
|
||||
[@"stroke-width", 1.0],
|
||||
[@"border-radius", 2.0],
|
||||
[@"background-color", [CPColor colorWithHexString:@"FFFFCA"]],
|
||||
[@"color", [CPColor blackColor]]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themeValues forView:toolTipView];
|
||||
|
||||
return toolTipView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation AristoHUDThemeDescriptor : BKThemeDescriptor
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ var _CPToolTipHeight = 24.0,
|
||||
[_content setFrameOrigin:CPPointMake(0.0, 0.0)];
|
||||
[_content setFrameSize:textFrameSize];
|
||||
[_content setTextShadowOffset:CGSizeMake(0.0, 1.0)];
|
||||
[_content setTextColor:[CPColor blackColor]];
|
||||
[_content setTextColor:[[[CPTheme defaultTheme] attributeWithName:@"color" forClass:_CPToolTipWindowView] value]];
|
||||
|
||||
[[self contentView] addSubview:_content];
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#import "PRHEmptyGrowlDelegate.h"
|
||||
#import "TNXCodeCapp.h"
|
||||
|
||||
@interface AppController : NSObject <NSMenuDelegate>
|
||||
@interface AppController : NSObject <NSMenuDelegate, NSTableViewDataSource, NSTableViewDelegate>
|
||||
{
|
||||
IBOutlet NSMenu *statusMenu;
|
||||
IBOutlet NSMenuItem *menuItemOpenXCode;
|
||||
@@ -66,10 +66,5 @@
|
||||
- (IBAction)openAbout:(id)aSender;
|
||||
- (IBAction)updatePreferences:(id)aSender;
|
||||
|
||||
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(int)aRow;
|
||||
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
|
||||
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -360,7 +360,7 @@ AppController *SharedAppControllerInstance = nil;
|
||||
[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [[xcc errorList] count])]];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(int)aRow
|
||||
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)aRow
|
||||
{
|
||||
// Get column you want - first in this case:
|
||||
NSTableColumn *tabCol = [[tableView tableColumns] objectAtIndex:0];
|
||||
|
||||
@@ -44,13 +44,6 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
if (useFileBasedListening)
|
||||
{
|
||||
if (flags & kFSEventStreamEventFlagItemIsFile &&
|
||||
flags & kFSEventStreamEventFlagItemRemoved)
|
||||
{
|
||||
[xcc tidyShadowedFiles];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(flags & kFSEventStreamEventFlagItemIsFile) ||
|
||||
[xcc isPathMatchingIgnoredPaths:path] ||
|
||||
(![xcc isXIBFile:path] && ![xcc isObjJFile:path] && ![xcc isXCCIgnoreFile:path]))
|
||||
@@ -58,19 +51,29 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
|
||||
continue;
|
||||
}
|
||||
|
||||
else if (flags & kFSEventStreamEventFlagItemRemoved)
|
||||
if (flags & kFSEventStreamEventFlagItemIsFile &&
|
||||
flags & kFSEventStreamEventFlagItemRemoved)
|
||||
{
|
||||
if ([xcc isObjJFile:path])
|
||||
{
|
||||
[xcc tidyShadowedFiles];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & kFSEventStreamEventFlagItemRemoved)
|
||||
{
|
||||
DLog(@"event type: kFSEventStreamEventFlagItemRemoved for path %@", path);
|
||||
[xcc handleFileRemoval:path];
|
||||
}
|
||||
|
||||
else if (flags & kFSEventStreamEventFlagItemCreated ||
|
||||
if (flags & kFSEventStreamEventFlagItemCreated ||
|
||||
flags & kFSEventStreamEventFlagItemModified)
|
||||
{
|
||||
DLog(@"event type: kFSEventStreamEventFlagItemCreated or kFSEventStreamEventFlagItemModified for path %@", path);
|
||||
[xcc handleFileModification:path notify:YES];
|
||||
}
|
||||
|
||||
|
||||
else if ([xcc reactToInodeModification] &&
|
||||
(flags & kFSEventStreamEventFlagItemFinderInfoMod ||
|
||||
flags & kFSEventStreamEventFlagItemXattrMod ||
|
||||
@@ -79,14 +82,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
|
||||
DLog(@"event type: %@ for path %@", flags, path);
|
||||
[xcc handleFileModification:path notify:YES];
|
||||
}
|
||||
|
||||
|
||||
else if ([xcc reactToInodeModification] &&
|
||||
flags & kFSEventStreamEventFlagItemInodeMetaMod)
|
||||
{
|
||||
DLog(@"event type: kFSEventStreamEventFlagItemInodeMetaMod for path %@", path);
|
||||
[xcc handleFileModification:path notify:YES];
|
||||
}
|
||||
|
||||
|
||||
else if (flags & kFSEventStreamEventFlagItemRenamed)
|
||||
{
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:path])
|
||||
|
||||
@@ -470,7 +470,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
|
||||
BOOL isDir = NO;
|
||||
[fm fileExistsAtPath:filePath isDirectory:&isDir];
|
||||
|
||||
if (isDir || (![self isXIBFile:filePath] && ![self isObjJFile:filePath]))
|
||||
if (isDir || ![self isObjJFile:filePath] || [self isPathMatchingIgnoredPaths:filePath])
|
||||
continue;
|
||||
|
||||
NSURL *eventualShadow = [self shadowURLForSourceURL:[NSURL fileURLWithPath:filePath]];
|
||||
@@ -579,6 +579,9 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
|
||||
*/
|
||||
- (BOOL)isPathMatchingIgnoredPaths:(NSString*)aPath
|
||||
{
|
||||
if ([ignoredFilePaths count] == 0)
|
||||
return NO;
|
||||
|
||||
for (NSString *ignoredPath in ignoredFilePaths)
|
||||
{
|
||||
if ([ignoredPath length] == 0)
|
||||
|
||||
Reference in new issue
Block a user