Avoid loading a window controller's nib prematurely if the document

edited status is changed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30500 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-05-30 22:55:39 +00:00
parent 6b7116a19a
commit d31f3c26d7
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2010-05-31 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSWindowController.m (-setDocumentEdited:, -setWindow:):
Avoid loading the controller's nib prematurely if the document
edited status is changed.
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSFont.m (-initWithCoder:): Fixed keyed decoding to fall

View file

@ -208,7 +208,8 @@
- (void) setDocumentEdited: (BOOL)flag
{
[[self window] setDocumentEdited: flag];
if ([self isWindowLoaded])
[[self window] setDocumentEdited: flag];
}
- (void) setWindowFrameAutosaveName:(NSString *)name
@ -368,6 +369,7 @@
else
{
[_window setReleasedWhenClosed: YES];
[_window setDocumentEdited: [_document isDocumentEdited]];
}
}
@ -402,7 +404,7 @@
NSString *title = [self windowTitleForDocumentDisplayName: displayName];
/* If they just want to display the filename, use the fancy method */
/* NB For compatibility with Mac OS X, a document display name is equal
/* NB For compatibility with Mac OS X, a document's display name is equal
to its last path component, so we check for that here too */
if (filename != nil &&
([title isEqualToString: filename] ||