Re: Could not find signal handler...
- From: David King <amigadave amigadave com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Could not find signal handler...
- Date: Wed, 11 Dec 2013 19:35:02 +0000
Hi Ken
On 2013-12-11 11:06, Ken Bass <daytooner gmail com> wrote:
/* Create new GtkBuilder object */
builder = gtk_builder_new();
if( ! gtk_builder_add_from_file( builder, UI_FILE, &error ) )
{
g_warning( "%s", error->message );
g_free( error );
return( 1 );
}
/* Connect signals */
gtk_builder_connect_signals( builder, NULL );
/* Destroy builder, since we don't need it anymore */
g_object_unref( G_OBJECT( builder ) );
/* Show window. All other widgets are automatically shown by GtkBuilder
*/
gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder,
"main_window"));)
It is probably unrelated, but note that you call g_object_unref() on
builder, and then use it again later when you call
gtk_builder_get_object(). You should move the g_object_unref() call to
after the last call that uses builder.
Also, you should use g_error_free() on error, rather than g_free().
--
http://amigadave.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]