GtkBuilder tabbed application
- From: Andreas wass <wassa student chalmers se>
- To: gtkmm-list gnome org
- Subject: GtkBuilder tabbed application
- Date: Sat, 31 Jul 2010 18:01:09 +0200
Hi all!
I am developing an application that is using a tabbed interface. Each type of tab has a different look than the other (for instance one tab might display a TreeView, a bunch of Entry widgets and a couple of buttons and so on). There is no (at least for now) set limit on how many tabs of each kind a user might have open, which means the data in the Entry widgets and so on have to be preserved when switching tabs. The interface is all built up in a glade file.
The problem i have is that when i close a tab and then perform something other (drop down a menu for instance) I get a bunch of these errors and warnings:
(lobbase2:24831): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(lobbase2:24831): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'
(lobbase2:24831): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(lobbase2:24831): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(lobbase2:24831): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(lobbase2:24831): GLib-GObject-WARNING **: instance with invalid (NULL) class pointer
(lobbase2:24831): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(lobbase2:24831): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
And similar. This works for a while but eventually the program segfaults. The way i add a tab to my Notebook is through these steps:
create new Gtk::Builder
Load xml file in Builder
Get Container widget with content of tab and Label widget
Unparent both Container and Label widget
Append new page with container and label
Set current page to be newly added page.
When i close a tab I simply set set current page to prev page, then make a call to remove_page(*this) (Im doing the removal of the page from within the container itself).
Now If i dont create a new builder but rather use the one i created the main window with (that is also stored away i should say) i get no errors if i only add 1 tab of each type, but as soon as i add 2 tabs with the same name and then close both i start getting the same errors.
Any suggestions how i would go about solving this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]