Accessing a GtkTable's children.

2007-04-07 Thread Craig Pemberton
Hello everyone, I hope this is the proper place to post this! I am developing a graphical front-end for a diagnostics panel for an autonomous vehicle. I am fairly new to C++ and GTK. I've searched all over for the solution but maybe I'm looking for the wrong things. I cobbled together the

Re: Accessing a GtkTable's children.

2007-04-07 Thread Andrew Cowie
On Fri, 2007-04-06 at 23:45 -0700, Craig Pemberton wrote: GList *children = g_list_first(parent-children); For starters, you want gtk_container_get_children() From there, you might also double check you're using the GList API properly. AfC Sydney

Re: Accessing a GtkTable's children.

2007-04-07 Thread Craig Pemberton
Thank you so much Andrew! It is now working beautifully. The final code is below for anyone who may read this thread looking for the same fix. void on_toggletoolbutton_enable_toggled( GtkToggleToolButton *toggletoolbutton, gpointer user_data ) { GtkTable *parent = (GtkTable*)

Re: Accessing a GtkTable's children.

2007-04-07 Thread Craig Pemberton
I just discovered lookup_widget()! This makes life much easier. The code now looks like the following. I'm not sure if this is best, but I used it by getting the parent and then using lookup_widget() to look through it's children. I'm happy with this code now. Thanks again. //This event is

Looking for signal/callback design advice

2007-04-07 Thread Craig Pemberton
Hello Everyone, I am looking advice on how to structure the gtk application I am working on. I think that it lends itself very well to the signal/callback mechanism but I am not sure and would hate to waste time. The program is going to be a diagnostic heads up display for an autonomous

Re: Accessing a GtkTable's children.

2007-04-07 Thread Michael Torrie
On Sat, 2007-04-07 at 05:15 -0500, Craig Pemberton wrote: I just discovered lookup_widget()! This makes life much easier. The code now looks like the following. I'm not sure if this is best, but I used it by getting the parent and then using lookup_widget() to look through it's children.

Re: Accessing a GtkTable's children.

2007-04-07 Thread Jim George
On 4/7/07, Craig Pemberton [EMAIL PROTECTED] wrote: I just discovered lookup_widget()! If you're using lookup_widget(), that means you're using Glade's code generation, which is going away in glade 3. Use libglade instead, especially if you're not too far into your project. -Jim