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>
|
2021-10-27 Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Source/GSToolbarView.m: Toolbar fixes to prevent the index
|
* Source/GSToolbarView.m: Toolbar fixes to prevent the index
|
||||||
|
|
|
@ -123,7 +123,8 @@ static NSImage *_pbc_image[5];
|
||||||
|
|
||||||
[self _initMenu];
|
[self _initMenu];
|
||||||
[self setPullsDown: flag];
|
[self setPullsDown: flag];
|
||||||
_pbcFlags.usesItemFromMenu = YES;
|
[self setAltersStateOfSelectedItem: YES];
|
||||||
|
[self setUsesItemFromMenu: YES];
|
||||||
[self setPreferredEdge: NSMaxYEdge];
|
[self setPreferredEdge: NSMaxYEdge];
|
||||||
[self setArrowPosition: NSPopUpArrowAtCenter];
|
[self setArrowPosition: NSPopUpArrowAtCenter];
|
||||||
|
|
||||||
|
|
|
@ -570,6 +570,10 @@
|
||||||
ASSIGN(_items, [aDecoder decodeObjectForKey: @"NSTabViewItems"]);
|
ASSIGN(_items, [aDecoder decodeObjectForKey: @"NSTabViewItems"]);
|
||||||
[_items makeObjectsPerformSelector: @selector(_setTabView:) withObject: self];
|
[_items makeObjectsPerformSelector: @selector(_setTabView:) withObject: self];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ASSIGN(_items, [NSMutableArray array]);
|
||||||
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSSelectedTabViewItem"])
|
if ([aDecoder containsValueForKey: @"NSSelectedTabViewItem"])
|
||||||
{
|
{
|
||||||
// N.B.: As a side effect, this discards the subview frame
|
// 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");
|
NSDebugLLog(@"NSText", @"NSTextContainer initWithContainerSize");
|
||||||
if (aSize.width < 0)
|
if (aSize.width < 0)
|
||||||
{
|
{
|
||||||
NSWarnMLog(@"given negative width");
|
NSWarnMLog(@"given negative width: %f current: %f", aSize.width, _containerRect.size.width);
|
||||||
aSize.width = 0;
|
aSize.width = 0;
|
||||||
}
|
}
|
||||||
if (aSize.height < 0)
|
if (aSize.height < 0)
|
||||||
{
|
{
|
||||||
NSWarnMLog(@"given negative height");
|
NSWarnMLog(@"given negative height: %f current: %f", aSize.height, _containerRect.size.height);
|
||||||
aSize.height = 0;
|
aSize.height = 0;
|
||||||
}
|
}
|
||||||
_layoutManager = nil;
|
_layoutManager = nil;
|
||||||
|
@ -246,12 +246,12 @@ framework intact.
|
||||||
|
|
||||||
if (aSize.width < 0)
|
if (aSize.width < 0)
|
||||||
{
|
{
|
||||||
NSWarnMLog(@"given negative width");
|
NSWarnMLog(@"given negative width: %f current: %f", aSize.width, _containerRect.size.width);
|
||||||
aSize.width = 0;
|
aSize.width = 0;
|
||||||
}
|
}
|
||||||
if (aSize.height < 0)
|
if (aSize.height < 0)
|
||||||
{
|
{
|
||||||
NSWarnMLog(@"given negative height");
|
NSWarnMLog(@"given negative height: %f current: %f", aSize.height, _containerRect.size.height);
|
||||||
aSize.height = 0;
|
aSize.height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ static Class textFieldCellClass;
|
||||||
*/
|
*/
|
||||||
- (BOOL) isSelectable
|
- (BOOL) isSelectable
|
||||||
{
|
{
|
||||||
return [_cell isSelectable];
|
return [_cell isSelectable] && [self isEnabled];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** <p>Sets whether the NSTextField's cell and the NSText object is editable.
|
/** <p>Sets whether the NSTextField's cell and the NSText object is editable.
|
||||||
|
|
|
@ -250,10 +250,10 @@
|
||||||
NSAttributedString *attrStr;
|
NSAttributedString *attrStr;
|
||||||
|
|
||||||
attrStr = [super _drawAttributedString];
|
attrStr = [super _drawAttributedString];
|
||||||
if (attrStr == nil)
|
if ((attrStr == nil) || ([[attrStr string] length] == 0))
|
||||||
{
|
{
|
||||||
attrStr = [self placeholderAttributedString];
|
attrStr = [self placeholderAttributedString];
|
||||||
if (attrStr == nil)
|
if ((attrStr == nil) || ([[attrStr string] length] == 0))
|
||||||
{
|
{
|
||||||
NSString *string;
|
NSString *string;
|
||||||
NSDictionary *attributes;
|
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
|
- (BOOL) isOpaque
|
||||||
{
|
{
|
||||||
if (_textfieldcell_draws_background == NO
|
if (_textfieldcell_draws_background == NO
|
||||||
|
|
|
@ -6466,13 +6466,15 @@ or add guards
|
||||||
|
|
||||||
- (void) _scheduleTextCheckingTimer
|
- (void) _scheduleTextCheckingTimer
|
||||||
{
|
{
|
||||||
[_textCheckingTimer invalidate];
|
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"GSDisableSpellCheckerServer"] == NO)
|
||||||
_textCheckingTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
|
{
|
||||||
target: self
|
[_textCheckingTimer invalidate];
|
||||||
selector: @selector(_textCheckingTimerFired:)
|
_textCheckingTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
|
||||||
userInfo: [NSValue valueWithRect: [self visibleRect]]
|
target: self
|
||||||
repeats: NO];
|
selector: @selector(_textCheckingTimerFired:)
|
||||||
|
userInfo: [NSValue valueWithRect: [self visibleRect]]
|
||||||
|
repeats: NO];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _scheduleTextCheckingInVisibleRectIfNeeded
|
- (void) _scheduleTextCheckingInVisibleRectIfNeeded
|
||||||
|
|
|
@ -282,7 +282,8 @@
|
||||||
* Apple's implementation doesn't seem to deal with this case, and
|
* Apple's implementation doesn't seem to deal with this case, and
|
||||||
* crashes if isReleaseWhenClosed is set.
|
* crashes if isReleaseWhenClosed is set.
|
||||||
*/
|
*/
|
||||||
RETAIN(_window);
|
if ([_window isReleasedWhenClosed])
|
||||||
|
RETAIN(_window);
|
||||||
[self setWindow: nil];
|
[self setWindow: nil];
|
||||||
|
|
||||||
[_document _removeWindowController: self];
|
[_document _removeWindowController: self];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue