[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
..., some improvements for NS{Open,Save}Panel, ...
From: |
Wolfgang Lux |
Subject: |
..., some improvements for NS{Open,Save}Panel, ... |
Date: |
Tue, 28 Oct 2008 23:57:43 +0100 |
This patch improves the handling of the default directory used
by GNUstep's open and save panels and fixes a few issues with
the panels. The NSDefaultOpenDirectory user default used by both
panels is now managed by the save panel alone. In addition, it
is now updated whenever the panel is left (with either the Ok or
the Cancel button), which means that the default will correctly
be taken into account if multiple open or save panels exist
(which will become possible when GNUstep finally supports window
modal dialogs like OS X).
The patch also fixes the following minor issues:
1. NSDocumentController's currentDirectory method did return the
user's home directory if the current document's file name method
returns nil, rather than asking the shared open panel as it does
when there is no current document. With the patch the open panel
is now always checked before resorting to the user's home
directory.
2. The key view loop of the open and save panels did not include
the buttons at the bottom of the panel except for the Ok button
due to IMHO unwarranted calls to setRefusesFirstResponder:. I've
also added an escape key equivalent for the Cancel button.
3. The file name passed to runModalForDirectory:file: and related
methods is ignored upon the second and later invocations of the
save panel. This happens because the text editing operation
performed by the panel's text field editor is not ended when the
panel is dismissed. The patch fixes this by calling abortEditing
in _setupForDirectory:, but I consider this a hack. The editing
operation should be stopped automatically when the panel is closed
after clicking the Ok or Cancel button. However, I was too lazy to
track down why this doesn't happen at present.
Wolfgang
open.patch
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ..., some improvements for NS{Open,Save}Panel, ...,
Wolfgang Lux <=