summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/migrating-2to3.xml
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-09-26 22:29:33 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-09-26 22:29:33 -0400
commit87e29c99d72e480149d7b9c66d070d8d60d3fbef (patch)
tree34809596f64308e696a73a3af80c43b1ab4e88dd /docs/reference/gtk/migrating-2to3.xml
parentb81de973af1fc69875c25400f39f7237d4262350 (diff)
downloadgtk+-87e29c99d72e480149d7b9c66d070d8d60d3fbef.tar.gz
Add a migration guide section on GtkObject
Diffstat (limited to 'docs/reference/gtk/migrating-2to3.xml')
-rw-r--r--docs/reference/gtk/migrating-2to3.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml
index a91897af57..ab883c730c 100644
--- a/docs/reference/gtk/migrating-2to3.xml
+++ b/docs/reference/gtk/migrating-2to3.xml
@@ -585,6 +585,35 @@ gtk_arrow_draw (GtkWidget *widget,
value, you will have explicitly set it explicitly.
</para>
</section>
+
+ <section>
+ <title>GtkObject is gone</title>
+
+ <para>
+ GtkObject has been removed in GTK+ 3. Its remaining functionality,
+ the ::destroy signal, has been moved to GtkWidget. If you have non-widget
+ classes that are directly derived from GtkObject, you have to make
+ them derive from #GInitiallyUnowned (or, if you don't need the floating
+ functionality, #GObject). If you have widgets that override the
+ destroy class handler, you have to adust your class_init function,
+ since destroy is now a member of GtkWidgetClass:
+ <informalexample><programlisting>
+ GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
+
+ object_class->destroy = my_destroy;
+ </programlisting></informalexample>
+ becomes
+ <informalexample><programlisting>
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+
+ widget_class->destroy = my_destroy;
+ </programlisting></informalexample>
+ In the unlikely case that you have a non-widget class that is derived
+ from GtkObject and makes use of the destroy functionality, you have
+ to implement ::destroy yourself.
+ </para>
+ </section>
+
<section>
<title>Prevent mixed linkage</title>
<para>