Skip to content

Commit

Permalink
Merge pull request bitstadium#5 from ksuther/public
Browse files Browse the repository at this point in the history
Optional argument to automatically submit and terminate when launching.
  • Loading branch information
ashtom committed Sep 8, 2011
2 parents c3b836b + 3b4266d commit 2ba28b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/CNSApp.m
Expand Up @@ -73,6 +73,10 @@ - (void)windowControllerDidLoadNib:(NSWindowController *)aController {
self.bundleVersionLabel.stringValue = (self.bundleVersion ?: @"invalid");
self.statusLabel.stringValue = @"";
[self.window setTitle:[self.fileURL lastPathComponent]];

if ([[[NSProcessInfo processInfo] arguments] containsObject:@"autoSubmit"]) {
[self uploadButtonWasClicked:nil];
}
}

#pragma mark - NSDocument Methods
Expand Down Expand Up @@ -273,6 +277,10 @@ - (void)parseVersionResponse:(CNSConnectionHelper *)aConnectionHelper {
[NSApp endSheet:self.uploadSheet];
[self.window performClose:self];
[self close];

if ([[[NSProcessInfo processInfo] arguments] containsObject:@"autoSubmit"]) {
[NSApp terminate:nil];
}
});
}

Expand Down

0 comments on commit 2ba28b1

Please sign in to comment.