Commit Graph

28567 Commits

Author SHA1 Message Date
Emmanuele Bassi
4f54fcd288 docs: Fix gtk_tree_selection_get_selected()
Use the proper sigils for enumeration values and constants. The
description is also barely intelligible.
2021-09-30 00:35:11 +01:00
Gaël Bonithon
599ab80c63 GtkClipboard: Reset a source id to prevent double free
Fixes #4253.
2021-09-15 07:37:46 +02:00
Matthias Clasen
f6a82cb658 Merge branch 'cherry-pick-5044031b' into 'gtk-3-24'
Merge branch 'wip/kalev/gcc-11' into 'master'

See merge request GNOME/gtk!3870
2021-08-22 19:53:16 +00:00
Matthias Clasen
26e9919bf6 Merge branch 'gtk3-docs-fixes' into 'gtk-3-24'
docs: Escape the XML tags in the Widget class description

See merge request GNOME/gtk!3869
2021-08-22 19:13:57 +00:00
Matthias Clasen
b4e110920a Merge branch 'wip/kalev/gcc-11' into 'master'
Avoid diagnostics for gcc-11 false positive out of bounds accesses

See merge request GNOME/gtk!3064

(cherry picked from commit 5044031b53)

c514c41d Avoid diagnostics for gcc-11 false positive out of bounds accesses
2021-08-22 19:03:23 +00:00
Emmanuele Bassi
ff46ea64c4 docs: Escape the XML tags in the Widget class description
While gtk-doc doesn't care, this isn't really valid Markdown as the
GtkBuilder custom XML tags will be considered valid markup and embedded
as they are, breaking the HTML output.
2021-08-22 19:38:44 +01:00
Luiz Silva
b04bd31718 Fix typo in gtk_window_unstick documentation 2021-07-29 15:03:34 +00:00
Carlos Garnacho
944a75659c gtkgesture: Apply gesture group state after setting up sequence
When a new sequence is added to a GtkGesture, its state is looked
in other gestures in the same group, and made to match in this
gesture. This however happened a bit too early, before the
gesture touchpoint was fully set up. As this may result in signal
emission and whatnot, it's a good idea to make it happen with a
fully set up touchpoint.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3946

(Cherry-picked from commit 53df32e6cf)
2021-07-21 14:27:28 +02:00
Matthias Clasen
bc1ab236bd Merge branch 'BUG_filechooserbutton_remote_GTK3' into 'gtk-3-24'
FileChooserButton: query 'display name' also for unbookmarked files

See merge request GNOME/gtk!1724
2021-07-20 18:39:44 +00:00
Matthias Clasen
a9c8b879a4 Merge branch 'wip/otte/for-3-24' into 'gtk-3-24'
cellarea: Don't shrink area too much

See merge request GNOME/gtk!3671
2021-06-16 00:13:43 +00:00
Benjamin Otte
4ba89f25b8 cellarea: Don't shrink area too much
Do not compute rectangles with negative width/height. This avoids
assertion failures further down when those rectangles were actually
checked.

https://bugzilla.redhat.com/show_bug.cgi?id=1962215
2021-06-15 19:34:37 +02:00
Matthias Clasen
21f8098261 a11y: Plug a memory leak with treeviews
We need to explicitly remove the children from
a GtkContainerCellAccessible, since they otherwise
keep the parent alive.

Fixes: #3981
2021-06-11 08:55:48 -04:00
Matthias Clasen
d4f62b44d4 a11y: Fix ref counting in tree views
GtkContainerCellAccessible wasn't unsetting accessible
parents. Fix that.

By itself, this doesn't help for freeing a memory leak,
since AtkObject keeps a ref on its parent, so we never
free the GtkContainerCellAccessible as long as it has children.
2021-06-11 08:53:46 -04:00
Matthias Clasen
6d6d76ecbb Merge branch 'arb_fbo' into 'gtk-3-24'
Switch to GL_ARB_framebuffer_object

See merge request GNOME/gtk!2076
2021-06-08 14:59:05 +00:00
Matthias Clasen
d7196e5ea8 imcontext: Ignore more keysyms
It finally dawned on my that #3673 is just another
case of unexpected keysyms getting sent our way via
fringe XKB features.

Ignore them all!
2021-06-04 21:30:36 -04:00
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