summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-04-01 01:23:44 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-04-01 01:23:44 +0000
commit520b25e96c0ac1bf94423344c15f2a22db1afc94 (patch)
tree3255ebf68b01c5c71541711801b23e9bdb4613da
parent3458ebf8c93f839cbf33caa48cf39ec112f292a2 (diff)
parentf00b29f2c6b46ff13946f4668907c85669f531c3 (diff)
downloadgtk+-520b25e96c0ac1bf94423344c15f2a22db1afc94.tar.gz
Merge branch 'cherry-picks-for-4-10' into 'gtk-4-10'
scrolledwindow: Disconnect the right handler See merge request GNOME/gtk!5762
-rw-r--r--gdk/gdkdebugprivate.h4
-rw-r--r--gdk/gdkdisplaymanager.c17
-rw-r--r--gdk/gdkframeclock.c4
-rw-r--r--gdk/gdkpaintable.c10
-rw-r--r--gdk/gdkpaintable.h6
-rw-r--r--gdk/gdkpopup.c4
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c7
-rw-r--r--gdk/wayland/gdkpopup-wayland.c51
-rw-r--r--gsk/gskrendernodeparser.c24
-rw-r--r--gtk/deprecated/gtkcellarea.c2
-rw-r--r--gtk/deprecated/gtkfontchooser.c56
-rw-r--r--gtk/deprecated/gtkinfobar.c2
-rw-r--r--gtk/gtkbuildable.h2
-rw-r--r--gtk/gtkenums.h4
-rw-r--r--gtk/gtklabel.c2
-rw-r--r--gtk/gtkmagnifier.c6
-rw-r--r--gtk/gtkmain.c5
-rw-r--r--gtk/gtkpicture.c4
-rw-r--r--gtk/gtkscale.c48
-rw-r--r--gtk/gtkscrolledwindow.c2
-rw-r--r--gtk/gtkswitch.c6
-rw-r--r--gtk/gtktextview.c4
-rw-r--r--gtk/gtktogglebutton.c2
-rw-r--r--gtk/gtkwidget.c10
-rw-r--r--testsuite/gdk/display.c4
-rw-r--r--testsuite/gsk/meson.build3
-rw-r--r--testsuite/gsk/nodeparser/string-error.errors1
-rw-r--r--testsuite/gsk/nodeparser/string-error.node3
-rw-r--r--testsuite/gsk/nodeparser/string-error.ref.node6
29 files changed, 176 insertions, 123 deletions
diff --git a/gdk/gdkdebugprivate.h b/gdk/gdkdebugprivate.h
index c9baba28a7..dab4d890d2 100644
--- a/gdk/gdkdebugprivate.h
+++ b/gdk/gdkdebugprivate.h
@@ -60,7 +60,11 @@ GdkDebugFlags gdk_display_get_debug_flags (GdkDisplay *display);
void gdk_display_set_debug_flags (GdkDisplay *display,
GdkDebugFlags flags);
+#ifdef GLIB_USING_SYSTEM_PRINTF
+#define gdk_debug_message(format, ...) fprintf (stderr, format "\n", ##__VA_ARGS__)
+#else
#define gdk_debug_message(format, ...) g_fprintf (stderr, format "\n", ##__VA_ARGS__)
+#endif
#ifdef G_ENABLE_DEBUG
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
index 9efa471eea..6a767a5706 100644
--- a/gdk/gdkdisplaymanager.c
+++ b/gdk/gdkdisplaymanager.c
@@ -410,12 +410,19 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
{
const char *backend = backends[i];
gboolean any = g_str_equal (backend, "*");
+ gboolean found = FALSE;
if (!allow_any && !any && !strstr (allowed_backends, backend))
- continue;
+ {
+ GDK_DEBUG (MISC, "Skipping %s backend", backend);
+ continue;
+ }
for (j = 0; gdk_backends[j].name != NULL; j++)
{
+ if (g_str_equal (backend, gdk_backends[j].name))
+ found = TRUE;
+
if ((any && allow_any) ||
(any && strstr (allowed_backends, gdk_backends[j].name)) ||
g_str_equal (backend, gdk_backends[j].name))
@@ -423,9 +430,15 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
GDK_DEBUG (MISC, "Trying %s backend", gdk_backends[j].name);
display = gdk_backends[j].open_display (name);
if (display)
- break;
+ {
+ GDK_DEBUG (MISC, "Using %s display %s", gdk_backends[j].name, gdk_display_get_name (display));
+ break;
+ }
}
}
+
+ if (!found && !display)
+ g_warning ("No such backend: %s", backend);
}
g_strfreev (backends);
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c
index dccf5ffcb1..656849b411 100644
--- a/gdk/gdkframeclock.c
+++ b/gdk/gdkframeclock.c
@@ -48,7 +48,7 @@
* for the synchronization being implemented, the clock will process a frame and
* emit signals for each phase that has been requested. (See the signals of the
* `GdkFrameClock` class for documentation of the phases.
- * %GDK_FRAME_CLOCK_PHASE_UPDATE and the [signal@GdkFrameClock::update] signal
+ * %GDK_FRAME_CLOCK_PHASE_UPDATE and the [signal@Gdk.FrameClock::update] signal
* are most interesting for application writers, and are used to update the
* animations, using the frame time given by [method@Gdk.FrameClock.get_frame_time].
*
@@ -60,7 +60,7 @@
* are called at a “similar” time get the same value. This means that
* if different animations are timed by looking at the difference in
* time between an initial value from [method@Gdk.FrameClock.get_frame_time]
- * and the value inside the [signal@GdkFrameClock::update] signal of the clock,
+ * and the value inside the [signal@Gdk.FrameClock::update] signal of the clock,
* they will stay exactly synchronized.
*/
diff --git a/gdk/gdkpaintable.c b/gdk/gdkpaintable.c
index adba8b161b..94f3dc7a5d 100644
--- a/gdk/gdkpaintable.c
+++ b/gdk/gdkpaintable.c
@@ -50,7 +50,7 @@ void gtk_snapshot_pop (GdkSnapshot
* to do, it is suggested that you scale your paintable ignoring any potential
* aspect ratio.
*
- * The contents that a `GdkPaintable` produces may depend on the [class@GdkSnapshot]
+ * The contents that a `GdkPaintable` produces may depend on the [class@Gdk.Snapshot]
* passed to it. For example, paintables may decide to use more detailed images
* on higher resolution screens or when OpenGL is available. A `GdkPaintable`
* will however always produce the same output for the same snapshot.
@@ -58,7 +58,7 @@ void gtk_snapshot_pop (GdkSnapshot
* A `GdkPaintable` may change its contents, meaning that it will now produce
* a different output with the same snapshot. Once that happens, it will call
* [method@Gdk.Paintable.invalidate_contents] which will emit the
- * [signal@GdkPaintable::invalidate-contents] signal. If a paintable is known
+ * [signal@Gdk.Paintable::invalidate-contents] signal. If a paintable is known
* to never change its contents, it will set the %GDK_PAINTABLE_STATIC_CONTENTS
* flag. If a consumer cannot deal with changing contents, it may call
* [method@Gdk.Paintable.get_current_image] which will return a static
@@ -69,7 +69,7 @@ void gtk_snapshot_pop (GdkSnapshot
* can use this information to layout thepaintable appropriately. Just like the
* contents, the size of a paintable can change. A paintable will indicate this
* by calling [method@Gdk.Paintable.invalidate_size] which will emit the
- * [signal@GdkPaintable::invalidate-size] signal. And just like for contents,
+ * [signal@Gdk.Paintable::invalidate-size] signal. And just like for contents,
* if a paintable is known to never change its size, it will set the
* %GDK_PAINTABLE_STATIC_SIZE flag.
*
@@ -529,7 +529,7 @@ gdk_paintable_compute_concrete_size (GdkPaintable *paintable,
* the missing dimension is calculated from the present
* dimension and the intrinsic aspect ratio.
* Otherwise, the missing dimension is taken from the default
- * object size.
+ * object size.
*/
if (image_width)
*concrete_width = image_width;
@@ -559,7 +559,7 @@ gdk_paintable_compute_concrete_size (GdkPaintable *paintable,
* dimensions, the missing dimension is taken from the object's intrinsic
* dimensions.
* Otherwise, the missing dimension of the concrete object size is taken
- * from the default object size.
+ * from the default object size.
*/
if (specified_width)
{
diff --git a/gdk/gdkpaintable.h b/gdk/gdkpaintable.h
index 538ab0da46..92847a07e3 100644
--- a/gdk/gdkpaintable.h
+++ b/gdk/gdkpaintable.h
@@ -37,10 +37,10 @@ G_DECLARE_INTERFACE (GdkPaintable, gdk_paintable, GDK, PAINTABLE, GObject)
/**
* GdkPaintableFlags:
* @GDK_PAINTABLE_STATIC_SIZE: The size is immutable.
- * The [signal@GdkPaintable::invalidate-size] signal will never be
+ * The [signal@Gdk.Paintable::invalidate-size] signal will never be
* emitted.
* @GDK_PAINTABLE_STATIC_CONTENTS: The content is immutable.
- * The [signal@GdkPaintable::invalidate-contents] signal will never be
+ * The [signal@Gdk.Paintable::invalidate-contents] signal will never be
* emitted.
*
* Flags about a paintable object.
@@ -97,7 +97,7 @@ struct _GdkPaintableInterface
double height);
/* get the current contents in an immutable form (optional) */
GdkPaintable * (* get_current_image) (GdkPaintable *paintable);
-
+
/* get flags for potential optimizations (optional) */
GdkPaintableFlags (* get_flags) (GdkPaintable *paintable);
/* preferred width of paintable or 0 if it has no width (optional) */
diff --git a/gdk/gdkpopup.c b/gdk/gdkpopup.c
index 99dcbaa66e..1fd6bb6ff4 100644
--- a/gdk/gdkpopup.c
+++ b/gdk/gdkpopup.c
@@ -31,7 +31,7 @@
* The `GdkPopup` is positioned relative to its parent surface.
*
* `GdkPopup`s are typically used to implement menus and similar popups.
- * They can be modal, which is indicated by the [property@GdkPopup:autohide]
+ * They can be modal, which is indicated by the [property@Gdk.Popup:autohide]
* property.
*/
@@ -113,7 +113,7 @@ gdk_popup_default_init (GdkPopupInterface *iface)
* otherwise it will change position according to @layout.
*
* After calling this function, the result should be handled in response
- * to the [signal@GdkSurface::layout] signal being emitted. The resulting
+ * to the [signal@Gdk.Surface::layout] signal being emitted. The resulting
* popup position can be queried using [method@Gdk.Popup.get_position_x],
* [method@Gdk.Popup.get_position_y], and the resulting size will be sent as
* parameters in the layout signal. Use [method@Gdk.Popup.get_rect_anchor]
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index da0b9e8c0d..0dc9c72361 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -586,13 +586,6 @@ _gdk_wayland_display_open (const char *display_name)
GDK_DEBUG (MISC, "opening display %s", display_name ? display_name : "");
- /* If this variable is unset then wayland initialisation will surely
- * fail, logging a fatal error in the process. Save ourselves from
- * that.
- */
- if (g_getenv ("XDG_RUNTIME_DIR") == NULL)
- return NULL;
-
wl_log_set_handler_client (log_handler);
wl_display = wl_display_connect (display_name);
diff --git a/gdk/wayland/gdkpopup-wayland.c b/gdk/wayland/gdkpopup-wayland.c
index a79670aef2..4b150d1d30 100644
--- a/gdk/wayland/gdkpopup-wayland.c
+++ b/gdk/wayland/gdkpopup-wayland.c
@@ -398,7 +398,11 @@ gdk_wayland_popup_handle_configure (GdkWaylandSurface *wayland_surface)
g_warn_if_reached ();
if (wayland_popup->pending.has_repositioned_token)
- wayland_popup->received_reposition_token = wayland_popup->pending.repositioned_token;
+ {
+ wayland_popup->received_reposition_token =
+ wayland_popup->pending.repositioned_token;
+ wayland_popup->pending.has_repositioned_token = FALSE;
+ }
switch (wayland_popup->state)
{
@@ -743,9 +747,7 @@ create_dynamic_positioner (GdkWaylandPopup *wayland_popup,
GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
GdkRectangle geometry;
uint32_t constraint_adjustment = ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE;
- const GdkRectangle *anchor_rect;
- int real_anchor_rect_x, real_anchor_rect_y;
- int anchor_rect_width, anchor_rect_height;
+ GdkRectangle anchor_rect;
int rect_anchor_dx;
int rect_anchor_dy;
GdkGravity rect_anchor;
@@ -771,12 +773,24 @@ create_dynamic_positioner (GdkWaylandPopup *wayland_popup,
gdk_wayland_surface_get_window_geometry (surface->parent, &parent_geometry);
- anchor_rect = gdk_popup_layout_get_anchor_rect (layout);
- real_anchor_rect_x = anchor_rect->x - parent_geometry.x;
- real_anchor_rect_y = anchor_rect->y - parent_geometry.y;
+ anchor_rect = *gdk_popup_layout_get_anchor_rect (layout);
- anchor_rect_width = MAX (anchor_rect->width, 1);
- anchor_rect_height = MAX (anchor_rect->height, 1);
+ /* Wayland protocol requires that the anchor rect is specified
+ * wrt. to the parent geometry, and that it is non-empty and
+ * contained in the parent geometry.
+ */
+ if (!gdk_rectangle_intersect (&parent_geometry, &anchor_rect, &anchor_rect))
+ {
+ anchor_rect.x = 0;
+ anchor_rect.y = 0;
+ anchor_rect.width = 1;
+ anchor_rect.height = 1;
+ }
+ else
+ {
+ anchor_rect.x -= parent_geometry.x;
+ anchor_rect.y -= parent_geometry.y;
+ }
gdk_popup_layout_get_offset (layout, &rect_anchor_dx, &rect_anchor_dy);
@@ -797,10 +811,10 @@ create_dynamic_positioner (GdkWaylandPopup *wayland_popup,
xdg_positioner_set_size (positioner, geometry.width, geometry.height);
xdg_positioner_set_anchor_rect (positioner,
- real_anchor_rect_x,
- real_anchor_rect_y,
- anchor_rect_width,
- anchor_rect_height);
+ anchor_rect.x,
+ anchor_rect.y,
+ anchor_rect.width,
+ anchor_rect.height);
xdg_positioner_set_offset (positioner, rect_anchor_dx, rect_anchor_dy);
anchor = rect_anchor_to_anchor (rect_anchor);
@@ -851,10 +865,10 @@ create_dynamic_positioner (GdkWaylandPopup *wayland_popup,
zxdg_positioner_v6_set_size (positioner, geometry.width, geometry.height);
zxdg_positioner_v6_set_anchor_rect (positioner,
- real_anchor_rect_x,
- real_anchor_rect_y,
- anchor_rect_width,
- anchor_rect_height);
+ anchor_rect.x,
+ anchor_rect.y,
+ anchor_rect.width,
+ anchor_rect.height);
zxdg_positioner_v6_set_offset (positioner,
rect_anchor_dx,
rect_anchor_dy);
@@ -968,6 +982,9 @@ gdk_wayland_surface_create_xdg_popup (GdkWaylandPopup *wayland_popup,
g_assert_not_reached ();
}
+ wayland_popup->received_reposition_token = 0;
+ wayland_popup->reposition_token = 0;
+
gdk_popup_layout_get_shadow_width (layout,
&impl->shadow_left,
&impl->shadow_right,
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 6cceafcad7..ea2dca1e5b 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -128,6 +128,10 @@ parse_texture (GtkCssParser *parser,
}
else
{
+ g_set_error (&error,
+ GTK_CSS_PARSER_ERROR,
+ GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
+ "Failed to resolve URL");
texture = NULL;
}
}
@@ -229,8 +233,19 @@ parse_script (GtkCssParser *parser,
GFile *file;
file = gtk_css_parser_resolve_url (parser, url);
- bytes = g_file_load_bytes (file, NULL, NULL, &error);
- g_object_unref (file);
+ if (file)
+ {
+ bytes = g_file_load_bytes (file, NULL, NULL, &error);
+ g_object_unref (file);
+ }
+ else
+ {
+ g_set_error (&error,
+ GTK_CSS_PARSER_ERROR,
+ GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
+ "Failed to resolve URL");
+ bytes = NULL;
+ }
}
g_free (scheme);
@@ -416,7 +431,10 @@ parse_string (GtkCssParser *parser,
token = gtk_css_parser_get_token (parser);
if (!gtk_css_token_is (token, GTK_CSS_TOKEN_STRING))
- return FALSE;
+ {
+ gtk_css_parser_error_syntax (parser, "Expected a string");
+ return FALSE;
+ }
s = g_strdup (gtk_css_token_get_string (token));
gtk_css_parser_consume_token (parser);
diff --git a/gtk/deprecated/gtkcellarea.c b/gtk/deprecated/gtkcellarea.c
index fcab14183a..66b3dff0dd 100644
--- a/gtk/deprecated/gtkcellarea.c
+++ b/gtk/deprecated/gtkcellarea.c
@@ -235,7 +235,7 @@
* button events, however some customized derived areas can be implemented
* who are interested in handling other events. Handling an event can
* trigger the [`signal@Gtk.CellArea::focus-changed`] signal to fire; as well
- * as [`signal@GtkCellArea::add-editable`] in the case that an editable cell
+ * as [`signal@Gtk.CellArea::add-editable`] in the case that an editable cell
* was clicked and needs to start editing. You can call
* [method@Gtk.CellArea.stop_editing] at any time to cancel any cell editing
* that is currently in progress.
diff --git a/gtk/deprecated/gtkfontchooser.c b/gtk/deprecated/gtkfontchooser.c
index c10b02f54b..c6d4e5ceac 100644
--- a/gtk/deprecated/gtkfontchooser.c
+++ b/gtk/deprecated/gtkfontchooser.c
@@ -37,7 +37,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* [class@Gtk.FontChooserWidget], [class@Gtk.FontChooserDialog] and
* [class@Gtk.FontButton].
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
@@ -60,7 +60,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* The font description as a string, e.g. "Sans Italic 12".
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -73,7 +73,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* The font description as a `PangoFontDescription`.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -86,7 +86,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* The string with which to preview the font.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -99,7 +99,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* Whether to show an entry to change the preview text.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -112,7 +112,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* The level of granularity to offer for selecting fonts.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -131,7 +131,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
* The format of the string is compatible with
* CSS and with Pango attributes.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -144,7 +144,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
*
* The language for which the font features were selected.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
g_object_interface_install_property
(iface,
@@ -163,7 +163,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
* or an item is selected and the user presses one of the keys
* Space, Shift+Space, Return or Enter.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton] instead
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton] instead
*/
chooser_signals[SIGNAL_FONT_ACTIVATED] =
g_signal_new (I_("font-activated"),
@@ -189,7 +189,7 @@ gtk_font_chooser_default_init (GtkFontChooserInterface *iface)
* Returns: (nullable) (transfer none): A `PangoFontFamily` representing the
* selected font family
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
PangoFontFamily *
@@ -212,7 +212,7 @@ gtk_font_chooser_get_font_family (GtkFontChooser *fontchooser)
* Returns: (nullable) (transfer none): A `PangoFontFace` representing the
* selected font group details
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
PangoFontFace *
@@ -232,7 +232,7 @@ gtk_font_chooser_get_font_face (GtkFontChooser *fontchooser)
* Returns: A n integer representing the selected font size,
* or -1 if no font size is selected.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
int
@@ -261,7 +261,7 @@ gtk_font_chooser_get_font_size (GtkFontChooser *fontchooser)
* Returns: (nullable) (transfer full): A string with the name
* of the current font
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
char *
@@ -284,7 +284,7 @@ gtk_font_chooser_get_font (GtkFontChooser *fontchooser)
*
* Sets the currently-selected font.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -315,7 +315,7 @@ gtk_font_chooser_set_font (GtkFontChooser *fontchooser,
* Returns: (nullable) (transfer full): A `PangoFontDescription` for the
* current font
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
PangoFontDescription *
@@ -337,7 +337,7 @@ gtk_font_chooser_get_font_desc (GtkFontChooser *fontchooser)
*
* Sets the currently-selected font from @font_desc.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -358,7 +358,7 @@ gtk_font_chooser_set_font_desc (GtkFontChooser *fontchooser,
*
* Returns: (transfer full): the text displayed in the preview area
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
char *
@@ -382,7 +382,7 @@ gtk_font_chooser_get_preview_text (GtkFontChooser *fontchooser)
*
* The @text is used to show how the selected font looks.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -403,7 +403,7 @@ gtk_font_chooser_set_preview_text (GtkFontChooser *fontchooser,
*
* Returns: %TRUE if the preview entry is shown or %FALSE if it is hidden.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
gboolean
@@ -425,7 +425,7 @@ gtk_font_chooser_get_show_preview_entry (GtkFontChooser *fontchooser)
*
* Shows or hides the editable preview entry.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -448,7 +448,7 @@ gtk_font_chooser_set_show_preview_entry (GtkFontChooser *fontchooser,
* Adds a filter function that decides which fonts to display
* in the font chooser.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -505,7 +505,7 @@ _gtk_font_chooser_font_activated (GtkFontChooser *chooser,
* pango_context_set_font_map (context, fontmap);
* ```
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -528,7 +528,7 @@ gtk_font_chooser_set_font_map (GtkFontChooser *fontchooser,
*
* Returns: (nullable) (transfer full): a `PangoFontMap`
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
PangoFontMap *
@@ -551,7 +551,7 @@ gtk_font_chooser_get_font_map (GtkFontChooser *fontchooser)
*
* Sets the desired level of granularity for selecting fonts.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
@@ -571,7 +571,7 @@ gtk_font_chooser_set_level (GtkFontChooser *fontchooser,
*
* Returns: the current granularity level
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
GtkFontChooserLevel
@@ -598,7 +598,7 @@ gtk_font_chooser_get_level (GtkFontChooser *fontchooser)
*
* Returns: the currently selected font features
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
char *
@@ -621,7 +621,7 @@ gtk_font_chooser_get_font_features (GtkFontChooser *fontchooser)
*
* Returns: the currently selected language
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
char *
@@ -643,7 +643,7 @@ gtk_font_chooser_get_language (GtkFontChooser *fontchooser)
*
* Sets the language to use for font features.
*
- * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@GtkFontDialogButton]
+ * Deprecated: 4.10: Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]
* instead
*/
void
diff --git a/gtk/deprecated/gtkinfobar.c b/gtk/deprecated/gtkinfobar.c
index 6ca660ae6d..e32bdc4523 100644
--- a/gtk/deprecated/gtkinfobar.c
+++ b/gtk/deprecated/gtkinfobar.c
@@ -126,7 +126,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* style class applied.
*
* Deprecated: 4.10: There is no replacement in GTK for an "info bar" widget;
- * you can use [class@Gtk.Revealer] with a [class@GtkBox] containing a
+ * you can use [class@Gtk.Revealer] with a [class@Gtk.Box] containing a
* [class@Gtk.Label] and an optional [class@Gtk.Button], according to
* your application's design.
*/
diff --git a/gtk/gtkbuildable.h b/gtk/gtkbuildable.h
index 9b0af914e0..2a9d6f7cda 100644
--- a/gtk/gtkbuildable.h
+++ b/gtk/gtkbuildable.h
@@ -105,7 +105,7 @@ struct _GtkBuildableParser
* @set_buildable_property: Sets a property of a buildable object.
* It is normally not necessary to implement this, g_object_set_property()
* is used by default. `GtkWindow` implements this to delay showing itself
- * (i.e. setting the [property@GtkWidget:visible] property) until the whole
+ * (i.e. setting the [property@Gtk.Widget:visible] property) until the whole
* interface is created.
* @construct_child: Constructs a child of a buildable that has been
* specified as “constructor” in the UI definition. This can be used to
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 679c75e447..5257d461dc 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -852,8 +852,6 @@ typedef enum {
GTK_LEVEL_BAR_MODE_DISCRETE
} GtkLevelBarMode;
-G_END_DECLS
-
/**
* GtkInputPurpose:
* @GTK_INPUT_PURPOSE_FREE_FORM: Allow any character
@@ -1670,4 +1668,6 @@ typedef enum { /*< prefix=GTK_ACCESSIBLE_SORT >*/
GTK_ACCESSIBLE_SORT_OTHER
} GtkAccessibleSort;
+G_END_DECLS
+
#endif /* __GTK_ENUMS_H__ */
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index ee0c815d93..19a8b8f027 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -2950,7 +2950,7 @@ label_mnemonic_widget_weak_notify (gpointer data,
* the label) you need to set it explicitly using this function.
*
* The target widget will be accelerated by emitting the
- * [signal@GtkWidget::mnemonic-activate] signal on it. The default handler for
+ * [signal@Gtk.Widget::mnemonic-activate] signal on it. The default handler for
* this signal will activate the widget if there are no mnemonic collisions
* and toggle focus between the colliding widgets otherwise.
*/
diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c
index a70bdf1c90..04db746c44 100644
--- a/gtk/gtkmagnifier.c
+++ b/gtk/gtkmagnifier.c
@@ -256,8 +256,7 @@ _gtk_magnifier_set_coords (GtkMagnifier *magnifier,
magnifier->x = x;
magnifier->y = y;
- if (gtk_widget_is_visible (GTK_WIDGET (magnifier)))
- gtk_widget_queue_draw (GTK_WIDGET (magnifier));
+ gtk_widget_queue_draw (GTK_WIDGET (magnifier));
}
void
@@ -289,8 +288,7 @@ _gtk_magnifier_set_magnification (GtkMagnifier *magnifier,
if (magnifier->resize)
gtk_widget_queue_resize (GTK_WIDGET (magnifier));
- if (gtk_widget_is_visible (GTK_WIDGET (magnifier)))
- gtk_widget_queue_draw (GTK_WIDGET (magnifier));
+ gtk_widget_queue_draw (GTK_WIDGET (magnifier));
}
double
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 70a1a1084e..33109a0bc8 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -660,10 +660,7 @@ gtk_init (void)
{
if (!gtk_init_check ())
{
- const char *display_name_arg;
-
- display_name_arg = getenv ("DISPLAY");
- g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : "");
+ g_warning ("Failed to open display");
exit (1);
}
}
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index b2dba48d2b..72ee47b195 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -68,8 +68,8 @@
* that paintables are never made smaller than their ideal size - but
* be careful if you do not know the size of the paintable in use (like
* when displaying user-loaded images). This can easily cause the picture to
- * grow larger than the screen. And [property@GtkWidget:halign] and
- * [property@GtkWidget:valign] can be used to make sure the paintable doesn't
+ * grow larger than the screen. And [property@Gtk.Widget:halign] and
+ * [property@Gtk.Widget:valign] can be used to make sure the paintable doesn't
* fill all available space but is instead displayed at its original size.
*
* ## CSS nodes
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index d1201f8815..ae524a243a 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -51,7 +51,7 @@
* ![An example GtkScale](scales.png)
*
* To use it, you’ll probably want to investigate the methods on its base
- * class, [class@GtkRange], in addition to the methods for `GtkScale` itself.
+ * class, [class@Gtk.Range], in addition to the methods for `GtkScale` itself.
* To set the value of a scale, you would normally use [method@Gtk.Range.set_value].
* To detect changes to the value, you would normally use the
* [signal@Gtk.Range::value-changed] signal.
@@ -648,11 +648,11 @@ gtk_scale_class_init (GtkScaleClass *class)
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkRangeClass *range_class;
-
+
gobject_class = G_OBJECT_CLASS (class);
range_class = (GtkRangeClass*) class;
widget_class = (GtkWidgetClass*) class;
-
+
gobject_class->set_property = gtk_scale_set_property;
gobject_class->get_property = gtk_scale_get_property;
gobject_class->notify = gtk_scale_notify;
@@ -715,7 +715,7 @@ gtk_scale_class_init (GtkScaleClass *class)
/* All bindings (even arrow keys) are on both h/v scale, because
* blind users etc. don't care about scale orientation.
*/
-
+
add_slider_binding (binding_set, GDK_KEY_Left, 0,
GTK_SCROLL_STEP_LEFT);
@@ -763,19 +763,19 @@ gtk_scale_class_init (GtkScaleClass *class)
add_slider_binding (binding_set, GDK_KEY_KP_Down, GDK_CONTROL_MASK,
GTK_SCROLL_PAGE_DOWN);
-
+
add_slider_binding (binding_set, GDK_KEY_Page_Up, GDK_CONTROL_MASK,
GTK_SCROLL_PAGE_LEFT);
add_slider_binding (binding_set, GDK_KEY_KP_Page_Up, GDK_CONTROL_MASK,
- GTK_SCROLL_PAGE_LEFT);
+ GTK_SCROLL_PAGE_LEFT);
add_slider_binding (binding_set, GDK_KEY_Page_Up, 0,
GTK_SCROLL_PAGE_UP);
add_slider_binding (binding_set, GDK_KEY_KP_Page_Up, 0,
GTK_SCROLL_PAGE_UP);
-
+
add_slider_binding (binding_set, GDK_KEY_Page_Down, GDK_CONTROL_MASK,
GTK_SCROLL_PAGE_RIGHT);
@@ -791,26 +791,26 @@ gtk_scale_class_init (GtkScaleClass *class)
/* Logical bindings (vs. visual bindings above) */
add_slider_binding (binding_set, GDK_KEY_plus, 0,
- GTK_SCROLL_STEP_FORWARD);
+ GTK_SCROLL_STEP_FORWARD);
add_slider_binding (binding_set, GDK_KEY_minus, 0,
- GTK_SCROLL_STEP_BACKWARD);
+ GTK_SCROLL_STEP_BACKWARD);
add_slider_binding (binding_set, GDK_KEY_plus, GDK_CONTROL_MASK,
- GTK_SCROLL_PAGE_FORWARD);
+ GTK_SCROLL_PAGE_FORWARD);
add_slider_binding (binding_set, GDK_KEY_minus, GDK_CONTROL_MASK,
GTK_SCROLL_PAGE_BACKWARD);
add_slider_binding (binding_set, GDK_KEY_KP_Add, 0,
- GTK_SCROLL_STEP_FORWARD);
+ GTK_SCROLL_STEP_FORWARD);
add_slider_binding (binding_set, GDK_KEY_KP_Subtract, 0,
- GTK_SCROLL_STEP_BACKWARD);
+ GTK_SCROLL_STEP_BACKWARD);
add_slider_binding (binding_set, GDK_KEY_KP_Add, GDK_CONTROL_MASK,
- GTK_SCROLL_PAGE_FORWARD);
+ GTK_SCROLL_PAGE_FORWARD);
add_slider_binding (binding_set, GDK_KEY_KP_Subtract, GDK_CONTROL_MASK,
GTK_SCROLL_PAGE_BACKWARD);
@@ -997,9 +997,9 @@ gtk_scale_new_with_range (GtkOrientation orientation,
*
* Also causes the value of the adjustment to be rounded to this number
* of digits, so the retrieved value matches the displayed one, if
- * [property@GtkScale:draw-value] is %TRUE when the value changes. If
- * you want to enforce rounding the value when [property@GtkScale:draw-value]
- * is %FALSE, you can set [property@GtkRange:round-digits] instead.
+ * [property@Gtk.Scale:draw-value] is %TRUE when the value changes. If
+ * you want to enforce rounding the value when [property@Gtk.Scale:draw-value]
+ * is %FALSE, you can set [property@Gtk.Range:round-digits] instead.
*
* Note that rounding to a small number of digits can interfere with
* the smooth autoscrolling that is built into `GtkScale`. As an alternative,
@@ -1016,7 +1016,7 @@ gtk_scale_set_digits (GtkScale *scale,
g_return_if_fail (GTK_IS_SCALE (scale));
range = GTK_RANGE (scale);
-
+
digits = CLAMP (digits, -1, MAX_DIGITS);
if (priv->digits != digits)
@@ -1153,7 +1153,7 @@ gtk_scale_get_draw_value (GtkScale *scale)
*
* Sets whether the scale has an origin.
*
- * If [property@GtkScale:has-origin] is set to %TRUE (the default),
+ * If [property@Gtk.Scale:has-origin] is set to %TRUE (the default),
* the scale will highlight the part of the trough between the origin
* (bottom or left side) and the current value.
*/
@@ -1562,7 +1562,7 @@ gtk_scale_finalize (GObject *object)
* to be freed by the caller.
*
* Returns: (transfer none) (nullable): the [class@Pango.Layout]
- * for this scale, or %NULL if the [property@GtkScale:draw-value]
+ * for this scale, or %NULL if the [property@Gtk.Scale:draw-value]
* property is %FALSE.
*/
PangoLayout *
@@ -1590,15 +1590,15 @@ gtk_scale_get_layout (GtkScale *scale)
* Remember when using the `PangoLayout` function you need to
* convert to and from pixels using `PANGO_PIXELS()` or `PANGO_SCALE`.
*
- * If the [property@GtkScale:draw-value] property is %FALSE, the return
+ * If the [property@Gtk.Scale:draw-value] property is %FALSE, the return
* values are undefined.
*/
-void
+void
gtk_scale_get_layout_offsets (GtkScale *scale,
int *x,
int *y)
{
- int local_x = 0;
+ int local_x = 0;
int local_y = 0;
g_return_if_fail (GTK_IS_SCALE (scale));
@@ -1608,7 +1608,7 @@ gtk_scale_get_layout_offsets (GtkScale *scale,
if (x)
*x = local_x;
-
+
if (y)
*y = local_y;
}
@@ -2041,7 +2041,7 @@ gtk_scale_buildable_custom_finished (GtkBuildable *buildable,
*
* If #NULL is passed as @func, the value will be displayed on
* its own, rounded according to the value of the
- * [property@GtkScale:digits] property.
+ * [property@Gtk.Scale:digits] property.
*/
void
gtk_scale_set_format_value_func (GtkScale *scale,
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 0f2612c588..be3ab0d4fc 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3837,7 +3837,7 @@ gtk_scrolled_window_unrealize (GtkWidget *widget)
settings = gtk_widget_get_settings (widget);
- g_signal_handlers_disconnect_by_func (settings, gtk_scrolled_window_sync_use_indicators, widget);
+ g_signal_handlers_disconnect_by_func (settings, gtk_scrolled_window_update_use_indicators, widget);
GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->unrealize (widget);
}
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 062e7ea960..19f62f576d 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -34,7 +34,7 @@
* empty area, or by dragging the handle.
*
* `GtkSwitch` can also handle situations where the underlying state
- * changes with a delay. See [signal@GtkSwitch::state-set] for details.
+ * changes with a delay. See [signal@Gtk.Switch::state-set] for details.
*
* # CSS nodes
*
@@ -246,7 +246,7 @@ gtk_switch_pan_gesture_pan (GtkGesturePan *gesture,
if (self->is_active)
offset += width / 2;
-
+
offset /= width / 2;
/* constrain the handle within the trough width */
self->handle_pos = CLAMP (offset, 0, 1.0);
@@ -526,7 +526,7 @@ gtk_switch_class_init (GtkSwitchClass *klass)
*
* The backend state that is controlled by the switch.
*
- * See [signal@GtkSwitch::state-set] for details.
+ * See [signal@Gtk.Switch::state-set] for details.
*/
switch_props[PROP_STATE] =
g_param_spec_boolean ("state", NULL, NULL,
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 271f642294..65b4816bff 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1002,7 +1002,7 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
* A negative value of indent will produce a hanging indentation.
* That is, the first line will have the full width, and subsequent
* lines will be indented by the absolute value of indent.
- *
+ *
*/
g_object_class_install_property (gobject_class,
PROP_INDENT,
@@ -3759,7 +3759,7 @@ gtk_text_view_toggle_cursor_visible (GtkTextView *text_view)
* cursor, so you may want to turn the cursor off.
*
* Note that this property may be overridden by the
- * [property@GtkSettings:gtk-keynav-use-caret] setting.
+ * [property@Gtk.Settings:gtk-keynav-use-caret] setting.
*/
void
gtk_text_view_set_cursor_visible (GtkTextView *text_view,
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 72d305eb71..8f0b4c89ff 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -391,7 +391,7 @@ gtk_toggle_button_new_with_mnemonic (const char *label)
* and %FALSE to raise it.
*
* If the status of the button changes, this action causes the
- * [signal@GtkToggleButton::toggled] signal to be emitted.
+ * [signal@Gtk.ToggleButton::toggled] signal to be emitted.
*/
void
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b933ac513d..adc18da4f0 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3882,7 +3882,7 @@ gtk_widget_ensure_allocate_on_children (GtkWidget *widget)
if (!priv->alloc_needed_on_child)
return;
-
+
priv->alloc_needed_on_child = FALSE;
for (child = _gtk_widget_get_first_child (widget);
@@ -4063,7 +4063,7 @@ gtk_widget_allocate (GtkWidget *widget,
{
gtk_widget_ensure_allocate_on_children (widget);
}
- else
+ else
{
priv->width = adjusted.width;
priv->height = adjusted.height;
@@ -4107,7 +4107,7 @@ gtk_widget_allocate (GtkWidget *widget,
if (size_changed || baseline_changed)
gtk_widget_queue_draw (widget);
}
-
+
if (transform_changed && priv->parent)
gtk_widget_queue_draw (priv->parent);
@@ -4275,7 +4275,7 @@ gtk_widget_compute_point (GtkWidget *widget,
* This function is a convenience wrapper around
* [method@Gtk.WidgetClass.add_shortcut] and must be called during class
* initialization. It does not provide for user_data, if you need that,
- * you will have to use [method@GtkWidgetClass.add_shortcut] with a custom
+ * you will have to use [method@Gtk.WidgetClass.add_shortcut] with a custom
* shortcut.
*/
void
@@ -11380,7 +11380,7 @@ gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class,
* this class’s template data.
*
* Note that this must be called from a composite widget classes class
- * initializer after calling [method@GtkWidgetClass.set_template].
+ * initializer after calling [method@Gtk.WidgetClass.set_template].
*/
void
gtk_widget_class_set_template_scope (GtkWidgetClass *widget_class,
diff --git a/testsuite/gdk/display.c b/testsuite/gdk/display.c
index bf87567de2..ca1d668f8a 100644
--- a/testsuite/gdk/display.c
+++ b/testsuite/gdk/display.c
@@ -31,7 +31,7 @@ test_unset_display (void)
g_test_trap_subprocess ("/display/unset-display/subprocess/2", 0, 0);
g_test_trap_assert_failed ();
- g_test_trap_assert_stderr ("*cannot open display*");
+ g_test_trap_assert_stderr ("*Failed to open display*");
}
static void
@@ -62,7 +62,7 @@ test_bad_display (void)
g_test_trap_subprocess ("/display/bad-display/subprocess/2", 0, 0);
g_test_trap_assert_failed ();
- g_test_trap_assert_stderr ("*cannot open display*");
+ g_test_trap_assert_stderr ("*Failed to open display*");
}
int
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index ca8f833589..3fe5295210 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -228,6 +228,9 @@ node_parser_tests = [
'shadow-fail.node',
'shadow-fail.ref.node',
'shadow-fail.errors',
+ 'string-error.errors',
+ 'string-error.node',
+ 'string-error.ref.node',
'testswitch.node',
'text-fail.node',
'text-fail.ref.node',
diff --git a/testsuite/gsk/nodeparser/string-error.errors b/testsuite/gsk/nodeparser/string-error.errors
new file mode 100644
index 0000000000..47ad1d1e75
--- /dev/null
+++ b/testsuite/gsk/nodeparser/string-error.errors
@@ -0,0 +1 @@
+<data>:2:12-13: error: GTK_CSS_PARSER_ERROR_SYNTAX
diff --git a/testsuite/gsk/nodeparser/string-error.node b/testsuite/gsk/nodeparser/string-error.node
new file mode 100644
index 0000000000..6e62f6a6f5
--- /dev/null
+++ b/testsuite/gsk/nodeparser/string-error.node
@@ -0,0 +1,3 @@
+debug {
+ message: 5;
+}
diff --git a/testsuite/gsk/nodeparser/string-error.ref.node b/testsuite/gsk/nodeparser/string-error.ref.node
new file mode 100644
index 0000000000..fc7e73a4c7
--- /dev/null
+++ b/testsuite/gsk/nodeparser/string-error.ref.node
@@ -0,0 +1,6 @@
+debug {
+ child: color {
+ bounds: 0 0 50 50;
+ color: rgb(255,0,204);
+ }
+}