From 91c3edba35f3405666232058ec44156c0646704f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 29 Sep 2020 07:03:02 -0400 Subject: [PATCH 1/8] NEWS: Updates --- NEWS | 56 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/NEWS b/NEWS index a2117d153b..3591bef4c5 100644 --- a/NEWS +++ b/NEWS @@ -1,19 +1,44 @@ Overview of Changes in GTK 3.99.2 ================================= +* GtkButton: + - Check coordinates for button releases + +* GtkColorChooser: + - Update the default palette + * GtkEntry: - Fix issues with Emoji insertion - Fix issues with dnd - Set correct hotspot for dnd icon +* GtkFileChooser: + - Fix a crash + - Fix setting unlisted filters + +* GtkFontChooser: + - Determine sample text based on font coverage (requires fontconfig) + - Allow filtering by language (requires fontconfig) + - Don't center the list + +* GtkMenuButton: + - Always use the direction property for the arrow + * GtkPasswordEntry: - Use non-pageable memory + - Add an ::activate signal + +* GtkRevealer: + - Fix clipping issues in the swing transitions + +* GtkScrolledWindow: + - Fix kinetic scrolling in X11 * GtkSearchEntry: - Don't handle forwarded events twice -* GtkPasswordEntry: - - Add an ::activate signal +* GtkStack: + - Add gtk_stack_add_child * GtkTextView: - Fix dnd @@ -22,30 +47,9 @@ Overview of Changes in GTK 3.99.2 - Make clickable links work again - Fix handling of anchored children -* GtkRevealer: - - Fix clipping issues in the swing transitions - -* GtkColorChooser: - - Update the default palette - -* GtkFileChooser: - - Fix a crash - - Fix setting unlisted filters - -* GtkFontChooser: - - Determine sample text based on font coverage - - Allow filtering by language - - Don't center the list - -* GtkStack: - - Add gtk_stack_add_child - * GtkVideo: - Make autoplay work -* GtkButton: - - Check coordinates for button releases - * CSS: - Allow more than 64 selectors per rule - Avoid some allocation overhead @@ -62,12 +66,15 @@ Overview of Changes in GTK 3.99.2 * GSK: - Add radial gradient nodes + - Add GskGLShader and shader nodes * GL renderer: - Fix clipping with projective transforms - Use linear interpolation for offscreen rendering with non-axis-aligned transforms - Fix texture caching to avoid size mismatches + - Avoid downloading GL textures when possible, + improving GtkGLArea performance * Vulkan renderer: - Fix swapchain creation @@ -77,6 +84,7 @@ Overview of Changes in GTK 3.99.2 * Wayland - Always ack configure to avoid jumping windows + - Use the primary-selection-unstable-v1 protocol * API cleanups: - Make filter and sorter constructors return exact types @@ -95,6 +103,7 @@ Overview of Changes in GTK 3.99.2 - Cosmetic improvements for several demos - Improve search in the sidebar - Add a Shadertoy demo + - Add a OpenGL transitions demo - Add an Emblem demo - Add a demo for input validation and error states - Add a demo for context menus @@ -114,6 +123,7 @@ Overview of Changes in GTK 3.99.2 French Galician German + Hebrew Hungarian Indonesian Italian From 3af249c0465b0fdb70d649eac11ccedb1100f2f5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:12:31 -0400 Subject: [PATCH 2/8] Silence a compiler warning These variables are not used anymore since commit 11e4a4696713bc. --- gtk/gtkeventcontrollerscroll.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index 8b67f4ca91..261d8bd21e 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -258,9 +258,6 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, direction = gdk_scroll_event_get_direction (event); if (direction == GDK_SCROLL_SMOOTH) { - GdkDevice *device = gdk_event_get_device (event); - GdkInputSource input_source = gdk_device_get_source (device); - gdk_scroll_event_get_deltas (event, &dx, &dy); if (!scroll->active) From 07c338b487aaceaad124e15568ee84a31444a9f1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:24:59 -0400 Subject: [PATCH 3/8] gsk: Document radial gradient api --- gsk/gskrendernodeimpl.c | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1a54bd972c..d2b0543741 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -624,6 +624,14 @@ gsk_repeating_radial_gradient_node_new (const graphene_rect_t *bounds, return node; } +/** + * gsk_radial_gradient_node_get_n_color_stops: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the number of color stops in the gradient. + * + * Returns: the number of color stops + */ gsize gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node) { @@ -632,6 +640,15 @@ gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node) return self->n_stops; } +/** + * gsk_radial_gradient_node_peek_color_stops: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * @n_stops: (out) (optional): the number of color stops in the returned array + * + * Retrieves the color stops in the gradient. + * + * Returns: (array length=n_stops): the color stops in the gradient + */ const GskColorStop * gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, gsize *n_stops) @@ -644,6 +661,14 @@ gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, return self->stops; } +/** + * gsk_radial_gradient_node_peek_center: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the center pointer for the gradient. + * + * Returns: the center point for the gradient + */ const graphene_point_t * gsk_radial_gradient_node_peek_center (GskRenderNode *node) { @@ -652,6 +677,14 @@ gsk_radial_gradient_node_peek_center (GskRenderNode *node) return &self->center; } +/** + * gsk_radial_gradient_node_get_hradius: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the horizonal radius for the gradient. + * + * Returns: the horizontal radius for the gradient + */ float gsk_radial_gradient_node_get_hradius (GskRenderNode *node) { @@ -660,6 +693,14 @@ gsk_radial_gradient_node_get_hradius (GskRenderNode *node) return self->hradius; } +/** + * gsk_radial_gradient_node_get_vradius: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the vertical radius for the gradient. + * + * Returns: the vertical radius for the gradient + */ float gsk_radial_gradient_node_get_vradius (GskRenderNode *node) { @@ -668,6 +709,14 @@ gsk_radial_gradient_node_get_vradius (GskRenderNode *node) return self->vradius; } +/** + * gsk_radial_gradient_node_get_start: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the start value for the gradient. + * + * Returns: the start value for the gradient + */ float gsk_radial_gradient_node_get_start (GskRenderNode *node) { @@ -676,6 +725,14 @@ gsk_radial_gradient_node_get_start (GskRenderNode *node) return self->start; } +/** + * gsk_radial_gradient_node_get_end: + * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient + * + * Retrieves the end value for the gradient. + * + * Returns: the end value for the gradient + */ float gsk_radial_gradient_node_get_end (GskRenderNode *node) { From 165768b6ad87ba866904291e2611c63676b612de Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:28:09 -0400 Subject: [PATCH 4/8] wayland: Match header and doc arguments gtk-doc doesn't take this lightly. --- gdk/wayland/gdkwaylanddevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/wayland/gdkwaylanddevice.h b/gdk/wayland/gdkwaylanddevice.h index f07662bec3..f92e19384a 100644 --- a/gdk/wayland/gdkwaylanddevice.h +++ b/gdk/wayland/gdkwaylanddevice.h @@ -60,8 +60,8 @@ const char *gdk_wayland_device_get_node_path (GdkDevice *device); GDK_AVAILABLE_IN_ALL void gdk_wayland_device_pad_set_feedback (GdkDevice *device, - GdkDevicePadFeature element, - guint idx, + GdkDevicePadFeature feature, + guint feature_idx, const char *label); G_END_DECLS From f1299410bf845d8395998af5afdf5cfc03462a84 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:43:17 -0400 Subject: [PATCH 5/8] docs: Fix a typo --- docs/reference/gtk/gtk4-sections.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 352c9d26e1..7ec0bee4c7 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4741,7 +4741,7 @@ gtk_is_initialized GTK_PRIORITY_RESIZE -GtkDebugFlag +GtkDebugFlags gtk_get_debug_flags gtk_set_debug_flags From c897daf797e92fe8fd69e154a6ab9590df1b7b39 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:43:27 -0400 Subject: [PATCH 6/8] snapshot: Document radial gradient apis --- gtk/gtksnapshot.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index ab19aa8ac1..ec05df7cc3 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -2179,6 +2179,20 @@ gtk_snapshot_append_repeating_linear_gradient (GtkSnapshot *snapshot, gtk_snapshot_append_node_internal (snapshot, node); } +/** + * gtk_snapshot_append_radial_gradient: + * @snapshot: a #GtkSnapshot + * @bounds: the rectangle to render the readial gradient into + * @center: the center point for the radial gradient + * @hradius: the horizontal radius + * @vradius: the vertical radius + * @start: the start position (on the horizontal axis) + * @end: the end position (on the horizontal axis) + * @stops: (array length=n_stops): a pointer to an array of #GskColorStop defining the gradient + * @n_stops: the number of elements in @stops + * + * Appends a radial gradient node with the given stops to @snapshot. + */ void gtk_snapshot_append_radial_gradient (GtkSnapshot *snapshot, const graphene_rect_t *bounds, @@ -2217,6 +2231,20 @@ gtk_snapshot_append_radial_gradient (GtkSnapshot *snapshot, gtk_snapshot_append_node_internal (snapshot, node); } +/** + * gtk_snapshot_append_repeating_radial_gradient: + * @snapshot: a #GtkSnapshot + * @bounds: the rectangle to render the readial gradient into + * @center: the center point for the radial gradient + * @hradius: the horizontal radius + * @vradius: the vertical radius + * @start: the start position (on the horizontal axis) + * @end: the end position (on the horizontal axis) + * @stops: (array length=n_stops): a pointer to an array of #GskColorStop defining the gradient + * @n_stops: the number of elements in @stops + * + * Appends a repeating radial gradient node with the given stops to @snapshot. + */ void gtk_snapshot_append_repeating_radial_gradient (GtkSnapshot *snapshot, const graphene_rect_t *bounds, From aac94141170e57fb2f4d1575aaf0b3c4e131da01 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:43:42 -0400 Subject: [PATCH 7/8] statusbar: Remove a misleading doc comment --- gtk/gtkstatusbar.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c index b599964137..addb48eef4 100644 --- a/gtk/gtkstatusbar.c +++ b/gtk/gtkstatusbar.c @@ -489,15 +489,7 @@ gtk_statusbar_remove_all (GtkStatusbar *statusbar, } } -/* < private > - * gtk_statusbar_get_message_area: - * @statusbar: a #GtkStatusbar - * - * Retrieves the box containing the label widget. - * - * Returns: (type Gtk.Box) (transfer none): a #GtkBox - */ -const char* +const char * gtk_statusbar_get_message (GtkStatusbar *statusbar) { g_return_val_if_fail (GTK_IS_STATUSBAR (statusbar), NULL); From 4a2c817690fc2c91fd16ff8515df4d501e119b3f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Sep 2020 22:52:35 -0400 Subject: [PATCH 8/8] docs: Document various entry ::activate signals --- gtk/gtkentry.c | 8 ++++++++ gtk/gtkpasswordentry.c | 8 ++++++++ gtk/gtksearchentry.c | 8 ++++++++ gtk/gtktext.c | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 4c41a3e34e..3d058bad27 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -941,6 +941,14 @@ gtk_entry_class_init (GtkEntryClass *class) g_object_class_override_property (gobject_class, PROP_EDITING_CANCELED, "editing-canceled"); gtk_editable_install_properties (gobject_class, PROP_EDITING_CANCELED + 1); + /** + * GtkEntry:activate: + * @self: The widget on which the signal is emitted + * + * The ::activate signal is forwarded from the + * #GtkText::activated signal, which is a keybinding + * signal for all forms of the Enter key. + */ signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (gobject_class), diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c index 216ae2d915..ec8d08b119 100644 --- a/gtk/gtkpasswordentry.c +++ b/gtk/gtkpasswordentry.c @@ -452,6 +452,14 @@ gtk_password_entry_class_init (GtkPasswordEntryClass *klass) g_object_class_install_properties (object_class, NUM_PROPERTIES, props); gtk_editable_install_properties (object_class, NUM_PROPERTIES); + /** + * GtkPasswordEntry:activate: + * @self: The widget on which the signal is emitted + * + * The ::activate signal is forwarded from the + * #GtkText::activated signal, which is a keybinding + * signal for all forms of the Enter key. + */ signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (object_class), diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c index 80304901b6..4960c98941 100644 --- a/gtk/gtksearchentry.c +++ b/gtk/gtksearchentry.c @@ -295,6 +295,14 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass) g_object_class_install_properties (object_class, NUM_PROPERTIES, props); gtk_editable_install_properties (object_class, NUM_PROPERTIES); + /** + * GtkSearchEntry:activate: + * @self: The widget on which the signal is emitted + * + * The ::activate signal is forwarded from the + * #GtkText::activated signal, which is a keybinding + * signal for all forms of the Enter key. + */ signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (object_class), diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 2d13cd245b..da11cffe9b 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -949,7 +949,7 @@ gtk_text_class_init (GtkTextClass *class) /** * GtkText::activate: - * @self: The self on which the signal is emitted + * @self: The widget on which the signal is emitted * * The ::activate signal is emitted when the user hits * the Enter key.