Commit Graph

28550 Commits

Author SHA1 Message Date
Guido Günther
72ab4c46ed gtkapplication-dbus: Fetch inital screen saver state async
Avoid a sync call that can make the application block for no good
reason.

Fixes 6f6b5faaa2
2021-06-01 14:32:58 +02:00
Matthias Clasen
6baf287c5f imcontext: Ignore NoSymbol key events
These can happen with some XKB options.

Fixes: #3973
2021-05-25 13:42:06 -04:00
Emmanuele Bassi
26119e5fc0 Merge branch 'filechooser-a11y' into 'gtk-3-24'
Improve FileChooser a11y

See merge request GNOME/gtk!2721
2021-05-25 12:57:12 +00:00
Matthias Clasen
0952c11bec imcontextsimple: Fix a possible problem
We were forgetting to handle the compose sequence
case in reset().
2021-05-25 08:07:26 -04:00
Yann Dirson
50889d7629 GtkFileChooserDialog: give a accessible name the GtkFileChooserWidget
Using pyatspi.utils.findDescendant() on the GtkFileChooserDialog using
just a role would return the Dialog, as they have the same "file
chooser" role.  So we have to give it a name to distinguish between
them.
2021-05-11 19:34:00 +02:00
Yann Dirson
9673b5a749 GtkFileChooserWidget: give accessible names to GtkStack children
Now that an AT can request apparition of the Location field, this
allows to locate it in the a11y tree.
2021-05-11 19:34:00 +02:00
Yann Dirson
50cbb8f9a2 GtkFileChooserWidget: export a11y action "show_location"
Note that this changes the accessible role of the widget to "file
chooser" instead of "filler".
2021-05-11 19:34:00 +02:00
Yann Dirson
813965fbc5 GtkFileChooserWidget: add a couple of accessible names in .ui file 2021-05-11 19:34:00 +02:00
Marco Trevisan (Treviño)
3177a3b42b emoji: Update data to CLRD v39
This is based on version 6.2.0 of emojibase, containing CLRD 39

http://cldr.unicode.org/index/downloads/cldr-39
https://github.com/milesj/emojibase/blob/b3c9a78/packages/data/CHANGELOG.md
2021-05-06 16:04:25 +02:00
Marco Trevisan (Treviño)
247ed3d14a gtkemojichooser: Use retrocompatible format for saving recent-emoji
Given that the format changed, not to break current user history we can
keep using the old format for saving and reading the emoji-recent
gsettings key, by converting the new data to the old one at save time.

We loose information about the short name (not really relevant), even it
could be saved using the first keyword, but this isn't really relevant.
2021-05-06 16:04:25 +02:00
Marco Trevisan (Treviño)
a1aecd26d5 gtk: Include emoji data when using autotools and msvc build systems
Differently from the meson case, here we just include the emoji data
files into the global gresources file, get_emoji_data() supports this
and it's just easier to handle in these build systems.
2021-05-06 16:03:11 +02:00
Marco Trevisan (Treviño)
accb8e3173 emoji: Use a portable and configuration-dependent path to load the data
Load the emojis data in all the platforms, respecting the configured
GTK_DATA_PREFIX
2021-05-06 15:57:50 +02:00
Matthias Clasen
1a4e368c7e Redo the handling of Emoji data
Use the data files from https://github.com/milesj/emojibase.git
as source for our Emoji data. Slightly change our data format by
adding a group to each item, in both the Emoji data and in the
setting for recent-emoji.

Install translated versions of the data as separate resource
bundles in $prefix/gtk-4.0/emoji, and load them when appropriate.

Currently, we have data for de, en, es, fr, zh, with data taken
from Unicode 13 and CLDR 13.

Fixes: #950 #1511
2021-05-06 15:36:27 +02:00
Matthias Clasen
100ee4ce16 Emoji: Drop the shortname field from emoji.data
Match the name for Emoji completion, and display
it too. 'man worker' looks a lot more natural in
the UI than ':man_worker:'.
2021-05-06 05:22:27 +02:00
Matthias Clasen
32e972e95b Do case-folding and tokenization when creating emoji.data
We can avoid doing the extra work of case-folding and
tokenization whenever we filter in the Emoji chooser.
2021-05-06 05:22:27 +02:00
Matthias Clasen
78cc9113c1 emoji: Add keywords to the data
And use them for matching in the Emoji chooser.
2021-05-06 05:22:26 +02:00
Matthias Clasen
cb32ff5b18 emoji: Some work on the conversion tool
Document the variant format, and write out json
format if asked to.
2021-05-06 05:22:26 +02:00
Matthias Clasen
bfad7693bf emojichooser: Allow inserting multiple Emoji
Don't close the Emoji chooser when the Control
key is held while clicking. So you can insert
multiple Emoji without having to reopen the
chooser every time.

Fixes: #1002
2021-05-06 05:22:26 +02:00
Matthias Clasen
71bcecbc8d emoji chooser: Fix handling of no recent Emoji
If the recent section is empty, we want to hide
it, make its button insensitive, and select the
next section, initially. This was not working
properly, since nothing was ever setting the
section box to invisible.
2021-05-06 05:22:26 +02:00
Marco Trevisan (Treviño)
30835d7a86 gtkemojichooser: Do not leak the data loaded from resources
This was part of commit 67e6d1087 but not of gtk3 branch in commit
9cde2186.
2021-05-06 05:22:26 +02:00
John Ralls
a6c3887736 Ensure gdk_quartz_drag_source freed on all paths.
New release function _gdk_quartz_drag_source_context_destroy_gtk_only
gets called when drag fails to start or is cancelled as well as
when it successfully completes.
2021-05-04 08:33:56 -07:00
Bastien Nocera
44aa328dc3 box: Fix guards not working
The guards weren't working because we were accessing data inside the
arguments before checking them. Postpone data access until after the
guards.

0x00007ffff741203c in gtk_box_pack (box=box@entry=0x0, child=0xe0b1b0, expand=expand@entry=0, fill=fill@entry=0, padding=padding@entry=0, pack_type=pack_type@entry=GTK_PACK_START)
    at /usr/src/debug/gtk3-3.24.28-2.fc34.x86_64/gtk/gtkbox.c:1530
1530	  GtkBoxPrivate *private = box->priv;
(gdb) bt
 #0  0x00007ffff741203c in gtk_box_pack (box=box@entry=0x0, child=0xe0b1b0, expand=expand@entry=0, fill=fill@entry=0, padding=padding@entry=0, pack_type=pack_type@entry=GTK_PACK_START)
     at /usr/src/debug/gtk3-3.24.28-2.fc34.x86_64/gtk/gtkbox.c:1530
 #1  0x00007ffff741223c in gtk_box_pack_start (box=box@entry=0x0, child=<optimized out>, expand=expand@entry=0, fill=fill@entry=0, padding=padding@entry=0)
     at /usr/src/debug/gtk3-3.24.28-2.fc34.x86_64/gtk/gtkbox.c:2179
2021-04-28 23:44:20 +02:00
Matthias Clasen
1dc428dc3e Fix distcheck 2021-04-22 22:47:16 -04:00
Matthias Clasen
9b0eec55aa Merge branch 'listbox-extend' into 'gtk-3-24'
Allow GtkListBox multiple selection to be extended repeatedly

See merge request GNOME/gtk!3459
2021-04-23 02:47:05 +00:00
Matthias Clasen
d6c45d0e17 imcontext: Fix cursor positions
gtk_im_context_get_preedit_string is documented to
return the cursor position as a character offset,
not a byte count. So return that.

Fixed: #3885
2021-04-22 21:33:59 -04:00
John Renner
42d4e6de51 Fix extend selection behavior in ListBox 2021-04-22 16:30:12 -07:00
Ulli Kehrle
d3a564d4f9
imcontextsimple: Ignore more modifiers in compose
Previously it was impossible to compose characters on higher levels of
some keyboard layouts as pressing the level selection key would just
exit compose mode.

Examples for affected keyboard layouts include the Latvian
apostrophe-variant "lv(apostrophe)" (latched third level), the extended
German keyboard layout "de(e1)" (latched fifth level) as well as the
multilingual Canadian keyboard layout "ca(multix)" and the German
neo-layout "de(neo)" and its descendants (shifted fifth level).

To reproduce, set a compose key and select the Latvian apostrophe layout.
Notice that you now can input [ by pressing first the ' and then the 8-key.
Then pressing <compose>'8'8 should produce ⟦, but prior to this patch it
did not.
2021-04-22 03:53:49 +02:00
Ondrej Holy
4fe7b3ec25 placesview: Open location even if mount was not found
Some locations have to be mounted, but their mounts are not user-visible
(e.g. smb-browse). Though this is maybe a bit weird, it is how it works
for years. The problem is that the commit 267ea755, which tries to get the
default location for opening, caused regression as it doesn't expect such
possibility. Before this commit, such locations were opened without any
issue, but nothing happens currently after clicking to "Connect" except of
clearing the "Connect to Server" entry. Let's fallback to the original
location if the mount was not found to fix this regression.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
2021-04-21 15:33:34 +02:00
Timm Bäder
25879ea37e scrolledwindow: Always add other scrollbar size...
... if we're not using indicators and the policy may be visible. Not
doing this if the policy may be invisible is incorrect as we need to
reserve the space anyway in case the scrolledwindow is allocated at
minimum size and the child size increases to show the scrollbar.
2021-04-19 14:43:01 -04:00
John Ralls
242b76a771 Add a public header for Cocoa access functions.
Some applications need to access gdk_quartz_window_get_nsview,
gdk_quartz_window_get_nswindow, and gdk_quartz_event_get_nsevent
so move these from the private gdkquartz-gtk-only.h to a new
header gdkquartz-cocoa-access.h. Don't include this header in
gdkquartz.h so that user code that doesn't need to access these
functins isn't required to compile with Objective C/C++.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/1737
2021-04-16 16:56:55 -07:00
Matthias Clasen
3aa742d715 overlay: Clarify pass-through docs
Explain that widgets with their own windows need to
have gdk_window_set_pass_through called on them.

Fixes: #3861
2021-04-16 11:15:05 -04:00
Matthias Clasen
a1aa4a970d Merge branch 'latest.glib.msvc-3' into 'gtk-3-24'
GTK-3.x: Fix builds against latest stable GLib with Visual Studio

See merge request GNOME/gtk!3445
2021-04-16 12:37:52 +00:00
Chun-wei Fan
b69790a776 gtkimcontextsimple.c: Declare variables at top-of-block
This way, things will continue to build on older compilers
2021-04-16 15:38:17 +08:00
Chun-wei Fan
da651ca7fc update-icon-cache.c: Declare variables at top-of-block
This way, things will continue to build on older compilers
2021-04-16 15:36:58 +08:00
Chun-wei Fan
35fee660ff gtkcsscustomgadget.c: Fix build with latest stable GLib with MSVC
This eliminates the C4098 warnings ('void' function returning a value),
which is considered by GLib-2.68.x or later to be an error.
2021-04-16 15:28:28 +08:00
Matthias Clasen
a926f217d7 imcontext: Eat key events during preedit
Avoid passing through random key press or release
events while we are showing preedit. That prevents
'accidents' like typing Ctrl-. bringing up the
Emoji chooser during preedit, or hitting Ctrl-a
after the Compose key moving the 'dot' around in
vim in terminals.
2021-04-15 17:46:19 -04:00
Matthias Clasen
3fb5890e69 fontchooser: Fix some since annotations
The "level", "font-features" and "language" were annotated
with the wrong version.

Fixes: #1830
2021-04-11 23:22:46 -04:00
Matthias Clasen
5b13ae1b2e Merge branch 'ebassi/hvbox-docs' into 'gtk-3-24'
docs: Remove any reference to GtkGrid in Gtk[HV]Box

See merge request GNOME/gtk!3422
2021-04-11 13:14:33 +00:00
Emmanuele Bassi
3377dc7d40 docs: Remove any reference to GtkGrid in Gtk[HV]Box
GtkBox is not going away, so there's not point in making things more
confusing for those who are still porting their code from GTK2 to GTK3
10 years after GTK 3.0 was released.

Fixes: #3854
2021-04-10 23:57:03 +01:00
Matthias Clasen
eaabc3722e scale: Fix sporadic criticals
gtk_css_node_update_layout_attributes can cause us to
free priv->layout, and then bad things happen. Therefore,
we must call that function on a new layout *before* setting
priv->layout.
2021-04-10 10:07:55 -04:00
CEO of Programming
475a4c8262 Update gtklistbox.c 2021-04-10 01:04:05 +00:00
Matthias Clasen
ed9b3f5057 Revert Compose sequence changes
This was breaking muscle memory of people with
the us intl keyboard layout, for important keys
such as '. The unfortunate side-effect is that
our handling of <dead_acute> is a bit hampered
by sequences that don't fit the pattern. But
such is life.

Fixes: #3807
2021-04-01 15:52:12 -04:00
Carlos Garnacho
0ec077bcdc Merge branch 'wip/exalm/overshoot-changes-gtk3' into 'gtk-3-24'
scrolledwindow: Cancel overshoot on dimension changes

See merge request GNOME/gtk!3333
2021-04-01 12:14:10 +00:00
Alexander Mikhaylenko
27d38eca9a scrolledwindow: Cancel overshoot on dimension changes
If we scroll down in a list that's still being filled, we hit the edge and
initiate overshoot, and then the adjustment's upper value increases. This
leads to an unwanted bounce back.

Additionally, if in a similar situation the upper value decreases, the
overscroll glow gets stuck.

Update kinetic scrolling upper and lower value on changes, and immediately
cancel it if dimensions on that side change.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3752
2021-04-01 16:37:03 +05:00
Matthias Clasen
9a2382bebc Merge branch 'spinbutton-localized-digits-3' into 'gtk-3-24'
spinbutton: Interpret localized digits

See merge request GNOME/gtk!3369
2021-03-30 02:37:41 +00:00
Matthias Clasen
fa69e5f42d spinbutton: Interpret localized digits
Interpret input where the characters have numeric values.

See #3387
2021-03-29 22:10:06 -04:00
Matthias Clasen
316aa85b8d label: Fix reacting to screen resolution changes
Labels were not reacting when the screen resolution
changes, as e.g. when turning "Large Text" on of off.
2021-03-29 20:48:15 -04:00
Matthias Clasen
ba8c18019d imcontext: Look for Compose file in the right place
The documentation states that GTK will load a Compose
file from ~/.config/gtk-3.0/Compose. Unfortunately,
backports changed this unintentionally to look in
the gtk-4.0 directory. Change it back.
2021-03-29 18:31:23 -04:00
Matthias Clasen
3c6d96980f Fix make dist 2021-03-26 21:54:29 -04:00
Matthias Clasen
4c7944175f Merge branch 'double-dead-keys-3' into 'gtk-3-24'
Double dead keys 3

See merge request GNOME/gtk!3354
2021-03-27 01:11:20 +00:00