Ensure that new windows properly show their document edited status.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27292 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2008-12-14 19:15:18 +00:00
parent 91f3b7674b
commit 606df8c1b1
4 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-12-14 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocument.m (-addWindowController:,-removeWindowController:):
* Source/NSWindowController.m (-setDocumentEdited):
* Source/NSWindow.m (-_startBackendWindow):
Ensure that new windows properly show their document edited status.
2008-12-14 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocumentFrameworkPrivate.h:

View file

@ -315,6 +315,7 @@ withContentsOfURL: (NSURL *)url
if ([windowController document] != self)
{
[windowController setDocument: self];
[windowController setDocumentEdited: [self isDocumentEdited]];
}
}
@ -322,6 +323,7 @@ withContentsOfURL: (NSURL *)url
{
if ([_window_controllers containsObject: windowController])
{
[windowController setDocumentEdited: NO];
[windowController setDocument: nil];
[_window_controllers removeObject: windowController];
}

View file

@ -839,6 +839,7 @@ many times.
frame.origin = NSZeroPoint;
[_wv setFrame: frame];
[_wv setWindowNumber: _windowNum];
[_wv setDocumentEdited: _f.is_edited];
[_wv setNeedsDisplay: YES];
}
}

View file

@ -207,7 +207,7 @@
- (void) setDocumentEdited: (BOOL)flag
{
[_window setDocumentEdited: flag];
[[self window] setDocumentEdited: flag];
}
- (void) setWindowFrameAutosaveName:(NSString *)name