Merge branch 'Aristo2' of github.mv.usa.alcatel.com:amercada/Cappuccino into Aristo2

This commit is contained in:
Alexandre Wilhelm
2013-01-09 10:35:02 -08:00
5 changed files with 38 additions and 22 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ var _CPToolTipHeight = 24.0,
- (void)showToolTip
{
var mousePosition = [[CPApp currentEvent] globalLocation],
nativeRect = [[[CPApp mainWindow] platformWindow] nativeContentRect];
nativeRect = [[CPPlatformWindow primaryPlatformWindow] nativeContentRect];
mousePosition.y += 20;
+1 -1
View File
@@ -40,6 +40,7 @@ extern NSString * const XCCListeningStartNotification;
NSString *XCodeSupportProjectName;
NSString *XCodeTemplatePBXPath;
NSString *profilePath;
NSString *shellPath;
NSString *PBXModifierScriptPath;
NSURL *currentProjectURL;
NSURL *XCodeSupportProject;
@@ -99,4 +100,3 @@ extern NSString * const XCCListeningStartNotification;
- (NSDate*)lastModificationDateForPath:(NSString *)path;
@end
+35 -12
View File
@@ -73,21 +73,44 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
[self configure];
if([fm fileExistsAtPath:[@"~/.bash_profile" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.bash_profile" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.profile" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.profile" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.bashrc" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.bashrc" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.zshrc" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.zshrc" stringByExpandingTildeInPath];
NSString* myShell = [[[NSProcessInfo processInfo] environment] objectForKey:@"SHELL"];
if (myShell)
{
shellPath = myShell;
}
else
{
NSAlert *alert = [NSAlert alertWithMessageText:@"Cannot find any valid profile file."
shellPath = @"/bin/bash";
}
if([shellPath isEqualToString:@"/bin/bash"])
{
if([fm fileExistsAtPath:[@"~/.bash_profile" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.bash_profile" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.bashrc" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.bashrc" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.profile" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.profile" stringByExpandingTildeInPath];
else
profilePath = @"";
}
else if ([shellPath isEqualToString:@"/bin/zsh"])
{
if([fm fileExistsAtPath:[@"~/.zshrc" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.zshrc" stringByExpandingTildeInPath];
else if([fm fileExistsAtPath:[@"~/.profile" stringByExpandingTildeInPath]])
profilePath = [@"source ~/.profile" stringByExpandingTildeInPath];
else
profilePath = @"";
}
else
{
NSAlert *alert = [NSAlert alertWithMessageText:@"Shell not recognized."
defaultButton:@"OK"
alternateButton:nil
otherButton:nil
informativeTextWithFormat:@"Neither ~/.bash_profile, ~/.profile, ~/.bashrc nor ~/.zshrc can be found.\n\nWithout this XcodeCapp cannot locate nib2cib.\n\nIf you notice any errors or strange behaviour, please look at the system log for messages and open a ticket."];
informativeTextWithFormat:@"You are running %@ as your shell, which is not supported. Please change your shell to either BASH or ZSH.", shellPath];
[alert runModal];
profilePath = @"";
}
@@ -415,8 +438,8 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification
NSNumber *status;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/bin/bash"];
[task setLaunchPath:shellPath];
[task setArguments: arguments];
[task setStandardOutput:[NSPipe pipe]];
[task launch];
+1 -1
View File
@@ -119,7 +119,7 @@ function main(args)
"\n@end\n";
ObjectiveCSource +=
"#import \"" + outputHeaderURL.absoluteString().replace(/\\/g,'/').replace( /.*\//, '' ) + "\"" +
"#import \"" + outputHeaderURL.absoluteString().replace(/\\/g,'/').replace(/(.*\/)/g, '') + "\"" +
"\n@implementation " + class_getName(aClass) +
"\n@end\n";
});
-7
View File
@@ -38,13 +38,6 @@
[self setMaximumRecents:[cell maximumRecents]];
[self setSendsWholeSearchString:[cell sendsWholeSearchString]];
[self setSendsSearchStringImmediately:[cell sendsSearchStringImmediately]];
if ([self isBezeled])
{
// NSTextField.j makes the field +7.0 pixels tall. We want +8.0 to go to 30.
var frame = [self frame];
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height + 1.0)];
}
}
return self;