gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.
When some of the Emoji have been filtered out by
a search term, arrow keynav would behave oddly and
get stuck in invisible sections. Fix this by ignoring
any filtered out children when moving between
sections for arrow keynav.
Fixes: #5076
When loading the emoji data we just try to get the data for a language
while there may be territory specializations and emojibase provides
them.
So, split the loading function and try to load the data for the fully
defined language string (i.e. `it-ch`) before loading the generic one
for the language (i.e. `it`) and eventually falling back to the generic
english.
The number of 7 columns was hardcoded in a few places
related to keynav across sections. The flowbox does
not have an api for it, but we can find out anyway
how many columns there are.
This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().
Fixes: #3438
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
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
Without this, it seems impossible to make cross-section
keynav in the Emoji chooser work. I've tried, but got
lost between the focus, grab_focus, move_cursor and
keynav-failed vfuncs and signals, and their competing
implementations GtkFlowBox and GtkEmojiChooser.
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
These don't take a duration, instead they call g_get_monotonic_time() to
and subtract the start time for it.
Almost all our calls are like this, and this makes the callsites clearer
and avoids inlining the clock call into the call site.