mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSTextView.m (setSelectedRange:): Do not make the selected text visible.
(-didChangeText,-checkSpelling:): Make the selected text visible. * Source/NSTextView_actions.m (_moveTo:select:): Ditto. * Source/NSCell.m (-setUpFieldEditorAttributes:): Ditto. (-selectWithFrame:inView:editor:delegate:start:length:): Ditto. * Source/NSComboBoxCell (-validateSelection:,-textDidChange:): Ditto. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20575 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0a62f93891
commit
4f18a708bf
5 changed files with 20 additions and 17 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-01-18 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/NSTextView.m (setSelectedRange:): Do not make the selected text visible.
|
||||
(-didChangeText,-checkSpelling:): Make the selected text visible.
|
||||
* Source/NSTextView_actions.m (_moveTo:select:): Ditto.
|
||||
* Source/NSCell.m (-setUpFieldEditorAttributes:): Ditto.
|
||||
(-selectWithFrame:inView:editor:delegate:start:length:): Ditto.
|
||||
* Source/NSComboBoxCell (-validateSelection:,-textDidChange:): Ditto.
|
||||
|
||||
2005-01-18 14:09 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/Functions.m (NSDottedFrameRect, NSFrameRectWithWidth): Draw
|
||||
|
|
|
@ -888,6 +888,7 @@ static NSColor *shadowCol;
|
|||
[textObject setRichText: _cell.is_rich_text];
|
||||
[textObject setImportsGraphics: _cell.imports_graphics];
|
||||
[textObject setSelectedRange: NSMakeRange(0, 0)];
|
||||
[textObject scrollRangeToVisible: NSMakeRange(0, 0)];
|
||||
|
||||
return textObject;
|
||||
}
|
||||
|
@ -1903,6 +1904,7 @@ static NSColor *shadowCol;
|
|||
|
||||
[textObject sizeToFit];
|
||||
[textObject setSelectedRange: NSMakeRange (selStart, selLength)];
|
||||
[textObject scrollRangeToVisible: NSMakeRange(selStart, selLength)];
|
||||
[textObject setDelegate: anObject];
|
||||
[[controlView window] makeFirstResponder: textObject];
|
||||
}
|
||||
|
|
|
@ -720,8 +720,9 @@ static GSComboWindow *gsWindow = nil;
|
|||
|
||||
if (textObject != nil)
|
||||
{
|
||||
[textObject setSelectedRange:
|
||||
NSMakeRange(0, [[textObject string] length])];
|
||||
NSRange selectionRange = NSMakeRange(0, [[textObject string] length]);
|
||||
[textObject setSelectedRange: selectionRange];
|
||||
[textObject scrollRangeToVisible: selectionRange];
|
||||
}
|
||||
|
||||
[cv sendAction: [_cell action] to: [_cell target]];
|
||||
|
@ -1798,6 +1799,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
location = myStringLength;
|
||||
length = [more length] - location;
|
||||
[textObject setSelectedRange: NSMakeRange(location, length)];
|
||||
[textObject scrollRangeToVisible: NSMakeRange(location, length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2215,6 +2215,7 @@ After each user-induced change, this method should be called.
|
|||
*/
|
||||
-(void) didChangeText
|
||||
{
|
||||
[self scrollRangeToVisible: [self selectedRange]];
|
||||
[notificationCenter postNotificationName: NSTextDidChangeNotification
|
||||
object: _notifObject];
|
||||
|
||||
|
@ -2940,21 +2941,6 @@ afterString in order over charRange.
|
|||
{
|
||||
NSRange overlap;
|
||||
|
||||
if (stillSelectingFlag == NO)
|
||||
{
|
||||
/*
|
||||
TODO: should we really do this here?
|
||||
|
||||
Make the insertion point (or the moving endpoint of the selection)
|
||||
visible.
|
||||
*/
|
||||
if (affinity == NSSelectionAffinityUpstream)
|
||||
[self scrollRangeToVisible: charRange];
|
||||
else
|
||||
[self scrollRangeToVisible:
|
||||
NSMakeRange(charRange.location + charRange.length, 0)];
|
||||
}
|
||||
|
||||
/*
|
||||
If this call is caused by text being deleted, oldDisplayedRange might
|
||||
extend outside the current text. We clamp it to the current length here
|
||||
|
@ -3609,6 +3595,7 @@ shouldRemoveMarker: (NSRulerMarker *)marker
|
|||
if (errorRange.length)
|
||||
{
|
||||
[self setSelectedRange: errorRange];
|
||||
[self scrollRangeToVisible: errorRange];
|
||||
|
||||
misspelledWord = [[self string] substringFromRange: errorRange];
|
||||
[sp updateSpellingPanelWithMisspelledWord: misspelledWord];
|
||||
|
|
|
@ -691,17 +691,20 @@ added to the selection (1,3).
|
|||
[self setSelectedRange: NSMakeRange(anchor, cindex - anchor)
|
||||
affinity: NSSelectionAffinityDownstream
|
||||
stillSelecting: NO];
|
||||
[self scrollRangeToVisible: NSMakeRange(anchor, cindex - anchor)];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setSelectedRange: NSMakeRange(cindex, anchor - cindex)
|
||||
affinity: NSSelectionAffinityUpstream
|
||||
stillSelecting: NO];
|
||||
[self scrollRangeToVisible: NSMakeRange(cindex, anchor - cindex)];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setSelectedRange: NSMakeRange(cindex, 0)];
|
||||
[self scrollRangeToVisible: NSMakeRange(cindex, 0)];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue