Hello,
I would like to have someone help me with following situation.
I wrote a few custom widgets such as bao_model, and bao_model_container with ui
files. These widgets work well in some environments such as
static void project_setup(GSimpleAction *action, GVariant *parameter, gpointer
window)
{
GtkWidget *test;
test= bao_model_container_new ();
test = bao_model_new ();
test = bao_assistant_new ();
}
However, when I use these custom widgets with gtkdialog, following error occurs
Gtk-CRITICAL **: _gtk_builder_extend_with_template: assertion 'buffer &&
buffer[0]' failed. My code is as follows.
static void project_setup(GSimpleAction *action, GVariant *parameter, gpointer
window)
{
GtkWidget *test;
BaoAppProject *dialog;
BaoAppWindowPrivate *priv;
priv = bao_app_window_get_instance_private(window);
dialog = bao_app_project_new(BAO_APP_WINDOW(window));
gtk_window_present(GTK_WINDOW(dialog));
/*the program is waiting for the "response" signal*/
gint response_id = gtk_dialog_run(GTK_DIALOG(dialog));
switch(response_id)
{
case GTK_RESPONSE_APPLY:
//test= bao_model_container_new ();
test = bao_model_new ();
//test = bao_assistant_new ();
// test = gtk_label_new("my test"); // works
break;
default:
g_print("default Id: %d \n", response_id);
break;
}
}
All custom widgets have the same error when they are run separately or
together. When I use other gtkwidget such as gtklabel, they are fine. I do not
know why the error occurs and how to revise them. Any comments and suggests
will be appreciated.
Thanks,
Song
_______________________________________________
gtk-app-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list