* Source/NSDocument.m: Correction for bug#24758, add name and

type information to the object before reading the file so that
	it is available during the readFile:ofType: method call.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2008-11-08 15:17:49 +00:00
parent 2e69a1d04a
commit a91c8ec537
2 changed files with 13 additions and 12 deletions

View file

@ -1,3 +1,9 @@
2008-11-08 10:09-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocument.m: Correction for bug#24758, add name and
type information to the object before reading the file so that
it is available during the readFile:ofType: method call.
2008-11-06 Fred Kiefer <FredKiefer@gmx.de> 2008-11-06 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBitmapImageRep.m (-_convertToFormatBitsPerSample:...): * Source/NSBitmapImageRep.m (-_convertToFormatBitsPerSample:...):
@ -32,6 +38,7 @@
* Source/NSPopUpButton.m (-keyDown): Trigger action only after * Source/NSPopUpButton.m (-keyDown): Trigger action only after
pressing the Space key. pressing the Space key.
>>>>>>> .r27016
2008-11-01 21:35-EDT Gregory John Casamento <greg_casamento@yahoo.com> 2008-11-01 21:35-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSWindow.m: Reverted a previous change to miniaturize. * Source/NSWindow.m: Reverted a previous change to miniaturize.

View file

@ -96,12 +96,9 @@
self = [self init]; self = [self init];
if (self != nil) if (self != nil)
{ {
if ([self readFromFile: fileName ofType: fileType]) [self setFileType: fileType];
{ [self setFileName: fileName];
[self setFileType: fileType]; if (![self readFromFile: fileName ofType: fileType])
[self setFileName: fileName];
}
else
{ {
NSRunAlertPanel (_(@"Load failed"), NSRunAlertPanel (_(@"Load failed"),
_(@"Could not load file %@."), _(@"Could not load file %@."),
@ -122,12 +119,9 @@
self = [self init]; self = [self init];
if (self != nil) if (self != nil)
{ {
if ([self readFromURL: url ofType: fileType]) [self setFileType: fileType];
{ [self setFileName: [url path]];
[self setFileType: fileType]; if (![self readFromURL: url ofType: fileType])
[self setFileName: [url path]];
}
else
{ {
NSRunAlertPanel(_(@"Load failed"), NSRunAlertPanel(_(@"Load failed"),
_(@"Could not load URL %@."), _(@"Could not load URL %@."),