bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recent changed in NSMenu and friends


From: Willem Rein Oudshoorn
Subject: Recent changed in NSMenu and friends
Date: 30 Mar 2003 15:44:15 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

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  <woudshoo@xs4all.nl>

        * 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

Attachment: NSMenu-h.diff
Description: changing ivar name

Attachment: NSMenu-m.diff
Description: Changing ivar + update/sizeToFit changes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]