Revision: 5417
http://skim-app.svn.sourceforge.net/skim-app/?rev=5417&view=rev
Author: hofman
Date: 2009-06-12 18:03:17 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
don't open new empty window from setup bookmark when a document was already open
Modified Paths:
--------------
trunk/SKDocumentController.m
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2009-06-11 14:26:02 UTC (rev 5416)
+++ trunk/SKDocumentController.m 2009-06-12 18:03:17 UTC (rev 5417)
@@ -345,7 +345,10 @@
if(fileURL == nil && [setup objectForKey:SKDocumentSetupFileNameKey])
fileURL = [NSURL fileURLWithPath:[setup
objectForKey:SKDocumentSetupFileNameKey]];
if(fileURL && NO == SKFileIsInTrash(fileURL)) {
- if (document = [[NSDocumentController sharedDocumentController]
openDocumentWithContentsOfURL:fileURL display:NO error:&error]) {
+ if (document = [self documentForURL:fileURL]) {
+ // the document was already open, don't call makeWindowControllers
because that adds new empty windows
+ // perhaps we should somehow apply the settings anyway?
+ } else if (document = [self openDocumentWithContentsOfURL:fileURL
display:NO error:&error]) {
[document makeWindowControllers];
[document setInitialSetup:setup];
[document showWindows];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit