Some changes are done to the NSMenu and friends I am not really
sure about. Especially the changes relating to when
to call update/sizeToFit.
As it is now it does not work correctly, transient windows
have close buttons etcetera. In my opinion the methods
"update" and "sizeToFit" have two distinct purposes:
* update.
Update should be called when the "content" is changed
in order to give the gui component a change of being
aware of the change. This method should NOT redraw
the component.
* sizeToFit.
Is a more lowlevel call that will update sizes of itself,
subcomponents, enclosing components or a subset thereof
to accomodate the receiver component.
So I would say that it is ok to call "sizeToFit" from
"update" but not they other way around, as it is done
in the NSMenu stuff right now.
If nobody complains I will apply the following patch
shortly.
2003-03-30 Willem Rein Oudshoorn <[EMAIL PROTECTED]>
* Source/NSMenu.m: replaced ivar _changed by _needsSizing
([NSMenu -sizeToFit]): call [_view sizeToFit] instead of update
([NSMenu -displayTransient]): added call [_view update]
([NSMenu -closeTransient]): added [_view update]
* Source/NSMenuView.m: Reformatted to comply to coding standards
* Source/NSMenu.m: Reformatted to comply to coding standards
378c378
< BOOL _changed;
---
> BOOL _needsSizing;
320c320
< _changed = YES;
---
> _needsSizing = YES;
395c395
< _changed = YES;
---
> _needsSizing = YES;
467c467
< _changed = YES;
---
> _needsSizing = YES;
491c491
< _changed = YES;
---
> _needsSizing = YES;
817c817
< if (_changed && ([_aWindow isVisible] || [_bWindow isVisible]))
---
> if (_needsSizing && ([_aWindow isVisible] || [_bWindow isVisible]))
920c920
< _changed = YES;
---
> _needsSizing = YES;
1002,1003c1002,1003
< [_view update];
<
---
> [_view sizeToFit];
>
1041c1041
< _changed = NO;
---
> _needsSizing = NO;
1231,1232c1231,1232
<
< if (_changed)
---
>
> if (_needsSizing)
1299,1300c1299,1300
< // [_view update];
< if (_changed)
---
> [_view update];
> if (_needsSizing)
1387d1386
< [contentView setNeedsDisplay: YES];
1388a1388,1389
> [contentView setNeedsDisplay: YES];
>
1399a1401
> [_view update];
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep