I created a simple Glade xml file with a few pages using the Assistant. When
I attempt to load this via Gtkmm following the Glade builder examples. The
Gui does not draw the widgets described by glade.
I thought maybe this was due to Assistant not being recognized at a top
level, so I took the Assistant example class and attempted a simple test to
see if I could manually append a page and set it from the widgets inside of
the glade file.
example:
"
Gtk::HPaned * PtrHPaned1;
Gtk::VBox * PtrPage1VBox;
Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create();
try
{
//refBuilder->add_from_file("ExpGui2.glade");
builder->add_from_file("ltrace_assistant.glade");
}
catch(const Glib::FileError& ex)
{
std::cerr << "FileError: " << ex.what() << std::endl;
return ;
}
catch(const Gtk::BuilderError& ex)
{
std::cerr << "BuilderError: " << ex.what() << std::endl;
return ;
}
builder->get_widget( "vbox1" , PtrPage1Vbox);
builder->get_widget( "hpaned1" , PtrHPaned1);
append_page(*PtrPage1Vbox);
append_page(*PtrHPaned1);
set_page_complete(*PtrPage1Vbox, true);
set_page_complete(*PtrHPaned1,true);
set_page_type(*PtrPage1Vbox, Gtk::ASSISTANT_PAGE_INTRO);
set_page_type(*PtrHPaned1, Gtk::ASSISTANT_PAGE_CONFIRM);
"
When the assistant loads, it indicates assertions are failing with the VBox
and HPaned , expecting the parent == null. I can only assume this to be due
to how the builder creates the widgets.
these are the exact warnings I am seeing:
" Gtk-CRITICAL **: gtk_assistant_insert_page: assertion `page->parent ==
NULL' failed
Gtk-CRITICAL **: gtk_assistant_insert_page: assertion `page->parent ==
NULL' failed
Gtk-CRITICAL **: gtk_assistant_set_page_complete: assertion `child != NULL'
failed
Gtk-CRITICAL **: gtk_assistant_set_page_complete: assertion `child != NULL'
failed
Gtk-CRITICAL **: gtk_assistant_set_page_type: assertion `child != NULL'
failed
Gtk-CRITICAL **: gtk_assistant_set_page_type: assertion `child != NULL'
failed"
Besides from manually creating the pages like the example, has anyone else
experienced difficulties using a glade xml file with the Assistant?
Thank you for taking the time to provide me some insight and your
experiences using this widget.
Regards,
Josh Sinykin
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list