How can I check if a GtkWidget exists?

2012-07-20 Thread Frank Cox
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

Re: How can I check if a GtkWidget exists?

2012-07-20 Thread David Nečas
On Fri, Jul 20, 2012 at 12:50:45AM -0600, Frank Cox wrote: How can I check if a GtkWidget exists? By keeping track of it (either when you create and destroy the widgets or using weak references/weak pointers/destroy callbacks/...). ‘Checking the existence of a widget’ is, essentially, a

Re: How can I check if a GtkWidget exists?

2012-07-20 Thread Miroslav Rajcic
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

Re: How can I check if a GtkWidget exists?

2012-07-20 Thread David Nečas
On Fri, Jul 20, 2012 at 10:15:54AM +0200, Miroslav Rajcic wrote: Not sure, but perhaps GTK_IS_WIDGET(widget) macro would help. If you have the pointer to a GObject instance and want to know whether it is an instance of GtkWidget (including subclasses) then GTK_IS_WIDGET() is the right thing to

Re : How can I check if a GtkWidget exists?

2012-07-20 Thread Nicolas SOUBEIRAN
Have you try g_object_add_weak_ref ? Weak references are used for notification when an object is finalized. Hope this helps. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Re : How can I check if a GtkWidget exists?

2012-07-20 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/20/2012 11:54 AM, Nicolas SOUBEIRAN wrote: Have you try g_object_add_weak_ref ? Weak references are used for notification when an object is finalized. Hope this helps. The GTK_IS_WIDGET macro is useful as well. Kevin - -- Get my public

Unusual GTK error message

2012-07-20 Thread David Buchan
Background info: My program uses a file chooser dialog. I compiled it for the first time today on a 64-bit machine with Ubuntu 12.04 64-bit with gtk-3-dev. My program is run as root. I've been using it extensively on 32-bit machine with libtgtk2.0-dev and Ubuntu 10.04 with no errors. When I

PS: Unusual GTK error message

2012-07-20 Thread David Buchan
Additional info: The first two errors appear when I press the Open button in the file chooser dialog. The third error appears when I close my program completely. Dave ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Unusual GTK error message

2012-07-20 Thread Frank Cox
On Fri, 20 Jul 2012 18:37:01 -0700 (PDT) David Buchan wrote: Any ideas? A google search comes up completely dry (!! when did that happen last? weird) as does a Yahoo search. Dead end, it would seem. I'm certainly not at all keen to muck around in /root/. You don't have a .local directory in