Commit Graph

70352 Commits

Author SHA1 Message Date
Matthias Clasen
c85f3f4942 Merge branch 'wip/chergert/fix-4094' into 'master'
joinedmenu: add helper to join menus instead of nesting

Closes #4094

See merge request GNOME/gtk!3739
2021-07-09 19:29:41 +00:00
Matthias Clasen
d7553279ff Merge branch 'gdkkeys-m' into 'master'
[master] gdkkeys-win32.c: fix initialisation of key_state in update_keymap

See merge request GNOME/gtk!3742
2021-07-09 10:58:23 +00:00
Matthias Clasen
c86631b8a9 Merge branch 'dynamic-typelib-path' into 'master'
build: Get typelib dir dynamically using gobject-introspection dependency

See merge request GNOME/gtk!3737
2021-07-09 10:57:37 +00:00
Matthias Clasen
c1af63de9b Merge branch 'invisible-char-fix' into 'master'
textbtree: Initialize to zero the tags counting array

See merge request GNOME/gtk!3740
2021-07-09 10:56:51 +00:00
Jeremy Tan
2784b03b2d gdkkeys-win32.c: fix initialisation of key_state in update_keymap
It apparently worked by chance in the past, but now causes e.g.
alphanumeric characters to be interpreted as half-width katakana
when using the Japanese IME.
2021-07-09 12:46:49 +08:00
Marco Trevisan (Treviño)
10bdf8c645 textbtree: Initialize to zero the tags counting array
We're using the tag contents array to count the number of invisible tags
set but we always increase it without being initialized.

This may lead to unexpected behavior when traversing them and it's
causing a reliable failure in the textiter tests under s390x.

So, memset that area content to 0 once allocated. It's not needed to do
the same for the tags themselves as we always assign them.

 Conditional jump or move depends on uninitialised value(s)
   at 0x4CFAA00: _gtk_text_btree_char_is_invisible (gtktextbtree.c:2569)
   by 0x4B8A1BB: find_visible_by_log_attrs (gtktextiter.c:3244)
   by 0x10E93D: check_backward_visible_word_start (textiter.c:484)
   by 0x10E93D: test_visible_word_boundaries (textiter.c:523)
   by 0x533288F: g_test_run_suite (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
   by 0x53328E7: g_test_run (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
   by 0x109CC1: main (textiter.c:807)
2021-07-09 03:48:40 +02:00
Christian Hergert
d63d9b2319 joinedmenu: add helper to join menus instead of nesting
In many cases, we have an "extra-menu" property that is used to allow
applications to join menus into the native menu for the widget. Previously,
this was done by nesting that menu in a section.

Doing so increases the complexity of the rules for GtkMenuTracker as you
may want different handling from inside of the section vs toplevel
sections.

If instead we synthetically glue the menus together, we have a much more
natural joining of menus as the application developer would expect for
their menu.

This also ports GtkLabel, GtkText, GtkPasswordEntry, and GtkTextView to
use the joined menu helper.

The joined menu helper comes originally from GNOME Builder and has had
extensive use there.

Fixes #4094
2021-07-08 14:16:06 -07:00
Marco Trevisan (Treviño)
d5f2b69d0c build: Get typelib dir dynamically using gobject-introspection dependency
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
2021-07-08 04:59:10 +02:00
Matthias Clasen
6818eee859 Merge branch 'wip/exalm/scroll-touch' into 'master'
scrolledwindow: Don't check drag threshold when already scrolling

See merge request GNOME/gtk!3735
2021-07-07 21:37:58 +00:00
Matthias Clasen
e7f1398d85 Merge branch 'text-cursor-extents' into 'master'
text: Add API to compute cursor extents

See merge request GNOME/gtk!3734
2021-07-07 21:37:14 +00:00
Matthias Clasen
880c01f8cc Merge branch 'wl-since' into 'master'
Add missing "Since: 4.X" doc tags

See merge request GNOME/gtk!3736
2021-07-07 21:36:13 +00:00
Marc-André Lureau
337c5e5e59 Add missing "Since: 4.X" tags
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-07 23:35:38 +04:00
Florian Müllner
af52ea78c6 text: Add API to compute cursor extents
The extents that correspond to the strong/weak cursor at a given
character position can be used for example to point a popover to
text in the widget.
2021-07-07 19:33:12 +02:00
Alexander Mikhaylenko
fe633d9ef9 scrolledwindow: Don't check drag threshold when already scrolling
Checkout the drag threshold only makes sense when starting a scroll, after
that it just adds jumps when trying to scroll back and forth.
2021-07-07 19:39:06 +05:00
Matthias Clasen
e6cce283a7 Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Add a slider to the menu example

See merge request GNOME/gtk!3733
2021-07-06 00:23:30 +00:00
Matthias Clasen
c920236c54 gtk-demo: Add a slider to the menu example
This is a fun way to show that we can scale fast.
2021-07-05 19:31:54 -04:00
Matthias Clasen
6f86b4d220 Merge branch 'js-example' into 'master'
Add a simple Javascript example

See merge request GNOME/gtk!3731
2021-07-05 20:24:30 +00:00
Matthias Clasen
a085e174c5 Merge branch 'wip/remove-cloudprint' into 'master'
Remove Google Cloud Print backend

See merge request GNOME/gtk!3729
2021-07-05 20:21:52 +00:00
Florentina Mușat
d3c08789a3 Update Romanian translation
(cherry picked from commit 6ff90954dc)
2021-07-05 20:02:15 +00:00
Florentina Mușat
630488210b Update Romanian translation
(cherry picked from commit e5bd6312be)
2021-07-05 19:47:50 +00:00
Matthias Clasen
873f6ccfea Add a simple Javascript example
This shows how to use a layout manager in a widget,
implemented in javascript. The example sets up the
environment for running from the toplevel dir, assuming
that the build dir is called 'build'.
2021-07-05 13:48:51 -04:00
Patrick Griffis
af15f5d004 Remove Google Cloud Print backend
This service was shut down at the start of 2021.

This helpfully removes any dependency on json-glib, librest (and libsoup).
2021-07-05 10:54:16 -05:00
Matthias Clasen
6efe31e6f5 Merge branch 'master' into 'master'
gdk: fix gtk app startup with 'g_value_set_boxed: assertion...

See merge request GNOME/gtk!3714
2021-07-05 02:45:54 +00:00
Matthias Clasen
9885bedb7d Merge branch 'matthiasc/for-master' into 'master'
widget-factory: Add a default button

Closes #3975

See merge request GNOME/gtk!3725
2021-07-04 13:46:13 +00:00
Matthias Clasen
b6edb517e4 Merge branch 'placeholder-visibility' into 'master'
text: Update placeholder visibility more often

Closes #4066

See merge request GNOME/gtk!3724
2021-07-04 03:14:38 +00:00
Matthias Clasen
f023695f31 docs: Fix various link formatting
Make links that gi-docgen can undestand.

Fixes: #3975
2021-07-03 23:11:48 -04:00
Matthias Clasen
749ea8c30c widget-factory: Add a default button
Mark one of the buttons in the message dialog
as default, so we can see how the default appears
visually.
2021-07-03 23:01:14 -04:00
Matthias Clasen
c79f289d67 text: Update placeholder visibility more often
We need to update the visibility of the placeholder
label when we create it, otherwise we can end up
with placeholder text on top of entry content.

Fixes: #4066
2021-07-03 22:15:38 -04:00
Matthias Clasen
e516ce428a Merge branch 'fix-filechooser-critical' into 'master'
filechooser: Avoid a critical

Closes #4077

See merge request GNOME/gtk!3722
2021-07-03 21:48:41 +00:00
Matthias Clasen
1ae259aecb Merge branch 'man-page-improvement' into 'master'
docs: Improve the gtk4-launch man page

Closes #4081

See merge request GNOME/gtk!3723
2021-07-03 19:51:39 +00:00
Matthias Clasen
c609e2fef9 docs: Improve the gtk4-launch man page
Be more precise about where desktop files are found.

Fixes: #4081
2021-07-03 15:23:36 -04:00
Matthias Clasen
8ff9c851ce filechooser: Avoid a critical
This was showing up when calling some filechooser api on
a native filechooser, where we use a filechooser dialog
behind the scenes, but it does not have focus.

Fixes: #4077
2021-07-03 15:15:06 -04:00
Matthias Clasen
5ef2b9fd54 Merge branch 'matthiasc/for-master' into 'master'
Cosmetics

See merge request GNOME/gtk!3721
2021-07-03 13:40:23 +00:00
Matthias Clasen
511dc7a182 Merge branch 'fix-gir' into 'master'
meson: Fix generate_gir() dependencies

See merge request GNOME/gtk!3701
2021-07-03 13:35:22 +00:00
Matthias Clasen
c668586caf Merge branch 'scrolling-menus' into 'master'
popovermenu: Scroll when necessary

See merge request GNOME/gtk!3717
2021-07-03 13:31:23 +00:00
Benjamin Otte
390447862a Merge branch 'rerename-mediastream' into 'master'
mediastream: Rename apis one more time

See merge request GNOME/gtk!3720
2021-07-03 13:28:35 +00:00
Matthias Clasen
7f2648a013 Cosmetics
Amend LD_PRELOAD instead of replacing it, so you can just
point it at the right libgtk-4.so while running squares.py
from elsewhere.
2021-07-03 09:10:27 -04:00
Matthias Clasen
3227aa2c45 mediastream: Rename apis one more time
Before we end up with names that we are unhappy with,
rename things one more time, and update all callers.
2021-07-03 09:05:33 -04:00
Matthias Clasen
c88dc98b7c Merge branch 'python-example' into 'master'
Add a simple python example

See merge request GNOME/gtk!3719
2021-07-03 02:03:16 +00:00
Matthias Clasen
ed5b42071c Add a simple python example
This shows how to do custom drawing in a widget,
implemented in python. The example sets up the
environment for running from the toplevel dir,
assuming that the build dir is called 'build'.
2021-07-02 21:31:32 -04:00
Matthias Clasen
804d9ee828 popovermenu: Scroll when necessary
Add a scrolled window to GtkPopoverMenu, so we can scroll
long menus when there is not enough room.
2021-07-02 13:19:02 -04:00
Matthias Clasen
a90f721b74 Merge branch 'wip/baedert/wat' into 'master'
gtkffmediafile: Fix deprecated API usage

See merge request GNOME/gtk!3716
2021-07-02 17:00:41 +00:00
Timm Bäder
106417ada7 gtkffmediafile: Fix deprecated API usage 2021-07-02 18:41:55 +02:00
hudeng
fd0d3283e0 gdk: fix gtk app startup with 'g_value_set_boxed: assertion G_VALUE_HOLDS_BOXED (value) failed error message' when xsettings use 'XSETTINGS_TYPE_COLOR' type 2021-07-02 17:23:56 +08:00
Matthias Clasen
3e63e683a9 Merge branch 'text-undo-test' into 'master'
Add another text history test

See merge request GNOME/gtk!3713
2021-07-01 22:25:18 +00:00
Matthias Clasen
e415f25c8f Add another text history test
Add a tests that checks we group undo actions as expected
when the user is typing.
2021-07-01 18:08:05 -04:00
Matthias Clasen
e596e1fa7d Merge branch 'wip/chergert/fix-texthistory-grouping' into 'master'
texthistory: hoist single actions from group

Closes gnome-text-editor#97

See merge request GNOME/gtk!3711
2021-07-01 14:17:25 +00:00
Christian Hergert
d8ab2e6d03 texthistory: hoist single actions from group
In many cases across GtkTextBuffer, we end up with operations performed
inside of a begin/end user action. Those can be coalesced into a single
sub-action within the group, and hoisted out of the group. Doing so
increases the chances that we chain similar actions together for words.

Additionally, this fixes an issue introduced in
6179886b14 for #3977 where GNOME Text Editor
started to group all possible actions into a single group.

Fixes GNOME/gnome-text-editor#97
2021-06-30 16:40:54 -07:00
Benjamin Otte
e9d3d3e3cf icontheme: Fix binding annotation 2021-06-30 18:55:25 +00:00
Matthias Clasen
3a5983e387 Merge branch 'wayland-cursor-theme' into 'master'
wayland: Look for cursor themes in $HOME

Closes #4080

See merge request GNOME/gtk!3708
2021-06-29 22:17:49 +00:00