To: alan.schmitt at inria.fr Cc: lablgtk at kaba.or.jp Subject: Re: setting the "upper" value of an adjustment In-Reply-To: <20011209180210.A11954 at alan-schm1p> References: <20011209180210.A11954 at alan-schm1p> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20011210151319H.garrigue at kurims.kyoto-u.ac.jp> Date: Mon, 10 Dec 2001 15:13:19 +0900 From: Jacques Garrigue Lines: 27 From: Alan Schmitt > I'm still converting my old GTK program, and I'm trying to deal with > this code: > GTK_ADJUSTMENT(delay_adjustment) -> upper = minutes_span; > which basically modifies the "upper" field of an adjustment. I have a strong feeling that it is not a good thing to do. What if you end up with "value" being greater than "upper"? Except special cases, you're not supposed to modify directly the members of a gtk object. > So I'm wondering if this is possible with lablgtk (looking at gData.mli, > it does not seem possible), or if the only choice consists of creating a > new adjustment (and thanking the GC for not having to deal with the old > one ;-) Since there is no function to change the bounds of an adjustment in in GTK+ itself, this would seem to be the right thing to do. Yet, this doesn't seem that clear: the documentation says that this is OK for the owner of an adjustment to change the bounds, then calling the "changed" signal. Does it mean that I should add a set_bounds functions, eventhough there is no such thing in GTK+ ? Jacques