mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
2000-09-14 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSPanel.m ([GSAlertPanel -initWithContentRect:styleMask:backing:defer:screen:]): set alternate return image. * Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]): removed. * Source/NSSavePanel.m ([NSSavePanel -controlTextDidEndEditing:]): repost currentEvent. ([NSSavePanel -_initWithoutGModel]): removed form cell action, set _okButton image. ([NSSavePanel -_performReturn:]): removed. * Images/common_retH.tiff: new file. * Images/GNUmakefile (IMAGE_FILES): update. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1941caf1ef
commit
51d87dae28
6 changed files with 22 additions and 47 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2000-09-14 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||
|
||||
* Source/NSPanel.m ([GSAlertPanel
|
||||
-initWithContentRect:styleMask:backing:defer:screen:]): set alternate
|
||||
return image.
|
||||
* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]):
|
||||
removed.
|
||||
* Source/NSSavePanel.m ([NSSavePanel -controlTextDidEndEditing:]):
|
||||
repost currentEvent.
|
||||
([NSSavePanel -_initWithoutGModel]): removed form cell action, set
|
||||
_okButton image.
|
||||
([NSSavePanel -_performReturn:]): removed.
|
||||
* Images/common_retH.tiff: new file.
|
||||
* Images/GNUmakefile (IMAGE_FILES): update.
|
||||
|
||||
Thu Sep 14 14:01:10 2000 Nicola Pero <nicola@brainstorm.co.uk>
|
||||
|
||||
* Source/NSMatrix.m ([-textDidBeginEditing:]),
|
||||
|
|
|
@ -81,6 +81,7 @@ common_DownArrowSmall.tiff \
|
|||
common_Nibble.tiff \
|
||||
common_Dimple.tiff \
|
||||
common_ret.tiff \
|
||||
common_retH.tiff \
|
||||
common_WMClose.tiff \
|
||||
common_WMCloseBroken.tiff \
|
||||
common_Unknown.tiff \
|
||||
|
|
BIN
Images/common_retH.tiff
Normal file
BIN
Images/common_retH.tiff
Normal file
Binary file not shown.
|
@ -509,25 +509,10 @@ selectCellWithString: (NSString *)title
|
|||
// NSForm delegate methods
|
||||
//
|
||||
@interface NSOpenPanel (FormDelegate)
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification;
|
||||
- (void) controlTextDidChange: (NSNotification *)aNotification;
|
||||
@end
|
||||
@implementation NSOpenPanel (FormDelegate)
|
||||
|
||||
- (void) controlTextDidEndEditing: (NSNotification*)aNotification
|
||||
{
|
||||
NSMatrix *matrix;
|
||||
NSBrowserCell *selectedCell;
|
||||
|
||||
matrix = [_browser matrixInColumn:[_browser lastColumn]];
|
||||
selectedCell = [matrix selectedCell];
|
||||
|
||||
if (!selectedCell)
|
||||
[_form selectTextAtIndex:0];
|
||||
|
||||
[super controlTextDidEndEditing:aNotification];
|
||||
}
|
||||
|
||||
- (void) controlTextDidChange: (NSNotification *)aNotification;
|
||||
{
|
||||
NSString *s, *selectedString;
|
||||
|
|
|
@ -553,6 +553,7 @@ setControl(NSView* content, id control, NSString *title)
|
|||
[defButton setKeyEquivalent: @"\r"];
|
||||
[defButton setImagePosition: NSImageRight];
|
||||
[defButton setImage: [NSImage imageNamed: @"common_ret"]];
|
||||
[defButton setAlternateImage: [NSImage imageNamed: @"common_retH"]];
|
||||
|
||||
altButton = [self _makeButtonWithRect: rect];
|
||||
othButton = [self _makeButtonWithRect: rect];
|
||||
|
|
|
@ -82,7 +82,6 @@ static BOOL _gs_display_reading_progress = NO;
|
|||
- (void) _unmountMedia;
|
||||
- (void) _selectTextInColumn: (int)column;
|
||||
- (void) _selectCellName: (NSString *)title;
|
||||
- (void) _performReturn: (id)sender;
|
||||
|
||||
@end /* NSSavePanel (PrivateMethods) */
|
||||
|
||||
|
@ -149,9 +148,6 @@ static BOOL _gs_display_reading_progress = NO;
|
|||
[_bottomView addSubview: _form];
|
||||
[_form release];
|
||||
|
||||
[[_form cellAtIndex:0] setAction: @selector(_performReturn:)];
|
||||
[[_form cellAtIndex:0] setTarget: self];
|
||||
|
||||
r = NSMakeRect (43, 6, 27, 27);
|
||||
button = [[NSButton alloc] initWithFrame: r];
|
||||
[button setBordered: YES];
|
||||
|
@ -213,7 +209,9 @@ static BOOL _gs_display_reading_progress = NO;
|
|||
[_okButton setBordered: YES];
|
||||
[_okButton setButtonType: NSMomentaryPushButton];
|
||||
[_okButton setTitle: @"OK"];
|
||||
[_okButton setImagePosition: NSNoImage];
|
||||
[_okButton setImagePosition: NSImageRight];
|
||||
[_okButton setImage: [NSImage imageNamed: @"common_ret"]];
|
||||
[_okButton setAlternateImage: [NSImage imageNamed: @"common_retH"]];
|
||||
[_okButton setTarget: self];
|
||||
[_okButton setAction: @selector(ok:)];
|
||||
[_okButton setEnabled: NO];
|
||||
|
@ -387,30 +385,6 @@ static BOOL _gs_display_reading_progress = NO;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) _performReturn: (id)sender
|
||||
{
|
||||
if ([_okButton isEnabled] == YES)
|
||||
{
|
||||
NSMatrix *matrix;
|
||||
int selectedColumn;
|
||||
|
||||
selectedColumn = [_browser selectedColumn];
|
||||
|
||||
if (selectedColumn != -1 && selectedColumn == [_browser lastColumn])
|
||||
{
|
||||
matrix = [_browser matrixInColumn: selectedColumn];
|
||||
|
||||
if ([[matrix selectedCell] isLeaf] == NO)
|
||||
{
|
||||
[_form abortEditing];
|
||||
[[_form cellAtIndex: 0] setStringValue: nil];
|
||||
}
|
||||
}
|
||||
|
||||
[_okButton performClick: self];
|
||||
}
|
||||
}
|
||||
|
||||
@end /* NSSavePanel (PrivateMethods) */
|
||||
|
||||
//
|
||||
|
@ -1194,10 +1168,9 @@ selectCellWithString: (NSString*)title
|
|||
case NSDownTextMovement:
|
||||
case NSLeftTextMovement:
|
||||
case NSRightTextMovement:
|
||||
[self selectText:self];
|
||||
return;
|
||||
|
||||
case NSReturnTextMovement:
|
||||
[NSApp postEvent:[self currentEvent]
|
||||
atStart:YES];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue