[gtk+] Migration guide additions

commit 9795bd4c8c484bfe48f5abedb879b8eeb6d0e33c
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 29 22:48:26 2010 -0400

    Migration guide additions
    Add some information about expand flags and the scrollable interface.

 docs/reference/gtk/migrating-2to3.xml |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml
index 3d72934..7298151 100644
--- a/docs/reference/gtk/migrating-2to3.xml
+++ b/docs/reference/gtk/migrating-2to3.xml
@@ -509,6 +509,13 @@ gtk_fixed_get_preferred_height (GtkWidget *widget,
+        <listitem>Note that the get_preferred_width()/height() functions
+          only allow you do return one dimension at a time. If your
+          size_request() handler is doing things that involve both
+          width and height at the same time (e.g. limiting the aspect
+          ratio), you will have to implement get_preferred_height_for_width()
+          and get_preferred_width_for_height().
+        </listitem>
         <listitem>To make full use of the new capabilities of the
           height-for-width geometry management, you need to additionally
           implement the get_preferred_height_for_width() and
@@ -800,7 +807,21 @@ gtk_arrow_draw (GtkWidget *widget,
-    <title>GtkScrolledWindow policy</title>
+    <title>Check your expand flags</title>
+    <para>
+      The behaviour of expanding widgets has changed slightly in GTK+ 3,
+      compared to GTK+ 2.x. It is now 'inherited', i.e. a container that
+      has an expanding child is considered expanding itself. This is often
+      the desired behaviour. In places where you don't want this to happen,
+      setting the container explicity as not expanding will stop the
+      expand flag of the child from being inherited. See
+      gtk_widget_set_hexpand() and gtk_widget_set_vexpand().
+    </para>
+  </section>
+  <section>
+    <title>Scrolling changes</title>
       The default values for the #GtkScrolledWindow:hscrollbar-policy and
@@ -808,6 +829,14 @@ gtk_arrow_draw (GtkWidget *widget,
       'never' to 'automatic'. If your application was relying on the default
       value, you will have explicitly set it explicitly.
+    <para>
+      The ::set-scroll-adjustments signal on GtkWidget has been replaced
+      by the #GtkScrollable interface which must be implemented by a widget
+      that wants to be placed in a #GtkScrolledWindow. Instead of emitting
+      ::set-scroll-adjustments, the scrolled window simply sets the
+      #GtkScrollable::hadjustment and #GtkScrollable::vadjustment properties.
+    </para>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]