libs-gui/Source/NSOpenPanel.m

722 lines
18 KiB
Mathematica
Raw Normal View History

/** <title>NSOpenPanel</title> -*-objc-*-
<abstract>Standard panel for opening files</abstract>
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.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
Author: Daniel B<EFBFBD>hringer <boehring@biomed.ruhr-uni-bochum.de>
Date: August 1998
Source by Daniel B<EFBFBD>hringer integrated into Scott Christley's preliminary
implementation by Felipe A. Rodriguez <far@ix.netcom.com>
Author: Nicola Pero <n.pero@mi.flashnet.it>
Date: October 1999 Completely Rewritten.
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
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSException.h>
#include <Foundation/NSFileManager.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSURL.h>
#include "AppKit/NSApplication.h"
#include "AppKit/NSBrowser.h"
#include "AppKit/NSBrowserCell.h"
#include "AppKit/NSButton.h"
#include "AppKit/NSForm.h"
#include "AppKit/NSMatrix.h"
#include "AppKit/NSOpenPanel.h"
static NSOpenPanel *_gs_gui_open_panel = nil;
// Pacify the compiler
@interface NSSavePanel (_PrivateMethods)
- (void) _resetDefaults;
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;
- (void) _selectTextInColumn: (int)column;
- (void) _setupForDirectory: (NSString *)path file: (NSString *)filename;
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
- (BOOL) _shouldShowExtension: (NSString *)extension isDir: (BOOL *)isDir;
- (NSComparisonResult) _compareFilename: (NSString *)n1 with: (NSString *)n2;
@end
@implementation NSOpenPanel (_PrivateMethods)
- (void) _resetDefaults
{
[super _resetDefaults];
[self setTitle: @"Open"];
[self setCanChooseFiles: YES];
[self setCanChooseDirectories: YES];
[self setAllowsMultipleSelection: NO];
[_okButton setEnabled: YES];
}
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
- (BOOL) _shouldShowExtension: (NSString *)extension
isDir: (BOOL *)isDir;
{
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
BOOL found = YES;
if (_fileTypes != nil)
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
{
if ([_fileTypes containsObject: extension] == YES)
{
if ([self treatsFilePackagesAsDirectories] == NO)
{
*isDir = NO;
}
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
}
else
{
found = NO;
}
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
}
if (*isDir == YES || (found == YES && _canChooseFiles == YES))
return YES;
* Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]): implemented. ([NSButtonCell -cellAttribute:]): implemented. * Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented keyboard selection. ([NSPopUpButton -resignFirstResponder]): implemented. ([NSPopUpButton -resignKeyWindow]): implemented. * Source/NSPopUpButtonCell.m ([NSPopUpButtonCell -drawInteriorWithFrame:inView:]): from -drawWithFrame:inView: * Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first responder. ([NSButton -resignFirstResponder]): likewise. ([NSButton -becomeKeyWindow]): likewise. ([NSButton -resignKeyWindow]): likewise. * Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame: inView:]): draw correct dotted box. * Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first responder the latest column. ([NSBrowser -acceptsFirstResponder]): accepts first responder status. ([NSBrowser -keyDown:]): handle tabs to select next/previous key view. ([NSBrowser -moveRight:]): make browser column the first responder. ([NSBrowser -moveUp:]): likewise. ([NSBrowser -moveDown:]): likewise. ([NSBrowser -moveLeft:]): likewise. ([NSBrowser -_unloadFromColumn:]): remove columns from superview and array. ([NSBrowser -_remapColumnSubviews:]): set the correct first responder. * Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed windows. ([NSWindow -dealloc]): release _originalResponder * Source/NSView.m ([NSView -removeSubview:]): remove next responder. * Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear selected range. ([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay textObject after invoking mouseDown: ([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline when first responder. ([NSCell -setCellAttribute:to:]): implemented. * Source/NSTextView.m ([NSTextView -moveUp:]): don't call _illegalMovement: for the text field editor. ([NSTextView -moveDown:]): likewise. ([NSTextView -moveLeft:]): likewise. ([NSTextView -moveRight:]): likewise. * Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed return/tab/backtab text movement code. * Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype. * Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect. * Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented. ([NSMatrix -_selectCell:atRow:column:]): new method. ([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column: ([NSMatrix -selectCellWithTag:]): likewise. ([NSMatrix -selectAll:]): Do not select disabled or editable cells. ([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text movement code. ([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select disabled cells. ([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise. ([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set dottedRow and dottedColumn. ([NSMatrix -insertRow:withCells:]): likewise. ([NSMatrix -removeColumn:]): likewise. ([NSMatrix -removeRow:]): likewise. ([NSMatrix -mouseDown:]): likewise and discard disabled cells. ([NSMatrix -drawRect:]): set shows cell first responder. ([NSMatrix -becomeFirstResponder]): draw dotted box for cell. ([NSMatrix -resignFirstResponder]): likewise. ([NSMatrix -becomeKeyWindow]): likewise. ([NSMatrix -resignKeyWindow]): likewise. ([NSMatrix -_setNeedsDisplayDottedCell]): likewise. ([NSMatrix -selectTextAtRow:column:]): set shows cell first responder. ([NSMatrix -setState:atRow:column:]): likewise. Deselect previous selected cell in radio mode. * Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare: and check extension against _requiredFileType and not "app", "bundle", etc. ([NSString -_gsSavePanelCompare:]): filename compare. ([NSSavePanel -_initWithoutGModel]): set key view for keyboard interaction. ([NSSavePanel -keyDown:]): removed. ([NSSavePanel -controlTextDidEndEditing:]): removed. * Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]): added isDir argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
return 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
- (void) _selectTextInColumn: (int)column
{
NSMatrix *matrix;
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;
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
if ([_browser allowsMultipleSelection])
{
NSArray *selectedCells;
selectedCells = [matrix selectedCells];
if ([selectedCells count] <= 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
{
if (_canChooseDirectories == 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
[[matrix selectedCell] isLeaf] == YES)
[super _selectTextInColumn: 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
else
{
[self _selectCellName: [[_form cellAtIndex: 0] stringValue]];
// [_form selectTextAtIndex: 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
}
}
else
{
[_form abortEditing];
[[_form cellAtIndex: 0] setStringValue:@""];
// [_form selectTextAtIndex: 0];
[_form setNeedsDisplay: YES];
[_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
}
}
else
{
if (_canChooseDirectories == NO || [[matrix selectedCell] isLeaf] == YES)
[super _selectTextInColumn: 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
else
{
if ([[[_form cellAtIndex: 0] stringValue] length] > 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
{
[self _selectCellName: [[_form cellAtIndex: 0] stringValue]];
// [_form selectTextAtIndex: 0];
[_form setNeedsDisplay: 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
}
[_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
}
}
}
- (void) _selectCellName: (NSString *)title
{
NSString *cellString;
NSArray *cells;
NSMatrix *matrix;
NSComparisonResult result;
NSRange range;
int i, titleLength, cellLength, numberOfCells;
matrix = [_browser matrixInColumn: [_browser lastColumn]];
if ([matrix selectedCell])
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;
titleLength = [title length];
if (!titleLength)
{
[_okButton setEnabled: NO];
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
range.location = 0;
range.length = titleLength;
cells = [matrix cells];
numberOfCells = [cells count];
for (i = 0; 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
{
cellString = [[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 = [cellString length];
if (cellLength < titleLength)
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;
result = [self _compareFilename: [cellString substringWithRange: range]
with: title];
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 (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 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 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
break;
}
}
- (void) _setupForDirectory: (NSString *)path file: (NSString *)filename
{
// FIXME: Not sure if this is needed
if ((filename == nil) || ([filename isEqual: @""] == NO))
[_okButton setEnabled: YES];
if (_canChooseDirectories == NO)
{
if ([_browser allowsMultipleSelection] == YES)
[_browser setAllowsBranchSelection: NO];
}
[super _setupForDirectory: path file: filename];
}
@end
/**
<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>
Use the [NSSavePanel-filename] or -filenames method to retrieve
the name of the file the user selected.
</p>
*/
@implementation NSOpenPanel
/*
* Class methods
*/
+ (void) initialize
{
if (self == [NSOpenPanel class])
{
[self setVersion: 1];
}
}
/**<p>Creates ( if needed ) and returns the shared NSOpenPanel instance.</p>
*/
+ (NSOpenPanel *) openPanel
{
if (!_gs_gui_open_panel)
_gs_gui_open_panel = [[NSOpenPanel alloc] init];
[_gs_gui_open_panel _resetDefaults];
return _gs_gui_open_panel;
}
- (void) dealloc
{
TEST_RELEASE(_fileTypes);
[super dealloc];
}
- (id) init
{
self = [super init];
if (self != nil)
{
_canChooseDirectories = YES;
_canChooseFiles = YES;
}
return self;
}
/*
* Filtering Files
*/
/**<p> Allows the user to select multiple files if flag is YES.
The default behavior is not to allow multiple selections</p><p>See Also:
-allowsMultipleSelection [NSBrowser-setAllowsMultipleSelection:]</p>
*/
- (void) setAllowsMultipleSelection: (BOOL)flag
{
[_browser setAllowsMultipleSelection: flag];
}
/**<p>Returns YES if the user is allowed to select multiple files. The
default behavior is not to allow mutiple selections.</p><p>See Also:
-setAllowsMultipleSelection: [NSBrowser-allowsMultipleSelection]</p>
*/
- (BOOL) allowsMultipleSelection
{
return [_browser allowsMultipleSelection];
}
/**<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>
*/
- (void) setCanChooseDirectories: (BOOL)flag
{
_canChooseDirectories = flag;
[_browser setAllowsBranchSelection: flag];
}
/** <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>
*/
- (BOOL) canChooseDirectories
{
return _canChooseDirectories;
}
/** <p>Allows the user to choose files if flag is YES.The default behavior it
to allow choosing files. </p><p>See Also: -canChooseFiles</p>
*/
- (void) setCanChooseFiles: (BOOL)flag
{
_canChooseFiles = flag;
}
/**<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>
*/
- (BOOL) canChooseFiles
{
return _canChooseFiles;
}
/** <p>Returns the absolute path of the file selected by the user.</p>
*/
- (NSString*) filename
{
NSArray *ret;
ret = [self filenames];
if ([ret count] == 1)
return [ret objectAtIndex: 0];
else
return nil;
}
/**<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>
*/
- (NSArray *) filenames
{
if ([_browser allowsMultipleSelection])
{
NSArray *cells = [_browser selectedCells];
NSEnumerator *cellEnum = [cells objectEnumerator];
NSBrowserCell *currCell;
NSMutableArray *ret = [NSMutableArray array];
NSString *dir = [self directory];
if ([_browser selectedColumn] != [_browser lastColumn])
{
/*
* 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]))
{
[ret addObject: [NSString stringWithFormat: @"%@/%@", dir,
[currCell stringValue]]];
}
}
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]];
}
}
/** Returns an array of the selected files as URLs */
- (NSArray *) URLs
{
NSMutableArray *ret = [NSMutableArray new];
NSEnumerator *enumerator = [[self filenames] objectEnumerator];
NSString *filename;
while ((filename = [enumerator nextObject]) != nil)
{
[ret addObject: [NSURL fileURLWithPath: filename]];
}
return AUTORELEASE(ret);
}
/*
* Running the NSOpenPanel
*/
/**<p>Displays the open panel in a modal session, filtering for
files that have the specified types </p>
<p>See Also: -runModalForDirectory:file:types:</p>
*/
- (int) runModalForTypes: (NSArray *)fileTypes
{
return [self runModalForDirectory: nil
file: @""
types: fileTypes];
}
/** <p>Displays the open panel in a modal session, with the directory
path shown and file name (if any) selected. Files are filtered for the
specified types. If the directory is nil, then the directory shown in
the open panel is the last directory selected.</p>
<p>See Also: -runModalForTypes:</p>
*/
- (int) runModalForDirectory: (NSString *)path
file: (NSString *)name
types: (NSArray *)fileTypes
{
ASSIGN (_fileTypes, fileTypes);
return [self runModalForDirectory: path
file: name];
}
- (int) runModalForDirectory: (NSString *)path
file: (NSString *)name
types: (NSArray *)fileTypes
relativeToWindow: (NSWindow*)window
{
ASSIGN (_fileTypes, fileTypes);
return [self runModalForDirectory: path
file: name
relativeToWindow: window];
}
- (void) beginSheetForDirectory: (NSString *)path
file: (NSString *)name
types: (NSArray *)fileTypes
modalForWindow: (NSWindow *)docWindow
modalDelegate: (id)delegate
didEndSelector: (SEL)didEndSelector
contextInfo: (void *)contextInfo
{
ASSIGN (_fileTypes, fileTypes);
[self beginSheetForDirectory: path
file: name
modalForWindow: docWindow
modalDelegate: delegate
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
{
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;
NSArray *selectedCells = nil;
int selectedColumn, lastColumn;
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];
lastColumn = [_browser lastColumn];
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
{
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
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
if (selectedColumn == lastColumn && [selectedCells count] == 1)
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
{
if (_canChooseDirectories == NO)
{
if (selectedColumn == lastColumn)
selectedCell = [matrix selectedCell];
}
else if (selectedColumn == lastColumn)
selectedCell = [matrix selectedCell];
}
}
if (selectedCell)
{
if ([selectedCell isLeaf] == NO)
{
[[_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
}
}
else if (_canChooseDirectories == NO
&& (![_browser allowsMultipleSelection] || !selectedCells
|| selectedColumn != lastColumn || ![selectedCells count]))
{
[_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
ASSIGN (_directory, [_browser pathToColumn: [_browser lastColumn]]);
if (selectedCell)
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
{
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];
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
{
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;
}
}
[NSApp stopModalWithCode: NSOKButton];
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];
}
- (BOOL) resolvesAliases
{
// FIXME
return YES;
}
- (void) setResolvesAliases: (BOOL) flag
{
// FIXME
}
/*
* NSCoding protocol
*/
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[super encodeWithCoder: aCoder];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_canChooseDirectories];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_canChooseFiles];
}
- (id) initWithCoder: (NSCoder*)aDecoder
{
[super initWithCoder: aDecoder];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_canChooseDirectories];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_canChooseFiles];
return self;
}
@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;
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
/*
* 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;
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];
if (_canChooseDirectories == NO)
[_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
return;
}
selectedCell = [matrix selectedCell];
selectedString = [selectedCell stringValue];
selectedRow = [matrix selectedRow];
cells = [matrix cells];
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];
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;
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
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;
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;
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;
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];
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
{
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];
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;
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
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];
[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
{
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
{
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];
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;
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
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];
[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];
[_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
}
@end /* NSOpenPanel */