mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 19:40:38 +00:00
Add remaining changes contributed by testplant.
This commit is contained in:
parent
ac5b949f2a
commit
7023c7d06d
8 changed files with 43 additions and 16 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2021-10-27 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSPopUpButtonCell.m
|
||||
* Source/NSTabView.m
|
||||
* Source/NSTextContainer.m
|
||||
* Source/NSTextFieldCell.m
|
||||
* Source/NSTextField.m
|
||||
* Source/NSTextView.m
|
||||
* Source/NSWindowController.m: Remaining improvements and stability
|
||||
changes contributed by testplant.
|
||||
|
||||
2021-10-27 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/GSToolbarView.m: Toolbar fixes to prevent the index
|
||||
|
|
|
@ -123,7 +123,8 @@ static NSImage *_pbc_image[5];
|
|||
|
||||
[self _initMenu];
|
||||
[self setPullsDown: flag];
|
||||
_pbcFlags.usesItemFromMenu = YES;
|
||||
[self setAltersStateOfSelectedItem: YES];
|
||||
[self setUsesItemFromMenu: YES];
|
||||
[self setPreferredEdge: NSMaxYEdge];
|
||||
[self setArrowPosition: NSPopUpArrowAtCenter];
|
||||
|
||||
|
|
|
@ -570,6 +570,10 @@
|
|||
ASSIGN(_items, [aDecoder decodeObjectForKey: @"NSTabViewItems"]);
|
||||
[_items makeObjectsPerformSelector: @selector(_setTabView:) withObject: self];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN(_items, [NSMutableArray array]);
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSSelectedTabViewItem"])
|
||||
{
|
||||
// N.B.: As a side effect, this discards the subview frame
|
||||
|
|
|
@ -96,12 +96,12 @@ use bounds rectangle instead of frame? */
|
|||
NSDebugLLog(@"NSText", @"NSTextContainer initWithContainerSize");
|
||||
if (aSize.width < 0)
|
||||
{
|
||||
NSWarnMLog(@"given negative width");
|
||||
NSWarnMLog(@"given negative width: %f current: %f", aSize.width, _containerRect.size.width);
|
||||
aSize.width = 0;
|
||||
}
|
||||
if (aSize.height < 0)
|
||||
{
|
||||
NSWarnMLog(@"given negative height");
|
||||
NSWarnMLog(@"given negative height: %f current: %f", aSize.height, _containerRect.size.height);
|
||||
aSize.height = 0;
|
||||
}
|
||||
_layoutManager = nil;
|
||||
|
@ -246,12 +246,12 @@ framework intact.
|
|||
|
||||
if (aSize.width < 0)
|
||||
{
|
||||
NSWarnMLog(@"given negative width");
|
||||
NSWarnMLog(@"given negative width: %f current: %f", aSize.width, _containerRect.size.width);
|
||||
aSize.width = 0;
|
||||
}
|
||||
if (aSize.height < 0)
|
||||
{
|
||||
NSWarnMLog(@"given negative height");
|
||||
NSWarnMLog(@"given negative height: %f current: %f", aSize.height, _containerRect.size.height);
|
||||
aSize.height = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ static Class textFieldCellClass;
|
|||
*/
|
||||
- (BOOL) isSelectable
|
||||
{
|
||||
return [_cell isSelectable];
|
||||
return [_cell isSelectable] && [self isEnabled];
|
||||
}
|
||||
|
||||
/** <p>Sets whether the NSTextField's cell and the NSText object is editable.
|
||||
|
|
|
@ -250,10 +250,10 @@
|
|||
NSAttributedString *attrStr;
|
||||
|
||||
attrStr = [super _drawAttributedString];
|
||||
if (attrStr == nil)
|
||||
if ((attrStr == nil) || ([[attrStr string] length] == 0))
|
||||
{
|
||||
attrStr = [self placeholderAttributedString];
|
||||
if (attrStr == nil)
|
||||
if ((attrStr == nil) || ([[attrStr string] length] == 0))
|
||||
{
|
||||
NSString *string;
|
||||
NSDictionary *attributes;
|
||||
|
@ -286,6 +286,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) _updateFieldEditor: (NSText*)textObject
|
||||
{
|
||||
[super _updateFieldEditor: textObject];
|
||||
[textObject setDrawsBackground: _textfieldcell_draws_background];
|
||||
[textObject setBackgroundColor: _background_color];
|
||||
[textObject setTextColor: _text_color];
|
||||
}
|
||||
|
||||
- (BOOL) isOpaque
|
||||
{
|
||||
if (_textfieldcell_draws_background == NO
|
||||
|
|
|
@ -6466,13 +6466,15 @@ or add guards
|
|||
|
||||
- (void) _scheduleTextCheckingTimer
|
||||
{
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"GSDisableSpellCheckerServer"] == NO)
|
||||
{
|
||||
[_textCheckingTimer invalidate];
|
||||
_textCheckingTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
|
||||
target: self
|
||||
selector: @selector(_textCheckingTimerFired:)
|
||||
userInfo: [NSValue valueWithRect: [self visibleRect]]
|
||||
repeats: NO];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _scheduleTextCheckingInVisibleRectIfNeeded
|
||||
|
|
|
@ -282,6 +282,7 @@
|
|||
* Apple's implementation doesn't seem to deal with this case, and
|
||||
* crashes if isReleaseWhenClosed is set.
|
||||
*/
|
||||
if ([_window isReleasedWhenClosed])
|
||||
RETAIN(_window);
|
||||
[self setWindow: nil];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue