Em Dom, 2005-11-20 às 00:13 +0100, Luca Cavalli escreveu:
> On Sat, 2005-11-19 at 21:03 -0200, Marcus Reis wrote:
> > Hello, suppose the scenario that we have a GtkTable declared as global
> > variable. Inside that table we have 9 event boxes with 1 GtkImage packed
> > in each one. Now we have a function that must change properties from
> > some images that are inside event boxes or even destroy the boxes. I
> > have tried to achieve this with the following (unsuccessful) code:
> > 
> > 
> > #######################################################################
> > static void some_function()
> > {
> >     int x;
> >     GList *list;
> >     GtkWidget *event_box;
> > 
> >     list = gtk_container_get_children(GTK_CONTAINER (global_table));
> >     g_print("We have %d elements",(g_list_length(list)));
> >     event_box = GTK_WIDGET (g_list_nth(list, 0));
> >     gtk_widget_destroy(GTK_WIDGET (event_box));
> > }
> > #######################################################################
> > 
> > 
> 
> Hi,
> I think you should use g_list_nth_data instead of g_list_nth. The
> g_list_nth return the list element, not its content.
> 
> Luca
> 

This list is very good! Thanks Luca.


        

        
                
_______________________________________________________ 
Yahoo! Acesso Gr�tis: Internet r�pida e gr�tis. 
Instale o discador agora!
http://br.acesso.yahoo.com/

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to