2001-12-17 16:51:51 +00:00
|
|
|
/** <title>NSOpenPanel</title> -*-objc-*-
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2002-10-12 03:14:22 +00:00
|
|
|
<abstract>Standard panel for opening files</abstract>
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2001-12-17 16:51:51 +00:00
|
|
|
Author: Scott Christley <scottc@net-community.com>
|
1996-05-30 20:03:15 +00:00
|
|
|
Date: 1996
|
1999-10-30 02:10:37 +00:00
|
|
|
|
2010-01-02 17:09:11 +00:00
|
|
|
Author: Daniel Boehringer <boehring@biomed.ruhr-uni-bochum.de>
|
1998-08-19 09:00:26 +00:00
|
|
|
Date: August 1998
|
1999-10-30 02:10:37 +00:00
|
|
|
|
2010-01-02 17:09:11 +00:00
|
|
|
Source by Daniel Boehringer integrated into Scott Christley's preliminary
|
1999-04-23 16:15:11 +00:00
|
|
|
implementation by Felipe A. Rodriguez <far@ix.netcom.com>
|
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
Author: Nicola Pero <n.pero@mi.flashnet.it>
|
|
|
|
Date: October 1999 Completely Rewritten.
|
|
|
|
|
2001-12-17 16:51:51 +00:00
|
|
|
Author: Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
Date: September 2000
|
|
|
|
|
1996-05-30 20:03:15 +00:00
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1996-05-30 20:03:15 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
1999-04-23 16:15:11 +00:00
|
|
|
|
1996-05-30 20:03:15 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1996-10-18 17:14:13 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
1999-04-23 16:15:11 +00:00
|
|
|
*/
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2010-01-02 17:09:11 +00:00
|
|
|
#import <Foundation/NSArray.h>
|
|
|
|
#import <Foundation/NSException.h>
|
|
|
|
#import <Foundation/NSFileManager.h>
|
|
|
|
#import <Foundation/NSNotification.h>
|
|
|
|
#import <Foundation/NSString.h>
|
|
|
|
#import <Foundation/NSURL.h>
|
|
|
|
#import "AppKit/NSApplication.h"
|
|
|
|
#import "AppKit/NSBrowser.h"
|
|
|
|
#import "AppKit/NSBrowserCell.h"
|
|
|
|
#import "AppKit/NSButton.h"
|
|
|
|
#import "AppKit/NSForm.h"
|
|
|
|
#import "AppKit/NSMatrix.h"
|
|
|
|
#import "AppKit/NSOpenPanel.h"
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2011-03-04 11:33:22 +00:00
|
|
|
#import "GSGuiPrivate.h"
|
|
|
|
#import "GNUstepGUI/GSTheme.h"
|
2010-01-03 04:41:36 +00:00
|
|
|
|
2008-05-13 15:04:01 +00:00
|
|
|
static NSString *
|
|
|
|
pathToColumn(NSBrowser *browser, int column)
|
|
|
|
{
|
|
|
|
#if defined(__MINGW32__)
|
|
|
|
if (column == 0)
|
|
|
|
return @"/";
|
2008-05-14 08:59:55 +00:00
|
|
|
else if (column == 1)
|
|
|
|
return [[[browser pathToColumn: column] substringFromIndex: 1]
|
|
|
|
stringByAppendingString: @"/"];
|
2008-05-13 15:04:01 +00:00
|
|
|
else
|
|
|
|
return [[browser pathToColumn: column] substringFromIndex: 1];
|
|
|
|
#else
|
|
|
|
return [browser pathToColumn: column];
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
1999-12-07 05:56:08 +00:00
|
|
|
static NSOpenPanel *_gs_gui_open_panel = nil;
|
1998-08-19 09:00:26 +00:00
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
// Pacify the compiler
|
2006-11-06 10:19:20 +00:00
|
|
|
@interface NSSavePanel (GSPrivateMethods)
|
1999-12-07 05:56:08 +00:00
|
|
|
- (void) _resetDefaults;
|
2008-12-06 14:11:46 +00:00
|
|
|
- (void) _updateDefaultDirectory;
|
2008-12-06 18:38:27 +00:00
|
|
|
- (void) _reloadBrowser;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
- (void) _selectCellName: (NSString *)title;
|
2001-09-17 12:10:10 +00:00
|
|
|
- (void) _selectTextInColumn: (int)column;
|
|
|
|
- (void) _setupForDirectory: (NSString *)path file: (NSString *)filename;
|
2008-12-06 19:05:38 +00:00
|
|
|
- (BOOL) _shouldShowExtension: (NSString *)extension;
|
2003-07-10 14:52:55 +00:00
|
|
|
- (NSComparisonResult) _compareFilename: (NSString *)n1 with: (NSString *)n2;
|
1999-10-30 02:10:37 +00:00
|
|
|
@end
|
|
|
|
|
2006-11-06 10:19:20 +00:00
|
|
|
@implementation NSOpenPanel (GSPrivateMethods)
|
1999-12-07 05:56:08 +00:00
|
|
|
- (void) _resetDefaults
|
1999-10-30 02:10:37 +00:00
|
|
|
{
|
1999-12-07 05:56:08 +00:00
|
|
|
[super _resetDefaults];
|
2010-01-02 17:09:11 +00:00
|
|
|
[self setTitle: _(@"Open")];
|
1999-12-07 05:56:08 +00:00
|
|
|
[self setCanChooseFiles: YES];
|
|
|
|
[self setCanChooseDirectories: YES];
|
|
|
|
[self setAllowsMultipleSelection: NO];
|
2009-12-15 23:56:51 +00:00
|
|
|
[_okButton setEnabled: NO];
|
1999-10-30 02:10:37 +00:00
|
|
|
}
|
2001-03-22 00:27:37 +00:00
|
|
|
|
|
|
|
- (BOOL) _shouldShowExtension: (NSString *)extension
|
1999-12-07 05:56:08 +00:00
|
|
|
{
|
2008-12-06 19:05:38 +00:00
|
|
|
if (_canChooseFiles == NO ||
|
2011-09-07 07:46:28 +00:00
|
|
|
(_allowedFileTypes != nil && [_allowedFileTypes containsObject: extension] == NO))
|
2008-12-06 19:05:38 +00:00
|
|
|
return NO;
|
|
|
|
|
|
|
|
return YES;
|
1999-12-07 05:56:08 +00:00
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
- (void) _selectTextInColumn: (int)column
|
|
|
|
{
|
|
|
|
NSMatrix *matrix;
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (column == -1)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
|
|
|
|
2012-01-10 18:42:04 +00:00
|
|
|
if (_delegateHasSelectionDidChange)
|
|
|
|
{
|
|
|
|
[_delegate panelSelectionDidChange: self];
|
|
|
|
}
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
matrix = [_browser matrixInColumn: column];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2012-01-10 18:42:04 +00:00
|
|
|
// Validate selection
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2012-01-10 18:42:04 +00:00
|
|
|
BOOL selectionValid = YES;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2012-01-10 18:42:04 +00:00
|
|
|
NSArray *selectedCells = [matrix selectedCells];
|
|
|
|
NSEnumerator *e = [selectedCells objectEnumerator];
|
|
|
|
id o;
|
|
|
|
while ((o = [e nextObject]) != nil)
|
|
|
|
{
|
|
|
|
if ((![o isLeaf] && !_canChooseDirectories) ||
|
|
|
|
([o isLeaf] && !_canChooseFiles))
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2012-01-10 18:42:04 +00:00
|
|
|
selectionValid = NO;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
}
|
|
|
|
}
|
2012-01-10 18:42:04 +00:00
|
|
|
[_okButton setEnabled: selectionValid];
|
|
|
|
|
|
|
|
// Set form label
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2012-01-10 18:42:04 +00:00
|
|
|
if ([selectedCells count] > 1)
|
2000-09-13 20:18:01 +00:00
|
|
|
{
|
2012-01-10 18:42:04 +00:00
|
|
|
[[_form cellAtIndex: 0] setStringValue: @""];
|
2000-09-13 20:18:01 +00:00
|
|
|
}
|
2012-01-10 18:42:04 +00:00
|
|
|
else
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2012-01-10 18:42:04 +00:00
|
|
|
[[_form cellAtIndex: 0] setStringValue: [[matrix selectedCell] stringValue]];
|
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
}
|
|
|
|
|
2001-09-17 12:10:10 +00:00
|
|
|
- (void) _setupForDirectory: (NSString *)path file: (NSString *)filename
|
|
|
|
{
|
2005-02-19 17:00:00 +00:00
|
|
|
// FIXME: Not sure if this is needed
|
|
|
|
if ((filename == nil) || ([filename isEqual: @""] == NO))
|
2001-09-17 12:10:10 +00:00
|
|
|
[_okButton setEnabled: YES];
|
|
|
|
|
|
|
|
if (_canChooseDirectories == NO)
|
|
|
|
{
|
2003-10-28 16:52:14 +00:00
|
|
|
if ([_browser allowsMultipleSelection] == YES)
|
|
|
|
[_browser setAllowsBranchSelection: NO];
|
2001-09-17 12:10:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[super _setupForDirectory: path file: filename];
|
|
|
|
}
|
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
@end
|
1996-05-30 20:03:15 +00:00
|
|
|
|
2002-10-12 03:14:22 +00:00
|
|
|
/**
|
|
|
|
<p>Implements a panel that allows the user to select a file or files.
|
|
|
|
NSOpenPanel is based on the NSSavePanel implementation and shares
|
|
|
|
a lot of similarities with it.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
There is only one open panel per application and this panel is obtained
|
|
|
|
by calling the +openPanel class method. From here, you should set the
|
|
|
|
characteristics of the file selection mechanism using the
|
|
|
|
-setCanChooseFiles:, -setCanChooseDirectories: and
|
|
|
|
-setAllowsMultipleSelection: methods. The default is YES except for
|
|
|
|
allowing multiple selection. When ready to show the panel, use the
|
|
|
|
-runModalForTypes:, or a similar method to show the panel in a modal
|
|
|
|
session. Other methods allow you to set the initial directory and
|
|
|
|
initially selected file. The method will return one of NSOKButton
|
|
|
|
or NSCancelButton depending on which button the user pressed.
|
|
|
|
</p>
|
|
|
|
<p>
|
2005-11-24 09:26:38 +00:00
|
|
|
Use the [NSSavePanel-filename] or -filenames method to retrieve
|
|
|
|
the name of the file the user selected.
|
2002-10-12 03:14:22 +00:00
|
|
|
</p>
|
|
|
|
*/
|
1996-05-30 20:03:15 +00:00
|
|
|
@implementation NSOpenPanel
|
|
|
|
|
1999-04-23 16:15:11 +00:00
|
|
|
/*
|
|
|
|
* Class methods
|
|
|
|
*/
|
|
|
|
+ (void) initialize
|
1996-05-30 20:03:15 +00:00
|
|
|
{
|
1999-04-23 16:15:11 +00:00
|
|
|
if (self == [NSOpenPanel class])
|
1999-06-02 02:56:07 +00:00
|
|
|
{
|
|
|
|
[self setVersion: 1];
|
|
|
|
}
|
1996-05-30 20:03:15 +00:00
|
|
|
}
|
|
|
|
|
2005-11-24 09:11:43 +00:00
|
|
|
/**<p>Creates ( if needed ) and returns the shared NSOpenPanel instance.</p>
|
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
+ (NSOpenPanel *) openPanel
|
1996-05-30 20:03:15 +00:00
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
if (!_gs_gui_open_panel)
|
2010-02-28 04:31:54 +00:00
|
|
|
{
|
|
|
|
Class openPanelClass = [[GSTheme theme] openPanelClass];
|
|
|
|
_gs_gui_open_panel = [[openPanelClass alloc] init];
|
|
|
|
}
|
1999-12-07 05:56:08 +00:00
|
|
|
[_gs_gui_open_panel _resetDefaults];
|
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
return _gs_gui_open_panel;
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (id) init
|
|
|
|
{
|
2003-07-21 09:59:52 +00:00
|
|
|
self = [super init];
|
|
|
|
if (self != nil)
|
|
|
|
{
|
|
|
|
_canChooseDirectories = YES;
|
|
|
|
_canChooseFiles = YES;
|
|
|
|
}
|
1999-04-23 16:15:11 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
1999-12-07 05:56:08 +00:00
|
|
|
|
1999-04-23 16:15:11 +00:00
|
|
|
/*
|
|
|
|
* Filtering Files
|
|
|
|
*/
|
2005-11-18 11:06:09 +00:00
|
|
|
/**<p> Allows the user to select multiple files if flag is YES.
|
2005-11-24 09:11:43 +00:00
|
|
|
The default behavior is not to allow multiple selections</p><p>See Also:
|
|
|
|
-allowsMultipleSelection [NSBrowser-setAllowsMultipleSelection:]</p>
|
2005-11-18 11:06:09 +00:00
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (void) setAllowsMultipleSelection: (BOOL)flag
|
|
|
|
{
|
1999-06-16 21:55:23 +00:00
|
|
|
[_browser setAllowsMultipleSelection: flag];
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/**<p>Returns YES if the user is allowed to select multiple files. The
|
2005-11-24 09:11:43 +00:00
|
|
|
default behavior is not to allow mutiple selections.</p><p>See Also:
|
|
|
|
-setAllowsMultipleSelection: [NSBrowser-allowsMultipleSelection]</p>
|
2005-11-18 11:06:09 +00:00
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (BOOL) allowsMultipleSelection
|
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
return [_browser allowsMultipleSelection];
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-24 09:11:43 +00:00
|
|
|
/**<p>Allows the user to choose directories if flag is YES. The default
|
|
|
|
behavior is to allow choosing directories.</p>
|
|
|
|
<p>See Also: -canChooseDirectories [NSBrowser-setAllowsBranchSelection:]</p>
|
2005-11-18 11:06:09 +00:00
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (void) setCanChooseDirectories: (BOOL)flag
|
|
|
|
{
|
2009-12-21 22:55:01 +00:00
|
|
|
if (flag != _canChooseDirectories)
|
|
|
|
{
|
|
|
|
_canChooseDirectories = flag;
|
|
|
|
[_browser setAllowsBranchSelection: flag];
|
|
|
|
if (!flag)
|
|
|
|
{
|
|
|
|
/* FIXME If the user disables directory selection we should deselect
|
|
|
|
any directories that are currently selected. This is achieved by
|
|
|
|
calling _reloadBrowser, but this may be considered overkill, since
|
|
|
|
the displayed files are the same whether canChooseDirectories is
|
|
|
|
enabled or not. */
|
|
|
|
[self _reloadBrowser];
|
|
|
|
}
|
|
|
|
}
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/** <p>Returns YES if the user is allowed to choose directories The
|
|
|
|
default behavior is to allow choosing directories.</p>
|
|
|
|
<p>See Also: -setCanChooseDirectories:</p>
|
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (BOOL) canChooseDirectories
|
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
return _canChooseDirectories;
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/** <p>Allows the user to choose files if flag is YES.The default behavior it
|
2005-11-18 12:32:30 +00:00
|
|
|
to allow choosing files. </p><p>See Also: -canChooseFiles</p>
|
2005-11-18 11:06:09 +00:00
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (void) setCanChooseFiles: (BOOL)flag
|
|
|
|
{
|
2008-12-06 18:38:27 +00:00
|
|
|
if (flag != _canChooseFiles)
|
|
|
|
{
|
|
|
|
_canChooseFiles = flag;
|
|
|
|
[self _reloadBrowser];
|
|
|
|
}
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/**<p>Returns YES if the user is allowed to choose files. The
|
|
|
|
default behavior it to allow choosing files.</p>
|
|
|
|
<p>See Also: -setCanChooseFiles:</p>
|
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (BOOL) canChooseFiles
|
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
return _canChooseFiles;
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/** <p>Returns the absolute path of the file selected by the user.</p>
|
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (NSString*) filename
|
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
NSArray *ret;
|
|
|
|
|
|
|
|
ret = [self filenames];
|
|
|
|
|
|
|
|
if ([ret count] == 1)
|
|
|
|
return [ret objectAtIndex: 0];
|
|
|
|
else
|
|
|
|
return nil;
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-24 09:11:43 +00:00
|
|
|
/**<p>Returns an array containing the absolute paths (as NSString
|
|
|
|
objects) of the selected files and directories. If multiple
|
|
|
|
selections aren't allowed, the array contains a single name.</p>
|
2002-10-12 03:14:22 +00:00
|
|
|
*/
|
1999-04-23 16:15:11 +00:00
|
|
|
- (NSArray *) filenames
|
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
if ([_browser allowsMultipleSelection])
|
1999-04-23 16:15:11 +00:00
|
|
|
{
|
1999-10-30 02:10:37 +00:00
|
|
|
NSArray *cells = [_browser selectedCells];
|
|
|
|
NSEnumerator *cellEnum = [cells objectEnumerator];
|
|
|
|
NSBrowserCell *currCell;
|
1999-04-23 16:15:11 +00:00
|
|
|
NSMutableArray *ret = [NSMutableArray array];
|
1999-10-30 02:10:37 +00:00
|
|
|
NSString *dir = [self directory];
|
|
|
|
|
1999-11-29 17:22:39 +00:00
|
|
|
if ([_browser selectedColumn] != [_browser lastColumn])
|
1999-04-23 16:15:11 +00:00
|
|
|
{
|
1999-11-29 17:22:39 +00:00
|
|
|
/*
|
|
|
|
* The last column doesn't have anything selected - so we must
|
|
|
|
* have selected a directory.
|
|
|
|
*/
|
|
|
|
if (_canChooseDirectories == YES)
|
|
|
|
{
|
|
|
|
[ret addObject: dir];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while ((currCell = [cellEnum nextObject]))
|
|
|
|
{
|
2007-06-03 07:47:10 +00:00
|
|
|
[ret addObject:
|
|
|
|
[dir stringByAppendingPathComponent: [currCell stringValue]]];
|
1999-11-29 17:22:39 +00:00
|
|
|
}
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (_canChooseDirectories == YES)
|
|
|
|
{
|
|
|
|
if ([_browser selectedColumn] != [_browser lastColumn])
|
|
|
|
return [NSArray arrayWithObject: [self directory]];
|
|
|
|
}
|
|
|
|
|
|
|
|
return [NSArray arrayWithObject: [super filename]];
|
|
|
|
}
|
1999-04-23 16:15:11 +00:00
|
|
|
}
|
|
|
|
|
2002-10-12 03:14:22 +00:00
|
|
|
/** Returns an array of the selected files as URLs */
|
2001-09-17 12:10:10 +00:00
|
|
|
- (NSArray *) URLs
|
|
|
|
{
|
|
|
|
NSMutableArray *ret = [NSMutableArray new];
|
|
|
|
NSEnumerator *enumerator = [[self filenames] objectEnumerator];
|
|
|
|
NSString *filename;
|
|
|
|
|
|
|
|
while ((filename = [enumerator nextObject]) != nil)
|
|
|
|
{
|
2008-05-13 15:04:01 +00:00
|
|
|
[ret addObject: [NSURL fileURLWithPath: filename]];
|
2001-09-17 12:10:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return AUTORELEASE(ret);
|
|
|
|
}
|
|
|
|
|
1999-04-23 16:15:11 +00:00
|
|
|
/*
|
|
|
|
* Running the NSOpenPanel
|
|
|
|
*/
|
2010-10-31 15:34:25 +00:00
|
|
|
|
|
|
|
/**<p>Displays the open panel in a modal session, showing the current directory
|
|
|
|
(or last selected), and filtering for files that matches the allowed file
|
|
|
|
types.</p>
|
|
|
|
<p>See Also: -runModalForDirectory:file:types: and -allowedFileTypes</p>
|
|
|
|
*/
|
2011-06-19 20:44:24 +00:00
|
|
|
- (NSInteger) runModal
|
2010-10-31 15:34:25 +00:00
|
|
|
{
|
|
|
|
return [self runModalForTypes: [self allowedFileTypes]];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**<p>Displays the open panel in a modal session, showing the current directory
|
|
|
|
(or last selected), and filtering for files that have the specified types.</p>
|
2005-11-24 09:11:43 +00:00
|
|
|
<p>See Also: -runModalForDirectory:file:types:</p>
|
2002-10-26 02:38:34 +00:00
|
|
|
*/
|
2011-06-19 20:44:24 +00:00
|
|
|
- (NSInteger) runModalForTypes: (NSArray *)fileTypes
|
1999-04-23 16:15:11 +00:00
|
|
|
{
|
2012-09-11 04:16:51 +00:00
|
|
|
return [self runModalForDirectory: [self directory]
|
2002-10-12 03:14:22 +00:00
|
|
|
file: @""
|
1999-04-23 16:15:11 +00:00
|
|
|
types: fileTypes];
|
|
|
|
}
|
|
|
|
|
2005-11-18 11:06:09 +00:00
|
|
|
/** <p>Displays the open panel in a modal session, with the directory
|
2002-10-12 03:14:22 +00:00
|
|
|
path shown and file name (if any) selected. Files are filtered for the
|
2002-10-26 02:38:34 +00:00
|
|
|
specified types. If the directory is nil, then the directory shown in
|
2005-11-18 11:06:09 +00:00
|
|
|
the open panel is the last directory selected.</p>
|
|
|
|
<p>See Also: -runModalForTypes:</p>
|
2002-10-26 02:38:34 +00:00
|
|
|
*/
|
2011-06-19 20:44:24 +00:00
|
|
|
- (NSInteger) runModalForDirectory: (NSString *)path
|
|
|
|
file: (NSString *)name
|
|
|
|
types: (NSArray *)fileTypes
|
1999-04-23 16:15:11 +00:00
|
|
|
{
|
2011-09-07 07:46:28 +00:00
|
|
|
[self setAllowedFileTypes: fileTypes];
|
2001-09-17 12:10:10 +00:00
|
|
|
return [self runModalForDirectory: path
|
2003-07-21 09:59:52 +00:00
|
|
|
file: name];
|
2001-09-17 12:10:10 +00:00
|
|
|
}
|
1999-12-07 05:56:08 +00:00
|
|
|
|
2011-06-19 20:44:24 +00:00
|
|
|
- (NSInteger) runModalForDirectory: (NSString *)path
|
|
|
|
file: (NSString *)name
|
|
|
|
types: (NSArray *)fileTypes
|
|
|
|
relativeToWindow: (NSWindow*)window
|
2001-09-17 12:10:10 +00:00
|
|
|
{
|
2011-09-07 07:46:28 +00:00
|
|
|
[self setAllowedFileTypes: fileTypes];
|
1999-12-07 05:56:08 +00:00
|
|
|
return [self runModalForDirectory: path
|
2003-07-21 09:59:52 +00:00
|
|
|
file: name
|
|
|
|
relativeToWindow: window];
|
2001-09-17 12:10:10 +00:00
|
|
|
}
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
- (void) beginSheetForDirectory: (NSString *)path
|
|
|
|
file: (NSString *)name
|
|
|
|
types: (NSArray *)fileTypes
|
|
|
|
modalForWindow: (NSWindow *)docWindow
|
|
|
|
modalDelegate: (id)delegate
|
|
|
|
didEndSelector: (SEL)didEndSelector
|
|
|
|
contextInfo: (void *)contextInfo
|
2001-09-17 12:10:10 +00:00
|
|
|
{
|
2012-02-19 16:32:52 +00:00
|
|
|
[self setAllowedFileTypes: fileTypes];
|
2001-09-17 12:10:10 +00:00
|
|
|
[self beginSheetForDirectory: path
|
2003-10-28 16:52:14 +00:00
|
|
|
file: name
|
|
|
|
modalForWindow: docWindow
|
|
|
|
modalDelegate: delegate
|
|
|
|
didEndSelector: didEndSelector
|
|
|
|
contextInfo: contextInfo];
|
1996-05-30 20:03:15 +00:00
|
|
|
}
|
|
|
|
|
2011-06-19 20:44:24 +00:00
|
|
|
- (void) beginForDirectory: (NSString *)path
|
|
|
|
file: (NSString *)filename
|
|
|
|
types: (NSArray *)fileTypes
|
|
|
|
modelessDelegate: (id)modelessDelegate
|
|
|
|
didEndSelector: (SEL)didEndSelector
|
|
|
|
contextInfo: (void *)contextInfo
|
|
|
|
{
|
|
|
|
// FIXME: This should be modeless
|
2012-02-19 16:32:52 +00:00
|
|
|
[self setAllowedFileTypes: fileTypes];
|
2011-06-19 20:44:24 +00:00
|
|
|
[self _setupForDirectory: path file: filename];
|
|
|
|
if ([filename length] > 0)
|
|
|
|
[_okButton setEnabled: YES];
|
|
|
|
[NSApp beginSheet: self
|
|
|
|
modalForWindow: nil
|
|
|
|
modalDelegate: modelessDelegate
|
|
|
|
didEndSelector: didEndSelector
|
|
|
|
contextInfo: contextInfo];
|
|
|
|
}
|
|
|
|
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
- (void) ok: (id)sender
|
|
|
|
{
|
2001-07-09 02:49:03 +00:00
|
|
|
NSMatrix *matrix = nil;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
NSBrowserCell *selectedCell = nil;
|
2001-07-09 02:49:03 +00:00
|
|
|
NSArray *selectedCells = nil;
|
2000-09-13 20:18:01 +00:00
|
|
|
int selectedColumn, lastColumn;
|
2003-10-28 16:52:14 +00:00
|
|
|
NSString *tmp;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
selectedColumn = [_browser selectedColumn];
|
2001-07-09 02:49:03 +00:00
|
|
|
lastColumn = [_browser lastColumn];
|
2000-09-13 20:18:01 +00:00
|
|
|
if (selectedColumn >= 0)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2000-09-13 20:18:01 +00:00
|
|
|
matrix = [_browser matrixInColumn: selectedColumn];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2000-09-13 20:18:01 +00:00
|
|
|
if ([_browser allowsMultipleSelection] == YES)
|
|
|
|
{
|
|
|
|
selectedCells = [matrix selectedCells];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (selectedColumn == lastColumn && [selectedCells count] == 1)
|
2000-09-13 20:18:01 +00:00
|
|
|
selectedCell = [selectedCells objectAtIndex: 0];
|
|
|
|
}
|
|
|
|
else
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2009-12-15 23:56:51 +00:00
|
|
|
if (selectedColumn == lastColumn)
|
2000-09-13 20:18:01 +00:00
|
|
|
selectedCell = [matrix selectedCell];
|
|
|
|
}
|
2001-07-09 02:49:03 +00:00
|
|
|
}
|
2000-09-13 20:18:01 +00:00
|
|
|
|
2001-07-09 02:49:03 +00:00
|
|
|
if (selectedCell)
|
|
|
|
{
|
|
|
|
if ([selectedCell isLeaf] == NO)
|
2000-09-13 20:18:01 +00:00
|
|
|
{
|
2001-07-09 02:49:03 +00:00
|
|
|
[[_form cellAtIndex: 0] setStringValue: @""];
|
|
|
|
[_browser doClick: matrix];
|
|
|
|
[_form selectTextAtIndex: 0];
|
|
|
|
[_form setNeedsDisplay: YES];
|
|
|
|
|
|
|
|
return;
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
}
|
|
|
|
}
|
2001-07-09 02:49:03 +00:00
|
|
|
else if (_canChooseDirectories == NO
|
2009-12-15 23:56:51 +00:00
|
|
|
&& (selectedColumn != lastColumn || ![selectedCells count]))
|
2001-07-09 02:49:03 +00:00
|
|
|
{
|
|
|
|
[_form selectTextAtIndex: 0];
|
|
|
|
[_form setNeedsDisplay: YES];
|
|
|
|
return;
|
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2008-05-13 15:04:01 +00:00
|
|
|
ASSIGN (_directory, pathToColumn(_browser, [_browser lastColumn]));
|
2003-10-28 16:52:14 +00:00
|
|
|
|
2000-09-13 20:18:01 +00:00
|
|
|
if (selectedCell)
|
2003-10-28 16:52:14 +00:00
|
|
|
tmp = [selectedCell stringValue];
|
|
|
|
else
|
|
|
|
tmp = [[_form cellAtIndex: 0] stringValue];
|
|
|
|
|
|
|
|
if ([tmp isAbsolutePath] == YES)
|
|
|
|
{
|
|
|
|
ASSIGN (_fullFileName, tmp);
|
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
else
|
2003-10-28 16:52:14 +00:00
|
|
|
{
|
|
|
|
ASSIGN (_fullFileName, [_directory stringByAppendingPathComponent: tmp]);
|
|
|
|
}
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
if (_delegateHasValidNameFilter)
|
|
|
|
{
|
|
|
|
NSEnumerator *enumerator;
|
|
|
|
NSArray *filenames = [self filenames];
|
|
|
|
NSString *filename;
|
|
|
|
|
|
|
|
enumerator = [filenames objectEnumerator];
|
2000-09-13 20:18:01 +00:00
|
|
|
while ((filename = [enumerator nextObject]))
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2000-09-13 20:18:01 +00:00
|
|
|
if ([_delegate panel: self isValidFilename: filename] == NO)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-06 14:11:46 +00:00
|
|
|
[self _updateDefaultDirectory];
|
2004-02-29 00:11:51 +00:00
|
|
|
[NSApp stopModalWithCode: NSOKButton];
|
2006-05-29 08:47:32 +00:00
|
|
|
[_okButton setEnabled: NO];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
[self close];
|
|
|
|
}
|
|
|
|
|
2002-11-26 00:18:33 +00:00
|
|
|
- (BOOL) resolvesAliases
|
|
|
|
{
|
|
|
|
// FIXME
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setResolvesAliases: (BOOL) flag
|
|
|
|
{
|
|
|
|
// FIXME
|
|
|
|
}
|
|
|
|
|
1999-04-23 16:15:11 +00:00
|
|
|
/*
|
|
|
|
* NSCoding protocol
|
|
|
|
*/
|
1999-03-02 08:58:30 +00:00
|
|
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
1996-05-30 20:03:15 +00:00
|
|
|
{
|
1999-03-02 08:58:30 +00:00
|
|
|
[super encodeWithCoder: aCoder];
|
1996-05-30 20:03:15 +00:00
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_canChooseDirectories];
|
|
|
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_canChooseFiles];
|
1996-05-30 20:03:15 +00:00
|
|
|
}
|
|
|
|
|
1999-03-02 08:58:30 +00:00
|
|
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
1996-05-30 20:03:15 +00:00
|
|
|
{
|
2011-03-14 22:59:20 +00:00
|
|
|
self = [super initWithCoder: aDecoder];
|
|
|
|
if (nil == self)
|
|
|
|
return nil;
|
1996-05-30 20:03:15 +00:00
|
|
|
|
1999-10-30 02:10:37 +00:00
|
|
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_canChooseDirectories];
|
|
|
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_canChooseFiles];
|
1996-05-30 20:03:15 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
1999-10-30 02:10:37 +00:00
|
|
|
@end
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// NSForm delegate methods
|
|
|
|
//
|
|
|
|
@interface NSOpenPanel (FormDelegate)
|
|
|
|
- (void) controlTextDidChange: (NSNotification *)aNotification;
|
|
|
|
@end
|
|
|
|
@implementation NSOpenPanel (FormDelegate)
|
|
|
|
|
|
|
|
- (void) controlTextDidChange: (NSNotification *)aNotification;
|
|
|
|
{
|
|
|
|
NSString *s, *selectedString;
|
|
|
|
NSArray *cells;
|
|
|
|
NSMatrix *matrix;
|
|
|
|
NSCell *selectedCell;
|
|
|
|
int i, sLength, cellLength, selectedRow;
|
|
|
|
NSComparisonResult result;
|
|
|
|
NSRange range;
|
|
|
|
|
2001-07-09 02:49:03 +00:00
|
|
|
s = [[[aNotification userInfo] objectForKey: @"NSFieldEditor"] string];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
/*
|
|
|
|
* If the user typed in an absolute path, display it.
|
|
|
|
*/
|
|
|
|
if ([s isAbsolutePath] == YES)
|
|
|
|
{
|
|
|
|
[self setDirectory: s];
|
|
|
|
}
|
|
|
|
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
sLength = [s length];
|
|
|
|
range.location = 0;
|
|
|
|
range.length = sLength;
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
matrix = [_browser matrixInColumn: [_browser lastColumn]];
|
|
|
|
|
|
|
|
if (sLength == 0)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
|
|
|
[matrix deselectAllCells];
|
2009-12-15 23:56:51 +00:00
|
|
|
[_okButton setEnabled: _canChooseDirectories];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
selectedCell = [matrix selectedCell];
|
|
|
|
selectedString = [selectedCell stringValue];
|
|
|
|
selectedRow = [matrix selectedRow];
|
|
|
|
cells = [matrix cells];
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (selectedString)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
|
|
|
cellLength = [selectedString length];
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (cellLength < sLength)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
range.length = cellLength;
|
|
|
|
|
2001-07-09 02:49:03 +00:00
|
|
|
result = [selectedString compare: s options: 0 range: range];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (result == NSOrderedSame)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
2003-10-28 16:52:14 +00:00
|
|
|
else if (result == NSOrderedAscending)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
result = NSOrderedDescending;
|
2003-10-28 16:52:14 +00:00
|
|
|
else if (result == NSOrderedDescending)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
result = NSOrderedAscending;
|
|
|
|
|
|
|
|
range.length = sLength;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
result = NSOrderedDescending;
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (result == NSOrderedDescending)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
|
|
|
int numberOfCells = [cells count];
|
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
for (i = selectedRow+1; i < numberOfCells; i++)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2001-07-09 02:49:03 +00:00
|
|
|
selectedString = [[matrix cellAtRow: i column: 0] stringValue];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
cellLength = [selectedString length];
|
2003-10-28 16:52:14 +00:00
|
|
|
if (cellLength < sLength)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
continue;
|
|
|
|
|
2001-07-09 02:49:03 +00:00
|
|
|
result = [selectedString compare: s options: 0 range: range];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (result == NSOrderedSame)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
|
|
|
[matrix deselectAllCells];
|
2001-07-09 02:49:03 +00:00
|
|
|
[matrix selectCellAtRow: i column: 0];
|
|
|
|
[matrix scrollCellToVisibleAtRow: i column: 0];
|
|
|
|
[_okButton setEnabled: YES];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-10-28 16:52:14 +00:00
|
|
|
for (i = selectedRow; i >= 0; --i)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
2001-07-09 02:49:03 +00:00
|
|
|
selectedString = [[matrix cellAtRow: i column: 0] stringValue];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
|
|
|
cellLength = [selectedString length];
|
2003-10-28 16:52:14 +00:00
|
|
|
if (cellLength < sLength)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
continue;
|
|
|
|
|
2001-07-09 02:49:03 +00:00
|
|
|
result = [selectedString compare: s options: 0 range: range];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
|
2003-10-28 16:52:14 +00:00
|
|
|
if (result == NSOrderedSame)
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
{
|
|
|
|
[matrix deselectAllCells];
|
2001-07-09 02:49:03 +00:00
|
|
|
[matrix selectCellAtRow: i column: 0];
|
|
|
|
[matrix scrollCellToVisibleAtRow: i column: 0];
|
|
|
|
[_okButton setEnabled: YES];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[matrix deselectAllCells];
|
2009-12-15 23:56:51 +00:00
|
|
|
[_okButton setEnabled: NO];
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
core dump due to NSConnection bug.
* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
key equivalent for null character events. Triggered return key for
default button cell.
([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
([NSWindow -dealloc]): release _defaultButtonCell
* Headers/AppKit/NSWindow.h: added ivar and flag.
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
implemented keyboard navigation.
([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
branch selection if can't choose directories.
([NSOpenPanel -_selectTextInColumn:]),
([NSOpenPanel -_selectCellName:]): new private methods.
([NSOpenPanel -filenames]): change for choose dirs.
* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
events to the next responder.
* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
([NSBrowser -keyDown:]): implemented keyboard navigation
([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
changed return value from NSNotFound to -1 to conforms to NSMatrix
([NSBrowser -doClick:]): fix for new return values, added support for
multiple and branch selection.
([NSBrowser -setLastColumn:]): mark column titles need display
([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.
* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
NSOnState if someone try to set NSMixedState in a two state cell.
([NSCell -performClick:]): do not perform click if the cell is
disabled.
* Source/NSMatrix.m ([NSMatrix
-_privateFrame:mode:numberOfRows:numberOfColumns:]),
([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
to -1 when no cells are selected
([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
_selectedColumn.
([NSMatrix -getRow:column:ofCell:]): check for null values for row and
column.
([NSMatrix -selectCellAtRow:column:]): deselect the current selection
only in NSRadioModeMatrix mode.
([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
and fix for this mode.
* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
text of the cell and enable okButton.
([NSSavePanel -controlTextDidChange:]): implemented.
([NSSavePanel -controlTextDidEndEditing:]): removed.
([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
symbolic links.
([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
performClick: of the _okButton. Set _okButton as default window button.
Disable _okButton.
([NSSavePanel -browser:selectCellWithString:inColumn:]),
([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
keyboard navigation.
([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
filename is valid.
([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
([NSSavePanel -_selectCellName:]): new private methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end /* NSOpenPanel */
|