Re: Adjustment problem



On Tue, 31 Oct 2006 12:44:45 -0600, Paul Davis wrote:

> This definitely looks to be a bug in gtk+ so far.
> 
> Doing the follow is a work around:
> 
> int main(int argc, char * argv[])
> {
>    Gtk::Main m(&argc, &argv);
> 
>    Gtk::Window w;
>    Gtk::Adjustment adj(25, 0, 100, 1, 10, 10);
>    adj.set_value( 25 ) ;
> 
>    Gtk::SpinButton spin(adj, 1, 0);
> 
>    w.add(spin);
>    w.show_all();
> 
>    m.run(w);
> 
>    return 0;
> }

Of course, one can set_value() explicitly, but I have dozens of spin
buttons. I guess I don't have a choice for Friday, do I? And probably
easier than rebuilding the packages anyway. 


> 
> I'm not entirely clear on how gtk+ properties work, but what I'm seeing in
> gtkadjustment.c is that the gtk_adjustment_new function is passing the
> values to the g_object_new as properties.  But when get/set_value is called,
> its using member variables of the gtkadjustment structure.

I saw that g_object_new is being called, but I didn't dig beyond that. 

> 
> I've added a couple lines to gtk+ to try and see if setting the structure
> values along with the property values will fix this.  After its done
> compiling I'll write to say if it worked or not.
> 

If it does, a patch would be nice. I downloaded the source and I'll try to
do it myself. 

> And if it does we'll have to register a bug with the gtk guys.
> 
> Paul
> 

By the way, which gtk+ is gtkmm-2.10.2 wrapping? I imagine it's
gtk+-2.10.2 but there is also gtk+ up to gtk+-2.10.6.

And if I rebuild gtk+, I have to rebuild gtkmm as well, and what else?


P.S. Are you posting to this list in plain text and HTML? 






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