From 65902367c62cc5f9f4d46472fff3f71b286d5c3d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 27 Jun 2020 17:28:15 -0400 Subject: [PATCH 1/2] builder: Documentation tweaks Don't use no-longer-existing enums as examples, and drop the +. --- gtk/gtkbuilder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 65bd1a2d6f..b97f0bdb27 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -108,7 +108,7 @@ * as %TRUE, strings like “FALSE”, “f”, “no”, “n”, “0” are interpreted * as %FALSE), enumerations (can be specified by their name, nick or * integer value), flags (can be specified by their name, nick, integer - * value, optionally combined with “|”, e.g. “GTK_VISIBLE|GTK_REALIZED”) + * value, optionally combined with “|”, e.g. “GTK_INPUT_HINT_EMOJI|GTK_INPUT_HINT_LOWERCASE”) * and colors (in a format understood by gdk_rgba_parse()). * * GVariants can be specified in the format understood by g_variant_parse(), @@ -131,7 +131,7 @@ * For more information see g_object_bind_property() * * Sometimes it is necessary to refer to widgets which have implicitly - * been constructed by GTK+ as part of a composite widget, to set + * been constructed by GTK as part of a composite widget, to set * properties on them or to add further children (e.g. the content area * of a #GtkDialog). This can be achieved by setting the “internal-child” * property of the `` element to a true value. Note that #GtkBuilder From 66bce08d10d55c11820e89ec2408b2784b1c4d42 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 27 Jun 2020 17:31:22 -0400 Subject: [PATCH 2/2] docs: Migration guide additions --- docs/reference/gtk/migrating-3to4.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index 93b28e1f40..47c097e2b5 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -457,6 +457,11 @@ as property. GtkNotebook and GtkAssistant are similar. gtk4-builder-tool can help with this conversion, with the --3to4 option of the simplify command. +### Adapt to GtkScrolledWindow API changes + +The constructor for GtkScrolledWindow no longer takes the adjustments +as arguments - these were almost always %NULL. + ### Adapt to GtkBin removal The abstract base class GtkBin for single-child containers has been @@ -940,3 +945,18 @@ You can replace calls to gtk_dialog_run() by specifying that the #GtkDialog must be modal using gtk_window_set_modal() or the %GTK_DIALOG_MODAL flag, and connecting to the #GtkDialog::response signal. + +## Changes to consider after the switch + +GTK 4 has a number of new features that you may want to take +advantage of once the dust has settled over the initial migration. + +### Consider porting to the new list widgets + +In GTK 2 and 3, GtkTreeModel and GtkCellRenderer and widgets using +these were the primary way of displaying data and lists. GTK 4 brings +a new family of widgets for this purpose that uses list models instead +of tree models, and widgets instead of cell renderers. + +To learn more about the new list widgets, you can read the [List Widget +Overview](#ListWidget).