mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-05 02:10:58 +00:00
Set save panel accessory view before calling -prepareSavePanel: to
allow clients to modify the accessory view. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35791 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f9f1d089e4
commit
093db37415
2 changed files with 18 additions and 8 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2012-11-12 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSDocument.m (-_runSavePanelForSaveOperation:): Set save
|
||||||
|
panel accessory view before calling -prepareSavePanel: to allow
|
||||||
|
clients to modify the accessory view. Furthermore, don't call
|
||||||
|
-prepareSavePanel: if -runModalSavePanel:withAccessoryView: is
|
||||||
|
overridden.
|
||||||
|
|
||||||
2012-11-05 Fred Kiefer <FredKiefer@gmx.de>
|
2012-11-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSApplication.m (-_openFiles): Protect agains empty arguments.
|
* Source/NSApplication.m (-_openFiles): Protect agains empty arguments.
|
||||||
|
|
|
@ -1146,7 +1146,6 @@ originalContentsURL: (NSURL *)orig
|
||||||
|
|
||||||
- (NSSavePanel *)_runSavePanelForSaveOperation: (NSSaveOperationType)saveOperation
|
- (NSSavePanel *)_runSavePanelForSaveOperation: (NSSaveOperationType)saveOperation
|
||||||
{
|
{
|
||||||
NSView *accessory = nil;
|
|
||||||
NSString *title;
|
NSString *title;
|
||||||
NSString *directory;
|
NSString *directory;
|
||||||
NSArray *types;
|
NSArray *types;
|
||||||
|
@ -1164,7 +1163,7 @@ originalContentsURL: (NSURL *)orig
|
||||||
|
|
||||||
[self _addItemsToSpaButtonFromArray: types];
|
[self _addItemsToSpaButtonFromArray: types];
|
||||||
|
|
||||||
accessory = _save_panel_accessory;
|
[savePanel setAccessoryView: _save_panel_accessory];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([types count] > 0)
|
if ([types count] > 0)
|
||||||
|
@ -1192,13 +1191,16 @@ originalContentsURL: (NSURL *)orig
|
||||||
else
|
else
|
||||||
directory = [controller currentDirectory];
|
directory = [controller currentDirectory];
|
||||||
[savePanel setDirectory: directory];
|
[savePanel setDirectory: directory];
|
||||||
|
|
||||||
if (![self prepareSavePanel: savePanel])
|
|
||||||
{
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ([self runModalSavePanel: savePanel withAccessoryView: accessory])
|
if (!OVERRIDDEN(runModalSavePanel:withAccessoryView:))
|
||||||
|
{
|
||||||
|
if (![self prepareSavePanel: savePanel])
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ([self runModalSavePanel: savePanel
|
||||||
|
withAccessoryView: [savePanel accessoryView]])
|
||||||
{
|
{
|
||||||
return savePanel;
|
return savePanel;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue