GnomeMDI Bugs
- From: Ecmel Ercan <ecmel linux-turkey com>
- To: desktop-devel-list gnome org
- Subject: GnomeMDI Bugs
- Date: 03 Sep 2002 02:31:33 +0300
Hi,
I know the GnomeMDI framework is deprecated in Gnome 2.0 but I really
like the simplicity of the interface so I decided to work on it. But
when destroying the GnomeMDI (GtkObject) the program always crashes.
Also, when removing children, there is a warning about removing a
floating reference. I tracked down the problem and found a solution.
Since GnomeMDI is a GtkObject descendant it has a floating reference
when it is created and it does not get removed since it has never been
added in a container widget. If you call g_object_unref on it there
will be complications. In order to remove the floating reference (and
finalize the object) the following changes may help:
gnome-mdi.c
AROUND LINE 252
REMOVE:
// if (G_OBJECT (object)->ref_count > 0)
// g_object_unref(object);
ADD:
gtk_object_sink (GTK_OBJECT(object));
AROUND LINE 1466
REMOVE:
// g_object_unref(G_OBJECT(child));
ADD:
gtk_object_sink(GTK_OBJECT(child));
Best regards
Ecmel Ercan
PS. A bug has been submitted:
http://bugzilla.gnome.org/show_bug.cgi?id=92185
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]