Compare commits

...

15 Commits

Author SHA1 Message Date
Matthias Clasen
3baddab5db pathbar: Setup the cancellable earlier
There have been reports of people hitting the
assertion in drop_node_for_cancellable, and a
plausible explanation is that we are adding it
too late in the codepath.

Fixes: #5792
2023-05-01 14:09:34 -04:00
Matthias Clasen
d92c6406d1 Merge branch 'displaymanager-warning-fix' into 'main'
Avoid a bad warning

See merge request GNOME/gtk!5901
2023-05-01 16:56:40 +00:00
Matthias Clasen
d666f4ab7f Avoid a bad warning
This isn't what we intended, and it breaks CI for
various projects.
2023-05-01 10:40:26 -04:00
Georges Basile Stavracas Neto
5df360f436 Merge branch 'alatiera/vulkan-headers-fix' into 'main'
vulkan: Correct error enum version guards

See merge request GNOME/gtk!5900
2023-05-01 14:00:43 +00:00
Jordan Petridis
0197149ba3 vulkan: Correct error enum version guards
Vulkan 218 introduced these errors by they were marked as
the beta till version 238.

00671c64ba (diff-e222ae95c2b0d5082b94d6086fb1c24da18ee31384c1a39840df3b9152023ee6)

Followup to f9b2d3104a
2023-05-01 09:41:35 +03:00
Matthias Clasen
b310ab7304 Merge branch 'matthiasc/for-main' into 'main'
docs: Migration guide updates

See merge request GNOME/gtk!5899
2023-04-30 22:39:57 +00:00
Matthias Clasen
062e3da57d Merge branch 'emojichooser-variation-fix' into 'main'
emojichooser: Avoid extraneous variation selectors

See merge request GNOME/gtk!5898
2023-04-30 22:29:11 +00:00
Matthias Clasen
cdbd931dba docs: Migration guide updates
Mention various widget size apis going away.
2023-04-30 18:21:46 -04:00
Matthias Clasen
2f96a08b3f gsk: Plug a few memory leaks 2023-04-30 18:21:23 -04:00
Matthias Clasen
c1fc6c35cf emojichooser: Avoid extraneous variation selectors
Only add a variation selector if there isn't one already.
2023-04-30 11:56:43 -04:00
Daniel Boles
060992aeba migrating-3to4: Fix unescaped ptr * used as italic 2023-04-30 16:55:31 +01:00
Daniel Boles
2c15d563e2 gtk-demo/listbox: Fix 0 space between nick & date,
by restoring the right-alignment that gtk-3-24 has here, but we had lost
– I guess because we dropped the default child expand and pack-end props
2023-04-30 16:39:16 +01:00
Daniel Boles
2dd7ab2a50 Inscription|InfoBar: Fix small cosmetic issue@docs 2023-04-30 16:05:11 +01:00
Daniel Boles
0736fef585 Merge branch 'dboles/expander-css-nodes-doc' into 'main'
Expander: Clarify/format “CSS nodes” documentation

See merge request GNOME/gtk!5896
2023-04-30 11:37:55 +00:00
Daniel Boles
0442fc2b55 Expander: Clarify/format CSS nodes documentation
Use backticks to highlight the node names, mention the box, and clarify
that the arrow referred to in the last sentence is the `expander` node.
2023-04-30 11:56:07 +01:00
11 changed files with 34 additions and 13 deletions

View File

@@ -64,6 +64,8 @@
</child>
<child>
<object class="GtkLabel" id="short_time_label">
<property name="hexpand">1</property>
<property name="xalign">1</property>
<property name="valign">baseline</property>
<property name="label" translatable="yes">38m</property>
<style>

View File

@@ -875,10 +875,10 @@ reference.
### Adapt to coordinate API changes
A number of APIs that are accepting or returning coordinates have
been changed from ints to doubles: `gtk_widget_translate_coordinates()`,
been changed from `int`s to `double`s: `gtk_widget_translate_coordinates()`,
`gtk_fixed_put()`, `gtk_fixed_move()`. This change is mostly transparent,
except for cases where out parameters are involved: you need to
pass double* now, instead of int*.
pass `double*` now, instead of `int*`.
### Adapt to GtkStyleContext API changes

View File

@@ -119,3 +119,17 @@ it no longer has a resize handle for the window.
These are very specialized widgets that should better live with the application
where they are used.
## Widget size api changes
The functions gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height()
are going away. In most cases, [method@Gtk.Widget.get_width] and [method@Gtk.Widget.get_height]
are suitable replacements. Note that the semantics are slightly different though:
the old functions return the size of the CSS border area, while the new functions return
the size of the widgets content area. In places where this difference matters, you can
use `gtk_widget_compute_bounds (widget, widget, &bounds)` instead.
The function gtk_widget_get_allocation() is also going away. It does not have a direct
replacement, but the previously mentioned alternatives can be used for it too.
The function gtk_widget_get_allocated_baseline() has been renamed to [method@Gtk.Widget.get_baseline].

View File

@@ -437,7 +437,7 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
}
}
if (!found && !display)
if (!found && !any && !display)
g_warning ("No such backend: %s", backend);
}

View File

@@ -223,7 +223,7 @@ gdk_vulkan_strerror (VkResult result)
#if VK_HEADER_VERSION < 140
case VK_RESULT_RANGE_SIZE:
#endif
#if VK_HEADER_VERSION >= 218
#if VK_HEADER_VERSION >= 238
case VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR:
return "The requested VkImageUsageFlags are not supported. (VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR)";
case VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR:

View File

@@ -4145,6 +4145,7 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job,
flipped_x ? -1 : 1,
flipped_y ? -1 : 1);
gsk_gl_render_job_push_modelview (job, transform);
gsk_transform_unref (transform);
}
gsk_gl_render_job_transform_bounds (job, offscreen->bounds, &viewport);
@@ -4182,6 +4183,7 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job,
{
GskTransform *transform = gsk_transform_scale (NULL, downscale_x, downscale_y);
gsk_gl_render_job_push_modelview (job, transform);
gsk_transform_unref (transform);
gsk_gl_render_job_transform_bounds (job, offscreen->bounds, &viewport);
}

View File

@@ -51,7 +51,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/**
* GtkInfoBar:
*
* `GtkInfoBar` can be show messages to the user without a dialog.
* `GtkInfoBar` can be used to show messages to the user without a dialog.
*
* ![An example GtkInfoBar](info-bar.png)
*

View File

@@ -563,12 +563,11 @@ add_emoji (GtkWidget *box,
int i;
PangoLayout *layout;
PangoRectangle rect;
gunichar code = 0;
codes = g_variant_get_child_value (item, 0);
for (i = 0; i < g_variant_n_children (codes); i++)
{
gunichar code;
g_variant_get_child (codes, i, "u", &code);
if (code == 0)
code = modifier;
@@ -576,7 +575,10 @@ add_emoji (GtkWidget *box,
p += g_unichar_to_utf8 (code, p);
}
g_variant_unref (codes);
p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */
if (code != 0xFE0F && code != 0xFE0E)
p += g_unichar_to_utf8 (0xFE0F, p); /* Append a variation selector, if there isn't one already */
p[0] = 0;
label = gtk_label_new (text);

View File

@@ -106,9 +106,10 @@
* ╰── <child>
* ```
*
* `GtkExpander` has three CSS nodes, the main node with the name expander-widget,
* a subnode with name title and node below it with name expander. The arrow of an
* expander that is showing its child gets the :checked pseudoclass added to it.
* `GtkExpander` has a main node `expander-widget`, and subnode `box` containing
* the title and child widget. The box subnode `title` contains node `expander`,
* i.e. the expand/collapse arrow; then the label widget if any. The arrow of an
* expander that is showing its child gets the `:checked` pseudoclass set on it.
*
* # Accessibility
*

View File

@@ -43,7 +43,7 @@
* space as well as it can.
*
* Users of this widget should take care to plan behaviour for the common case
* where the text doesn't fit exactly in the allocated space, .
* where the text doesn't fit exactly in the allocated space.
*
* Since: 4.8
*/

View File

@@ -935,6 +935,7 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
info->cancellable = g_cancellable_new ();
path_bar->get_info_cancellable = info->cancellable;
add_cancellable (path_bar, info->cancellable);
if (g_file_is_native (info->file))
{
@@ -959,7 +960,6 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
gtk_path_bar_get_mount_callback,
info);
}
add_cancellable (path_bar, info->cancellable);
}
/**