From 312289fb1134c0bca3b439491740ec29a93de29f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Jun 2021 07:41:25 -0400 Subject: [PATCH 1/5] docs: Mention in migration guide Add another hint for what to do with child properties. Fixes: #3950 --- docs/reference/gtk/migrating-3to4.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index a97f9ea8bb..3e9d9ed0d1 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -804,6 +804,11 @@ by a layout manager (if they are layout-related), or handled in some other way. One possibility is to use child meta objects, as seen with [class@Gtk.AssistantPage], [class@Gtk.StackPage] and the like. +If you used to define child properties with in ui files, you have +to switch to using for the corresponding layout properties. +`gtk4-builder-tool` can help with this conversion, with the `--3to4` option +of the `simplify` command. + The replacements for gtk_container_add() are: | Widget | Replacement | From 4c9bd6ed9aefdf244d03df315078be718d060140 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Jun 2021 08:29:23 -0400 Subject: [PATCH 2/5] wayland: Add a comment I just had to debug this to rediscover how it works, so add a comment for next time. --- gdk/wayland/gdkdisplay-wayland.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 85c2002ba8..0dcfb09182 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1648,6 +1648,7 @@ static TranslationEntry translations[] = { { FALSE, "org.gnome.desktop.wm.preferences", "action-middle-click-titlebar", "gtk-titlebar-middle-click", G_TYPE_STRING, { .s = "none" } }, { FALSE, "org.gnome.desktop.wm.preferences", "action-right-click-titlebar", "gtk-titlebar-right-click", G_TYPE_STRING, { .s = "menu" } }, { FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } }, + /* Note, this setting doesn't exist, the portal and gsd fake it */ { FALSE, "org.gnome.fontconfig", "serial", "gtk-fontconfig-timestamp", G_TYPE_NONE, { .i = 0 } }, }; From e437c55142c0a1ed5cb774c186927a59f49cb9b9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Jun 2021 08:44:37 -0400 Subject: [PATCH 3/5] Add a doc comment for gsk_rounded_rect_is_circular --- gsk/gskroundedrect.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gsk/gskroundedrect.c b/gsk/gskroundedrect.c index 81a5b96e61..42df2bf06c 100644 --- a/gsk/gskroundedrect.c +++ b/gsk/gskroundedrect.c @@ -310,7 +310,17 @@ gsk_rounded_rect_scale_affine (GskRoundedRect *dest, } } -/* XXX: Find a better name */ +/* + * gsk_rounded_rect_is_circular: + * @self: the `GskRoundedRect` to check + * + * Checks if all corners of @self are quarter-circles (as + * opposed to quarter-ellipses). + * + * Note that different corners can still have different radii. + * + * Returns: %TRUE if the rectangle is circular. + */ gboolean gsk_rounded_rect_is_circular (const GskRoundedRect *self) { From 8f95661167d91378fed25e7ef9af31e48362cc13 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Jun 2021 08:58:12 -0400 Subject: [PATCH 4/5] Clean up some comments These XXX comments aren't useful enough to keep. --- gtk/gtkbuilderparser.c | 1 - gtk/gtkcellareaboxcontext.c | 1 - gtk/gtkcssenumvalue.c | 4 ++-- gtk/gtkcsskeyframes.c | 4 ++-- gtk/gtkcssnodedeclaration.c | 1 - gtk/gtkexpression.c | 1 - gtk/gtkiconview.c | 6 +++--- gtk/gtkroundedbox.c | 1 - 8 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index dcc8e75417..3f180b0f42 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -28,7 +28,6 @@ #include "gtkversion.h" #include "gdkprofilerprivate.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" #include diff --git a/gtk/gtkcellareaboxcontext.c b/gtk/gtkcellareaboxcontext.c index fc50547b25..19020041b2 100644 --- a/gtk/gtkcellareaboxcontext.c +++ b/gtk/gtkcellareaboxcontext.c @@ -25,7 +25,6 @@ #include "gtkcellareaboxcontextprivate.h" #include "gtkorientable.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" /* GObjectClass */ diff --git a/gtk/gtkcssenumvalue.c b/gtk/gtkcssenumvalue.c index d28daf5ac2..ce96a23e0c 100644 --- a/gtk/gtkcssenumvalue.c +++ b/gtk/gtkcssenumvalue.c @@ -268,7 +268,7 @@ gtk_css_value_font_size_compute (GtkCssValue *value, font_size = _gtk_css_number_value_get (parent_style->core->font_size, 100); else font_size = gtk_css_font_size_get_default_px (provider, style); - /* XXX: This is what WebKit does... */ + /* This is what WebKit does... */ font_size /= 1.2; break; case GTK_CSS_FONT_SIZE_LARGER: @@ -276,7 +276,7 @@ gtk_css_value_font_size_compute (GtkCssValue *value, font_size = _gtk_css_number_value_get (parent_style->core->font_size, 100); else font_size = gtk_css_font_size_get_default_px (provider, style); - /* XXX: This is what WebKit does... */ + /* This is what WebKit does... */ font_size *= 1.2; break; } diff --git a/gtk/gtkcsskeyframes.c b/gtk/gtkcsskeyframes.c index f66178cae4..33d71ef067 100644 --- a/gtk/gtkcsskeyframes.c +++ b/gtk/gtkcsskeyframes.c @@ -24,7 +24,6 @@ #include "gtkcssstylepropertyprivate.h" #include "gtkstylepropertyprivate.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" #include @@ -97,7 +96,8 @@ gtk_css_keyframes_add_keyframe (GtkCssKeyframes *keyframes, KEYFRAMES_VALUE (keyframes, k, p) = NULL; /* XXX: GC properties that are now unset - * in all keyframes? */ + * in all keyframes? + */ } return k; } diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c index 73d002a3fa..f170efc02b 100644 --- a/gtk/gtkcssnodedeclaration.c +++ b/gtk/gtkcssnodedeclaration.c @@ -19,7 +19,6 @@ #include "gtkcssnodedeclarationprivate.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" #include diff --git a/gtk/gtkexpression.c b/gtk/gtkexpression.c index 9e082ef008..8ff380a64f 100644 --- a/gtk/gtkexpression.c +++ b/gtk/gtkexpression.c @@ -22,7 +22,6 @@ #include "gtkexpression.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" #include diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 0c9a1add77..ac4589f12a 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -2002,7 +2002,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view, _gtk_icon_view_set_cell_data (icon_view, item); gtk_cell_area_activate (icon_view->priv->cell_area, context, GTK_WIDGET (icon_view), &item->cell_area, - 0 /* XXX flags */, TRUE); + 0, TRUE); } } @@ -2156,7 +2156,7 @@ gtk_icon_view_button_press (GtkGestureClick *gesture, _gtk_icon_view_set_cell_data (icon_view, item); gtk_cell_area_activate (icon_view->priv->cell_area, context, GTK_WIDGET (icon_view), - &item->cell_area, 0/* XXX flags */, FALSE); + &item->cell_area, 0, FALSE); } } else @@ -2489,7 +2489,7 @@ gtk_icon_view_real_activate_cursor_item (GtkIconView *icon_view) gtk_cell_area_activate (icon_view->priv->cell_area, context, GTK_WIDGET (icon_view), &icon_view->priv->cursor_item->cell_area, - 0 /* XXX flags */, + 0, FALSE); path = gtk_tree_path_new_from_indices (icon_view->priv->cursor_item->index, -1); diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index 74f3eb8655..44f8f8312c 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -23,7 +23,6 @@ #include "gtkcssnumbervalueprivate.h" #include "gtkcsstypesprivate.h" -/* XXX: For g_memdup2() */ #include "gtkprivate.h" #include From a4598567b9dd231b3bfd885bc59fdf453afe7433 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Jun 2021 09:47:26 -0400 Subject: [PATCH 5/5] icontheme: Add detail to the 'not found' message Name the icon theme we're using. Fixes: #2271 --- gtk/gtkicontheme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index c0b33c6761..208c36d715 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -2269,7 +2269,7 @@ real_choose_icon (GtkIconTheme *self, { GTK_NOTE(ICONFALLBACK, { char *s = g_strjoinv (", ", (char **)icon_names); - g_message ("No icon found for: %s", s); + g_message ("No icon found in %s (or fallbacks) for: %s", self->current_theme, s); g_free (s); }); icon = icon_paintable_new ("image-missing", size, scale);