mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Check whether there is a returned save panel, this wont be the case
when the user cancels the save operation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28321 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a8ecb0c14a
commit
053c28aa92
2 changed files with 25 additions and 21 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-06-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSDocument.m (-runModalSavePanelForSaveOperation:...):
|
||||
Check whether there is a returned save panel, this wont be the case
|
||||
when the user cancels the save operation.
|
||||
|
||||
2009-05-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSApplication.m (detachDrawingThread:toTarget:withObject:):
|
||||
|
|
|
@ -1171,29 +1171,27 @@ originalContentsURL: (NSURL *)orig
|
|||
contextInfo: (void *)contextInfo
|
||||
{
|
||||
// FIXME: Commit registered editors
|
||||
NSSavePanel *savePanel = [self _runSavePanelForSaveOperation: saveOperation];
|
||||
|
||||
if (OVERRIDDEN(saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:))
|
||||
if (savePanel)
|
||||
{
|
||||
NSString *fileName;
|
||||
|
||||
fileName = [self fileNameFromRunningSavePanelForSaveOperation: saveOperation];
|
||||
[self saveToFile: fileName
|
||||
saveOperation: saveOperation
|
||||
delegate: delegate
|
||||
didSaveSelector: didSaveSelector
|
||||
contextInfo: contextInfo];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSSavePanel *savePanel = [self _runSavePanelForSaveOperation: saveOperation];
|
||||
NSURL *url = [savePanel URL];
|
||||
|
||||
[self saveToURL: url
|
||||
ofType: [self fileTypeFromLastRunSavePanel]
|
||||
forSaveOperation: saveOperation
|
||||
delegate: delegate
|
||||
didSaveSelector: didSaveSelector
|
||||
contextInfo: contextInfo];
|
||||
if (OVERRIDDEN(saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:))
|
||||
{
|
||||
[self saveToFile: [savePanel filename]
|
||||
saveOperation: saveOperation
|
||||
delegate: delegate
|
||||
didSaveSelector: didSaveSelector
|
||||
contextInfo: contextInfo];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self saveToURL: [savePanel URL]
|
||||
ofType: [self fileTypeFromLastRunSavePanel]
|
||||
forSaveOperation: saveOperation
|
||||
delegate: delegate
|
||||
didSaveSelector: didSaveSelector
|
||||
contextInfo: contextInfo];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue