Commit Graph

73764 Commits

Author SHA1 Message Date
Matthias Clasen
069fef6f99 passwordentry: Fix an asymmetry
When connecting a signal in realize,
we should disconnect in unrealize.

Fixes: #5285
2023-03-01 01:06:14 +02:00
Matthias Clasen
5caecf16ac tooltip: Prevent too-wide tooltip windows
Set the label to expand, so it actually fills
the width that we allocated for it, instead
of shrinking back to the minimum width for
its height.

Fixes: #5521
2023-03-01 01:05:45 +02:00
Matthias Clasen
8203b69e74 tooltip: Don't play games with max-width-chars
Setting max-width-chars to the number of characters
in the string works ok only as long as the average
char width we get from Pango matches reality. Sadly
that seems not always the case, and this code was
causing short Chinese tooltips to always be broken
into two lines.

Fixes: #4470
2023-03-01 01:05:27 +02:00
Sophie Herold
189c1dd306 scrolledWindow: Propagate event for no scrolling 2023-03-01 01:00:06 +02:00
Christian Hergert
a4512a4c95 istring: fix istring_prepend() on malloc transition
When transitioning from internal to malloc, the strings were placed in
the wrong order to g_strconcat(). This fixes an issue with undo where
if you hit the boundary in just the right way, your undo stack will do
unexpected things.

Fixes #5506
2023-03-01 00:53:03 +02:00
Corey Berla
ce01d7d7a3 gtkmodelbutton: Ensure that accel label is always aligned to end
When the model button just has a text label and accel text,
the button fills and the accel label is implicitly aigned to end.
When there's also a icon, even though it's not shown (because
icons are only shown if there's no text), the button doesn't fill
and the accel ends up not aligned (assuming one of the other buttons
is longer). Ensure that the accel label is aligned to the end.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5504
2023-03-01 00:51:30 +02:00
Barnabás Pőcze
a4758db75e a11y: Use fallback logic when GApplication has no DBus object path
Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.
2023-03-01 00:51:00 +02:00
Barnabás Pőcze
6a991cf05a a11y: Check if path is NULL when removing from cache
`gtk_at_spi_cache_add_context()` checks if the GtkAtSpiContext's path
is NULL before inserting the context object into the hash table.
Do the same in `gtk_at_spi_cache_remove_context()` to avoid a NULL
pointer dereference in `g_str_hash()` during the hash table lookup
if a context with NULL path is removed. That can happen when the
GtkAtSpiRoot::base_path is NULL, which, in turn, can happen if
`g_application_get_dbus_object_path()` returns NULL.

  ==394047==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd1966f8b84 bp 0x7fff11e3ded0 sp 0x7fff11e3de58 T0)
  ==394047==The signal is caused by a READ memory access.
  ==394047==Hint: address points to the zero page.
      #0 0x7fd1966f8b84 in g_str_hash (/usr/lib/libglib-2.0.so.0+0x37b84)
      #1 0x7fd1966f9c09 in g_hash_table_contains (/usr/lib/libglib-2.0.so.0+0x38c09)
      #2 0x7fd196062c10 in gtk_at_spi_cache_remove_context ../gtk/a11y/gtkatspicache.c:447
      #3 0x7fd19606e0a9 in gtk_at_spi_root_unregister ../gtk/a11y/gtkatspiroot.c:653
      #4 0x7fd196067f58 in gtk_at_spi_context_unrealize ../gtk/a11y/gtkatspicontext.c:1559
      #5 0x7fd195ced97f in gtk_at_context_unrealize ../gtk/gtkatcontext.c:668
      #6 0x7fd195f5576e in gtk_widget_unroot_at_context ../gtk/gtkwidget.c:2399
      #7 0x7fd195f55bd2 in gtk_widget_unroot ../gtk/gtkwidget.c:2499
      ...
2023-03-01 00:50:49 +02:00
robxnano
0c83807a5a filechoosernativewin32: Set default extension 2023-03-01 00:49:42 +02:00
Corey Berla
254eca269a calendar: Set marked days immediately
The marked days are set only as part of gtk_calendar_select_day().
This is insufficient, especially because the day-selected signal
is emitted after the marked days are set in gtk_calendar_select_day().
2023-03-01 00:48:05 +02:00
Corey Berla
a59bf6e3cc calendar: Only apply the marked_day to the current month
The marked day gets applied to the current month, and either the previous
or subsequent month if they are visible within the current month.
This doesn't make any sense and likely was an accidental regression
in a6f9052cf1.  Clarify the docs.
2023-03-01 00:47:36 +02:00
Corey Berla
b06294d5d7 calendar: Add css style for marked days
As part of a6f9052cf1, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.
2023-03-01 00:47:06 +02:00
Arjan Molenaar
3f9b7dd863 macos: Command should not come from gettext
Instead, just provide the right character.

See also
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkaccelgroup.c#L916.
2023-03-01 00:45:27 +02:00
Arjan Molenaar
3b36459630 macos: Use Command key symbol for meta
Show the Apple Command symbol ⌘ as keyboard shortcut for the Meta key on macos,
similar to GtkAccelGroup.
2023-03-01 00:45:09 +02:00
Corey Berla
5c4f3a1943 gtkdroptarget: Notify value property on local drag
The value property is only getting notified when it's unset
or when it's set from gdk_drop_real_value_async().  Make sure
to always notify :value when its changed
2023-03-01 00:39:41 +02:00
Lukáš Tyrychtr
b53bd5b670 Don't present GTK class names to assistive technologies even as a fallback
A screen reader user is not interested in GTK internals, for example,
he does not care whether a button is an image button or not,
and a screen reader will report the fact that it is a button anyway.
Same applies for GtkEntry widgets, for example.

This actually is sufficient to fix gnome-control-center#2244.
And, according to the discussion in #5145, it should be fine.
2023-03-01 00:36:07 +02:00
Matthias Clasen
6257243574 Merge branch 'revert-font-chooser-filter-4-8' into 'gtk-4-8'
Revert "Fix an assertion in GtkFontChooserWidget when setting a filter."

See merge request GNOME/gtk!5568
2023-02-28 13:00:35 +00:00
Akira TAGOH
e18e99209e Revert "Fix an assertion in GtkFontChooserWidget when setting a filter."
Actually this filter hasn't ported to 4.8 branch and
the merge request GNOME/gtk!5514 has been accidentally merged.

This reverts commit f4768f16c8.
2023-02-28 21:42:00 +09:00
Matthias Clasen
8e9e32abaf Merge branch 'fix-font-chooser-filter-4-8' into 'gtk-4-8'
Fix an assertion in GtkFontChooserWidget when setting a filter.

See merge request GNOME/gtk!5514
2023-02-15 03:54:38 +00:00
Akira TAGOH
f4768f16c8 Fix an assertion in GtkFontChooserWidget when setting a filter.
(cherry-picked from commit 4532c3020b)
2023-02-14 15:12:52 +09:00
Matthias Clasen
790b9d59ad Merge branch 'cherry-pick-824e9833' into 'gtk-4-8'
[4.8.x] gdk/x11: Reset all scroll valuators on enter

See merge request GNOME/gtk!5480
2023-02-07 02:34:50 +00:00
Carlos Garnacho
37843ec941 gdk/x11: Reset all scroll valuators on enter
We no longer need to make much distinction between multiple logical
devices, plus it breaks esp. with the Xwayland input device distribution.
Just iterate across all devices and reset their scroll valuators.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4160


(cherry picked from commit 824e983372)
2023-02-04 11:37:01 -05:00
Sabri Ünal
1ef03e6eb8 Update Turkish translation 2023-01-15 22:43:19 +00:00
Matteo Percivaldi
1ff3a26c96 gtkcssanimatedstyle: Fix return of new_advance()
This was causing animation and transition to stop randomly and reset
their state to initial state.

This issue has existed since commit
7b68bdb831.

Closes #4426
2023-01-13 15:15:10 -05:00
Matthias Clasen
92ebf8ab13 fontchooser: Drop a few errant translations
No point in translating these properties, they
are not strings.

Fixes: #5146
2023-01-12 18:38:44 -05:00
Matthias Clasen
7169d346ec build: Use a stable harfbuzz
We don't need the latest harfbuzz.
Stick to 4.0 for now.
2023-01-12 18:37:50 -05:00
Matthias Clasen
162b061ad2 Merge branch 'cherry-pick-e7f798dc' into 'gtk-4-8'
[4.8 cherry-pick] gdk/surface: Handle clicks outside client surfaces

See merge request GNOME/gtk!5373
2023-01-11 18:14:03 +00:00
Emin Tufan Çetin
83284e6a9d Update Turkish translation 2023-01-11 06:59:32 +00:00
Sabri Ünal
4a38d5d1d5 Update Turkish translation 2023-01-11 05:31:28 +00:00
Matthias Clasen
a87b3f63ec Merge branch 'cherry-pick-b4db4893' into 'gtk-4-8'
Fix building `tests/mountoperation.c` on Windows (backport MR!5126 to gtk-4-8)

See merge request GNOME/gtk!5408
2023-01-09 10:58:46 +00:00
Matthias Clasen
66091f8139 Merge branch 'fix-windows-build-testmountoperation' into 'main'
tests/testmountoperation.c: Fix build on Windows

See merge request GNOME/gtk!5126

(cherry picked from commit b4db48935d)

1a5a65ac tests/testmountoperation.c: Fix build on Windows
2023-01-09 05:08:56 -05:00
Matthias Clasen
46eebcb2ac Merge branch 'cherry-pick-188f9269' into 'gtk-4-8'
Cherrypick to 4.8: listitemwidget: Setup factory only once the widget is visible

See merge request GNOME/gtk!5378
2023-01-07 15:06:05 +00:00
Nart Tlisha
1e27563425 Update Abkhazian translation 2023-01-05 12:23:44 +00:00
Benjamin Otte
2aaefd9ff6 Merge branch 'wip/corey/list-item-visible' into 'main'
listitemwidget: Setup factory only once the widget is visible

See merge request GNOME/gtk!5374

(cherry picked from commit 188f9269b7)

7ad693f8 gtkcolumnviewcolumn: Only create cells when the column is visible
2022-12-30 19:45:00 -05:00
Carlos Garnacho
826030dcc2
gdk/surface: Handle clicks outside client surfaces
The owner_events=TRUE grab makes GDK on X11 see events happening
outside every client window as received on the grab window.
Additionally check that the pointer is inside the grab window
(i.e. it received GDK_CROSSING_NORMAL crossing events for the
core pointer) in order to handle clicks happening outside client
windows.

These new paths are expected to be a no-op on Wayland, and to
also work for touchscreen input on X11, due to emulated pointer
events.
2022-12-29 13:21:07 +11:00
Matthias Clasen
748b68d58b Fix typo in NEWS 2022-12-22 23:05:37 -05:00
Matthias Clasen
74ed1b9e35 Post-release version bump 2022-12-22 14:12:14 -05:00
Matthias Clasen
793831af8a 4.8.3 2022-12-22 14:07:27 -05:00
Matthias Clasen
d51734d83b Merge branch 'cherry-pick-acd7d739' into 'gtk-4-8'
[4.8] GdkWin32: Fix resizes with native decorations

See merge request GNOME/gtk!5368
2022-12-22 18:41:22 +00:00
Luca Bacci
40ed5ed494 GdkWin32: Fix resizes with native decorations
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5142
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5088
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5090
2022-12-22 18:03:41 +02:00
Matthias Clasen
9b75292a63 Merge branch 'hicolor-backport' into 'gtk-4-8'
Merge branch 'include-hicolor-index-theme-as-resource-rebased' into 'main'

See merge request GNOME/gtk!5364
2022-12-21 07:30:05 +00:00
Matthias Clasen
db5543e83b tests: Maybe skip introspection tests
If we don't find the python gi module,
skip the introspection test.
2022-12-20 22:40:36 -05:00
Luca Bacci
5844ecf381 Merge branch 'include-hicolor-index-theme-as-resource-rebased' into 'main'
Include hicolor index.theme as a resource (rebased)

Closes #5303

See merge request GNOME/gtk!5361
2022-12-20 21:52:17 -05:00
Benjamin Otte
afaeadcf67 Merge branch 'cherry-pick-ae097d96' into 'gtk-4-8'
listbase: Cancel rubberband if not handling drag

See merge request GNOME/gtk!5363
2022-12-21 02:41:07 +00:00
Benjamin Otte
14823c6bd6 Merge branch 'wip/antoniof/listbase-rubberband-better-fix' into 'main'
listbase: Cancel rubberband if not handling drag

See merge request GNOME/gtk!4831

(cherry picked from commit ae097d9674)

efbd2289 listbase: Cancel rubberband if not handling drag
2022-12-20 20:19:15 -05:00
Aleksandr Melman
a2d95db723 Update Russian translation 2022-12-20 09:21:34 +00:00
Matthias Clasen
ecbfccfc55 Merge branch 'cherry-pick-1f001a8f' into 'gtk-4-8'
Merge branch 'wip/corey/listbase-focus' into 'main'

See merge request GNOME/gtk!5338
2022-12-15 17:10:33 +00:00
Matthias Clasen
ef6f9cd7c6 Merge branch 'cherry-pick-e8f70be2' into 'gtk-4-8'
Merge branch 'wip/otte/for-5422' into 'main'

See merge request GNOME/gtk!5331
2022-12-15 16:27:57 +00:00
Benjamin Otte
9df10fa96f Merge branch 'wip/corey/listbase-focus' into 'main'
listbase: Use set_focus_child properly

Closes #5433 and #5432

See merge request GNOME/gtk!5169

(cherry picked from commit 1f001a8f6a)

7081bfc6 listbase: Split scroll_to_item for reuse
93e591fd listbase: Use set_focus_child properly
2022-12-14 22:21:54 -05:00
Matthias Clasen
779f8063d3 Merge branch 'x11-fixes-backports-4-8' into 'gtk-4-8'
Assorted x11 fix backports

See merge request GNOME/gtk!5333
2022-12-15 00:25:25 +00:00