[gtk+] Add a migration guide section on GtkObject
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a migration guide section on GtkObject
- Date: Mon, 27 Sep 2010 02:30:52 +0000 (UTC)
commit 87e29c99d72e480149d7b9c66d070d8d60d3fbef
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Sep 26 22:29:33 2010 -0400
Add a migration guide section on GtkObject
docs/reference/gtk/migrating-2to3.xml | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml
index a91897a..ab883c7 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]