Commit Graph

75799 Commits

Author SHA1 Message Date
Corey Berla
3de47fa5c6 Revert "filechoosercell: Store type_format in filechoosercell"
This reverts commit dd407dab00.

This fix was incomplete, the actual fix is to use signal factory.
2023-04-21 08:14:14 -07:00
Hugo Carvalho
9f7c8f7d42 Update Portuguese translation
(cherry picked from commit 5bc3284dd8)
2023-04-21 14:30:55 +00:00
Yosef Or Boczko
feb3254a6a Update Hebrew translation 2023-04-21 09:10:12 +00:00
Benjamin Otte
03b71a9759 Merge branch 'wip/otte/for-main' into 'main'
testsuite: Be less verbose in accessor-apis test

Closes #5763

See merge request GNOME/gtk!5851
2023-04-20 21:50:44 +00:00
Benjamin Otte
f393f70ee2 listbase: Don't warn on scroll in empty list
Empty lists can still be scrolled if the scroll happens in the same
frame as the emptying of the list.

Related: #5763
2023-04-20 23:33:28 +02:00
Benjamin Otte
75c47755e3 adjustment: sanity-check values when setting them
It's not enough to sanitize values when starting an animation, as the
adjustment can reconfigure itself while the animation runs.
So as a simple way to handle this, we sanitize every value right before
setting it, too.

In the future we might also want to look at sanitizing start/end values
of the animation.

Fixes #5763
2023-04-20 23:33:28 +02:00
Benjamin Otte
e47c076048 adjustment: Split out a function 2023-04-20 23:33:28 +02:00
Matthias Clasen
6ecd57eba8 Merge branch 'dark_theme_fix_hover_toolbar_buttons' into 'main'
theme: fix 'hover' and 'check' colors for buttons under .toolbar

See merge request GNOME/gtk!5844
2023-04-20 20:08:31 +00:00
Matthias Clasen
8b3831d43a Merge branch 'dark_theme_increase_selection_color' into 'main'
Increase contrast for text entry selection color on dark theme

See merge request GNOME/gtk!5843
2023-04-20 20:08:01 +00:00
Benjamin Otte
39583e40ef testsuite: Allow accessors in interfaces
There are a lot of cases where properties are implemented in classes but
the getters for these exist in an interface that class implements.

A common Example is g_list_model_get_n_items() being the getter for
GtkWhateverListModel::n-items.
But also property implementations that don't use override_property()
(usually because they have a different default) are handled by this.
2023-04-20 17:47:54 +02:00
Benjamin Otte
be5f225022 testsuite: Be less verbose in accessor-apis test
Only print the tried names when --verbose is passed to the test.
2023-04-20 17:47:54 +02:00
Emin Tufan Çetin
427ed50759 Update Turkish translation 2023-04-19 13:22:31 +00:00
Matthias Clasen
9892243df6 Merge branch 'mask-node-transforms' into 'main'
Fix a comment

See merge request GNOME/gtk!5848
2023-04-19 07:44:45 +00:00
Matthias Clasen
83091c4f15 gsk: Use explicit switches
This makes it harder to forget to add new
node types here.
2023-04-19 09:19:12 +02:00
Matthias Clasen
503a5de7d1 gsk: Mask nodes support 2d transforms
When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.

Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.
2023-04-19 08:13:55 +02:00
Matthias Clasen
d7d75f0b26 Fix a comment
I tried to improve things in d67101d46e,
but I made it worse. The original note was meant
to be removed. Pointed out be Sebastian Bacher.
2023-04-19 07:49:36 +02:00
Benjamin Otte
40ac37245d Merge branch 'angle-gles' into 'main'
gdk: prefer GLES when on win32/ANGLE

See merge request GNOME/gtk!5829
2023-04-17 11:56:03 +00:00
Marc-André Lureau
250414d6b3 gdk/win32: drop some unused variables
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
d69cdf6c05 gdk: drop libangle GLES minimum version
GLES 2.0 version is fine now with current gtk according to B. Otte.
Let's use the same minimum requirement for all implementations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
9532657fa2 gdk: use GLES when on win32/ANGLE
When using GDK_DEBUG=gl-egl, we end up using GL, but that is not well supported:

Creating EGL context version 3.0 (debug:no, forward:no, legacy:yes, es:no)
Created EGL context[0000000000000004]
OpenGL version: 0.0 (legacy)
* GLSL version: (NULL)
* Max texture size: -1059701680
* Extensions checked:
 - GL_KHR_debug: no
 - GL_EXT_unpack_subimage: yes
 - OES_vertex_half_float: no

** (gtk4-demo.exe:14324): WARNING **: 19:16:41.468: Compile failure in
vertex shader:
ERROR: 0:7: 'gl_Position' : undeclared identifier
---8<---

Use GLES when EGL implementation is ANGLE.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Marc-André Lureau
3cb2115212 gdk: drop unused vertex_array_object
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-04-17 04:50:17 +00:00
Benjamin Otte
dd7c85adc3 Merge branch 'wip/otte/for-main' into 'main'
glrenderer: Don't try to use float framebuffers on GLES2

See merge request GNOME/gtk!5845
2023-04-17 04:49:59 +00:00
Benjamin Otte
8965d6c7f8 gl: Only allow RGB(A)8 on GLES2
GLES2 has no idea what 16bit textures even are, let alone floating point.
2023-04-17 05:57:44 +02:00
Benjamin Otte
d7309a009c glrenderer: Don't try to use float framebuffers on GLES2
GLES doesn't know what that is.
2023-04-17 05:57:44 +02:00
Nelson Benítez León
bd9b117517 theme: more contrast for text entry selection color on dark theme
Part of #5725
2023-04-16 16:33:54 -04:00
Nelson Benítez León
a309a56acf theme: fix 'hover' and 'check' colors for buttons under .toolbar
Buttons under .toolbar were using for their 'hover', 'active'
and 'check' colors the default ones from %button_basic_flat
which are very dimmed, so we explicitly darken them.

Part of #5725
2023-04-16 16:16:10 -04:00
Matthias Clasen
b6fac448d7 Merge branch 'matthiasc/for-main' into 'main'
Try harder to fix focus tests

See merge request GNOME/gtk!5842
2023-04-16 20:00:46 +00:00
Matthias Clasen
765f55dfbe testsuite: Skip focus tests when necessary
If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
2023-04-16 20:58:26 +02:00
Matthias Clasen
bebaad3e1f Merge branch 'ccook/doc-changes' into 'main'
Two corrections that show up in docs

See merge request GNOME/gtk!5838
2023-04-16 18:16:36 +00:00
Matthias Clasen
db6a116d49 Try harder to fix focus tests
The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.
2023-04-16 20:08:03 +02:00
Benjamin Otte
a299656c60 Merge branch 'wip/otte/alt.wl_surface.die.die.die' into 'main'
wayland: Don't leak all surfaces

See merge request GNOME/gtk!5840
2023-04-16 18:02:33 +00:00
Benjamin Otte
27fd0b907d testsuite: Fix broken test to not unref surfaces twice
The test doesn't hold 2 references, it holds only one.

The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.
2023-04-16 19:28:21 +02:00
Benjamin Otte
62951c7277 wayland: Don't leak all surfaces
X11 does add an extra reference to surfaces that gets released when the
DestroyNotify event arrives.
Wayland doesn't ave such an event, so that reference never gets
released.

This fixes a copy/paste error introduced in commit 590f3dfa1f.
2023-04-16 19:28:21 +02:00
Benjamin Otte
8e00f6e5e5 wayland: Don't insta-crash when a surface gets disposed
We want to remove the event queue from the list of event queues, not the
surface.
Otherwise the freed queue stays in the list and the next time an event
comes in, we access invalid memory.

Fixes thinko introduced in commit 7fafa5133b.

Luckily, we leak all surfaces, so this problem never occured.
2023-04-16 19:28:21 +02:00
Matthias Clasen
ff141a1ed4 Merge branch 'ccook/gtklabel-doc-changes' into 'main'
GtkLabel doc corrections

See merge request GNOME/gtk!5839
2023-04-16 17:07:49 +00:00
Matthias Clasen
25a10f502e Merge branch 'focus-testsuite-fixes' into 'main'
text: Fix fallout from focus changes

See merge request GNOME/gtk!5841
2023-04-16 07:36:11 +00:00
Matthias Clasen
585fb497c1 testsuite: Actually wait for focus
We were failing to properly iterate the main
context here. Oops.
2023-04-16 09:11:24 +02:00
Matthias Clasen
c57e5811f1 tests: Check is-focus instead of has-focus
We are not presenting windows here.
2023-04-16 08:50:35 +02:00
Matthias Clasen
940a2b6923 text: Fix fallout from focus changes
We don't get proper notification for when the toplevel
is-active property changes, so monitor has-focus, and
update cursor blinking.
2023-04-16 08:49:20 +02:00
Cam Cook
3277e2ee3e | method | current | suggestion |
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------|----------------------------------------------------------------------|
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3242) | "use`pango_layout_get_attribute (gtk_label_get_layout (self))`" | "use`pango_layout_get_attributes (gtk_label_get_layout (self))`" [1] |
| [set_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5897)     | "(attributes org.gtk.Method.get_property=yalign)"               | "(attributes org.gtk.Method.set_property=yalign)"                    |
| [get_yalign](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L5923)     | "(attributes org.gtk.Method.set_property=yalign)"               | "(attributes org.gtk.Method.get_property=yalign)"                    |
| [set_ellipsize](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3892)  | "to ellipsizei"                                                 | "to ellipsize"                                                       |
| [get_attributes](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3239) | "from the labels markup"                                        | "from the label's markup"                                            |

[1] https://docs.gtk.org/Pango/method.Layout.get_attributes.html
2023-04-15 21:48:27 -04:00
Cam Cook
3e8489fea5 | method | current | suggestion |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541)       | "This can be happen either by"                             | "This can happen either by"                               |
2023-04-15 12:41:13 -04:00
Cam Cook
1035640020 Revert "Two corrections and added method linking that show up in docs"
This reverts commit c7f30ecdfd.
2023-04-15 12:40:22 -04:00
Matthias Clasen
6cee73d100 Merge branch 'wip/otte/gles-fixes' into 'main'
GLES 2 fixes

See merge request GNOME/gtk!5837
2023-04-15 16:27:16 +00:00
Matthias Clasen
e4c43901c1 Merge branch 'matthiasc/for-main' into 'main'
window: Don't mark widget prematurely as has-focus

See merge request GNOME/gtk!5836
2023-04-15 16:09:32 +00:00
Cam Cook
c7f30ecdfd Two corrections and added method linking that show up in docs
| method                                                                                          | current                                                    | suggestion                                                |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------|-----------------------------------------------------------|
| [Entry/set_invisible_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2101) | "(attributes org.gtk.Method.sets_property=invisible-char)" | "(attributes org.gtk.Method.set_property=invisible-char)" |
| [FlowBox::activate](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L541)       | "This can be happen either by"                             | "This can happen either by"                               |

| method                                                                                                    | current                                                | suggestion                                                   |
|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------------|
| [Box/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L461)             | "value set by gtk_box_set_baseline_position()."        | "value set by [method@Gtk.Box.set_baseline_position]."       |
| [Box/get_spacing](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbox.c#L412)                       | "value set by gtk_box_set_spacing()."                  | "value set by [method@Gtk.Box.set_spacing]."                 |
| [CenterBox/get_baseline_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L528) | "value set by gtk_center_box_set_baseline_position()." | "value set by [method@Gtk.CenterBox.set_baseline_position]." |
| [Entry/get_activates_default](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2296)        | "value set by gtk_entry_set_activates_default()."      | "value set by [method@Gtk.Entry.set_activates_default]."     |
| [Entry/get_alignment](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2380)                | "value set by gtk_entry_set_alignment()."              | "value set by [method@Gtk.Entry.set_alignment]."             |
| [Entry/get_extra_menu](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3727)               | "set with gtk_entry_set_extra_menu()."                 | "set with [method@Gtk.Entry.set_extra_menu]."                |
| [Entry/get_has_frame](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2340)                | "value set by gtk_entry_set_has_frame()."              | "value set by [method@Gtk.Entry.set_has_frame]."             |
| [Entry/get_progress_pulse_step](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3372)      | "set with gtk_entry_set_progress_pulse_step()."        | "set with [method@Gtk.Entry.set_progress_pulse_step]."       |
| [Fixed/get_child_transform](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkfixed.c#L314)           | "set using gtk_fixed_set_child_transform()."           | "set using [method@Gtk.Fixed.set_child_transform]."          |
2023-04-15 12:08:46 -04:00
Benjamin Otte
b64f7050ba testsuite: Make GLES testsuite run use GLES 2
We want to support GLES 2, so make sure we test that support.

Also force-disable common extensions we don't explicitly check for and
don't want to accidentally use.
2023-04-15 17:55:20 +02:00
Benjamin Otte
d37b9619e2 gles: Don't use vertex array objects
They're not needed and GLES doesn't technically support them, even
though GTK had been using them via epoxy sneakily using the
GL_OES_vertex_array_object extension behind our back.
2023-04-15 17:55:20 +02:00
Matthias Clasen
4a22e681b3 text: Only claim primary when focused
It does not make sense otherwise, and has unfortunate
side-effects on Wayland.
2023-04-15 15:02:52 +02:00
Matthias Clasen
189aced844 wayland: Improve logging for primary selection 2023-04-15 15:02:52 +02:00
Matthias Clasen
d90cb02570 window: Don't mark widget prematurely as has-focus
has-focus is defined is-focus && toplevel::is-active.
We were forgetting to look at is_active when handling
focus widget changes.
2023-04-15 14:58:57 +02:00