Reapply desktop differences.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-09-22 19:32:23 -07:00
1 parent e305d30c1b
commit f109313d32
4 files changed
+89 -44

No files matched your search

+17 -2
View File
@@ -24,6 +24,7 @@
@import <Foundation/CPBundle.j>
@import "CPDocument.j"
@import "CPOpenPanel.j";
var CPSharedDocumentController = nil;
@@ -138,11 +139,11 @@ var CPSharedDocumentController = nil;
- (CPDocument)openDocumentWithContentsOfURL:(CPURL)anAbsoluteURL display:(BOOL)shouldDisplay error:(CPError)anError
{
var result = [self documentForURL:anAbsoluteURL];
if (!result)
{
var type = [self typeForContentsOfURL:anAbsoluteURL error:anError];
result = [self makeDocumentWithContentsOfURL:anAbsoluteURL ofType:type delegate:self didReadSelector:@selector(document:didRead:contextInfo:) contextInfo:[CPDictionary dictionaryWithObject:shouldDisplay forKey:@"shouldDisplay"]];
}
else if (shouldDisplay)
@@ -219,6 +220,20 @@ var CPSharedDocumentController = nil;
[self openUntitledDocumentOfType:[[_documentTypes objectAtIndex:0] objectForKey:@"CPBundleTypeName"] display:YES];
}
-(void)openDocument:(id)aSender
{
var openPanel = [CPOpenPanel openPanel];
[openPanel runModalForTypes:nil];//[@"nib", @"xib", @"cib"]];
var filenames = [openPanel filenames],
index = 0,
count = [filenames count];
for (; index < count; ++index)
[self openDocumentWithContentsOfURL:[CPURL URLWithString:filenames[index]] display:YES error:nil];
}
// Managing Documents
/*!