On 7/20/2012 8:50 AM, Frank Cox wrote:
How can I check if a GtkWidget exists?

I am planning to create and destroy widgets in a window depending on the user's
selections, but I can't figure out how to determine if a particular widget
already exists in the window so it won't be created twice or receive a
second deletion attempt if it's already gone.

I tried checking GTK_WIDGET_REALIZED but it appears that if the widget has
previously been destroyed then the GTK_WIDGET_REALIZED tries to access it
anyway and gives me an error.

Is there a way to determine if a widget is already in a window without having
to maintain my own table?

Not sure, but perhaps GTK_IS_WIDGET (widget) macro would help.

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

Reply via email to