Revision: 6552
http://skim-app.svn.sourceforge.net/skim-app/?rev=6552&view=rev
Author: hofman
Date: 2010-05-20 17:35:23 +0000 (Thu, 20 May 2010)
Log Message:
-----------
window frame from bookmark is set before the window is loaded, so we need to
remember it
Modified Paths:
--------------
trunk/SKNotesDocument.h
trunk/SKNotesDocument.m
Modified: trunk/SKNotesDocument.h
===================================================================
--- trunk/SKNotesDocument.h 2010-05-20 11:46:43 UTC (rev 6551)
+++ trunk/SKNotesDocument.h 2010-05-20 17:35:23 UTC (rev 6552)
@@ -53,6 +53,7 @@
PDFDocument *pdfDocument;
SKFloatMapTable *rowHeights;
SKNoteTypeSheetController *noteTypeSheetController;
+ NSRect windowRect;
BOOL exportUsingPanel;
BOOL caseInsensitiveSearch;
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2010-05-20 11:46:43 UTC (rev 6551)
+++ trunk/SKNotesDocument.m 2010-05-20 17:35:23 UTC (rev 6552)
@@ -94,6 +94,7 @@
notes = [[NSArray alloc] init];
pdfDocument = nil;
rowHeights = [[SKFloatMapTable alloc] init];
+ windowRect = NSZeroRect;
caseInsensitiveSearch = YES;
}
return self;
@@ -135,6 +136,9 @@
if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKShowNotesStatusBarKey])
[self toggleStatusBar:nil];
+ if (NSEqualRects(windowRect, NSZeroRect) == NO)
+ [[aController window] setFrame:windowRect display:NO];
+
NSMenu *menu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init]
autorelease];
[menu addItemWithTitle:NSLocalizedString(@"Ignore Case", @"Menu item
title") action:@selector(toggleCaseInsensitiveSearch:) target:self];
[[searchField cell] setSearchMenuTemplate:menu];
@@ -331,10 +335,15 @@
}
- (void)applySetup:(NSDictionary *)setup {
- NSWindow *window = [[[self windowControllers] lastObject] window];
NSString *rectString = [setup objectForKey:SKWindowFrameKey];
- if (rectString && window)
- [window setFrame:NSRectFromString(rectString) display:YES];
+ if (rectString) {
+ NSWindowController *wc = [[self windowControllers] lastObject];
+ if ([wc isWindowLoaded] == NO) {
+ windowRect = NSRectFromString(rectString);
+ } else {
+ [[wc window] setFrame:NSRectFromString(rectString) display:YES];
+ }
+ }
}
#pragma mark Printing
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit