* Source/NSOpenPanel.m: Corrects bug #25471. Only enable

the OK button when a file the application can open is selected.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27876 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2009-02-16 03:15:05 +00:00
parent 5efe558c2b
commit 550f1d019b
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2009-02-15 22:21-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSOpenPanel.m: Corrects bug #25471. Only enable
the OK button when a file the application can open is selected.
2009-02-15 19:38-EST Gregory John Casamento <greg_casamento@yahoo.com> 2009-02-15 19:38-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSCell.m: Change to implement 10.3 and later behavior for * Source/NSCell.m: Change to implement 10.3 and later behavior for

View file

@ -126,15 +126,15 @@ static NSOpenPanel *_gs_gui_open_panel = nil;
else else
{ {
[self _selectCellName: [[_form cellAtIndex: 0] stringValue]]; [self _selectCellName: [[_form cellAtIndex: 0] stringValue]];
// [_form selectTextAtIndex: 0]; [_okButton setEnabled:
[_okButton setEnabled: YES]; [self _shouldShowExtension:
[[_browser path] pathExtension]]];
} }
} }
else else
{ {
[_form abortEditing]; [_form abortEditing];
[[_form cellAtIndex: 0] setStringValue:@""]; [[_form cellAtIndex: 0] setStringValue:@""];
// [_form selectTextAtIndex: 0];
[_form setNeedsDisplay: YES]; [_form setNeedsDisplay: YES];
[_okButton setEnabled: YES]; [_okButton setEnabled: YES];
} }
@ -148,11 +148,12 @@ static NSOpenPanel *_gs_gui_open_panel = nil;
if ([[[_form cellAtIndex: 0] stringValue] length] > 0) if ([[[_form cellAtIndex: 0] stringValue] length] > 0)
{ {
[self _selectCellName: [[_form cellAtIndex: 0] stringValue]]; [self _selectCellName: [[_form cellAtIndex: 0] stringValue]];
// [_form selectTextAtIndex: 0];
[_form setNeedsDisplay: YES]; [_form setNeedsDisplay: YES];
} }
[_okButton setEnabled: YES]; [_okButton setEnabled:
[self _shouldShowExtension:
[[_browser path] pathExtension]]];
} }
} }
} }