Commit Graph

32 Commits

Author SHA1 Message Date
Matthias Clasen
1e129c1dd2 emoji chooser: Actually force Emoji presentation
The previous commit was using the text presentation selector
instead of the Emoji one. Oops.
2018-12-03 21:47:53 -05:00
Matthias Clasen
7a4e9fa4d3 Force emoji presentation
Append a variation selector to the Emoji sequences,
to force Emoji presentation. Without this, some
Emoji come out with text presentation by default.

Closes: Pango #334
2018-11-30 16:20:44 -05:00
Timm Bäder
ae3e6d1949 emojichooser: Pass chooser to add_emoji 2018-10-11 12:27:56 +02:00
Matthias Clasen
827219e214 Emoji chooser: Also check for hex boxes
We don't want to see those either.
2018-07-19 17:57:19 -04:00
Matthias Clasen
5c9b25c66e moji chooser: Try harder to avoid fallback
We don't want to see any fallback rendering.
The current check was still letting some fallback
combinations through.

Based on work by Julian Sparber.
2018-07-19 17:50:54 -04:00
Matthias Clasen
849ffebc21 Emoji chooser: Use icons for sections
This is more reliable than using text-style Emoji
which may not be present.

Based on work by Julian Sparber.
2018-07-19 17:47:50 -04:00
Matthias Clasen
7928532bc5 emoji: Hide recent section when empty
This is part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-05-19 22:53:24 -04:00
Matthias Clasen
84364a7ef4 emoji: Improve section scrolling
Leave some space above the section heading when scrolling.

This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-05-17 16:42:00 +01:00
Matthias Clasen
be2853e5de emoji chooser: Match search terms better
Use g_str_match_string for better results.
2018-05-03 20:36:19 -04:00
Benjamin Otte
0d7cf79b00 emojichooser: Put event controllers into ui file 2018-04-26 17:59:41 +02:00
Timm Bäder
813ccb6378 emojichooser: Only measure reference emoji once
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
2018-02-27 11:45:34 +01:00
Matthias Clasen
17bad98084 emoji: Accept unpaired releases for variations
This enables a single long-press-move-release gesture
for picking a variation. This is not perfect yet: We
don't get hover in this case.
2017-12-30 23:24:22 -05:00
Matthias Clasen
675a4111e9 emoji: Skip overly wide fallback rendering
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2017-12-17 22:11:24 -05:00
Matthias Clasen
49d02eff93 emoji chooser: break out a helper function
This is just a small cleanup.
2017-11-19 22:43:36 -05:00
Matthias Clasen
1cd5df9404 emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-19 18:04:38 -05:00
Matthias Clasen
5e748ce940 emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.

This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-19 18:04:26 -05:00
Matthias Clasen
1f8debbac9 emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
2017-11-19 09:27:53 -05:00
Benjamin Otte
1cee71049a emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-05 16:12:35 +01:00
Timm Bäder
e0623fb5ad emojichooser: Plug memory leak 2017-10-17 08:54:08 +02:00
Timm Bäder
da701ede91 emojichooser: Plug a memory leak 2017-09-24 18:15:41 +02:00
Daniel Boles
b97f1900b7 EmojiChooser: Ensure always have a selected button
We were only selecting a section’s button if the adjustment y coord was
within its heading, so scrolling slightly into it unchecked all buttons.
This also fixes how we could end up with the first 2 selected, somehow.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:58:24 +01:00
Daniel Boles
002a1d9c1c EmojiChooser: Check the 1st button before 1st show
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:58:24 +01:00
Mohammed Sadiq
18adee6e1b emoji-chooser: fix subsequent scroll
Event handlers on scroll window should only be run once the widget
is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=786964
2017-09-01 19:36:59 -04:00
Matthias Clasen
d2087f1943 Avoid empty space in the emoji chooser
We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 08:36:56 -04:00
Matthias Clasen
7937da632a Handle emoji data change in emoji chooser
Update the settings schema to follow the change in Emoji data,
and make the emoji chooser code handle the new format.
2017-08-22 08:13:52 -04:00
Chun-wei Fan
f7409773b3 gtk/gtkemojichooser.c: Don't use g_autoptr()
We can't use g_autoptr() on non-GCC-style compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:36:53 +08:00
Matthias Clasen
8c3fc06baf Remove an erroneous unref
This was leftover by accident.
2017-08-15 06:40:05 -04:00
Matthias Clasen
fdd5e9f61e Redo emoji data slightly
No longer store variation sequences explicitly. Instead, put a 0
in the sequence where the modifiers will be inserted. This is more
compact, and it allows us to put variations directly into the
recent section.

Update the type of the recent-emoji setting to match these changes.
2017-08-14 15:46:02 -04:00
Matthias Clasen
82a24e7cf6 Don't update headings in an idle
It is not necessary since flow box invalidation is
all synchronous currently. If that ever changes,
this code will need adjustment.
2017-08-13 09:27:37 -04:00
Matthias Clasen
5b23fd32f1 emoji: Fix a leak
We were leaking the list of recently used Emoji here.
Pointed out by Timm Bädert.
2017-08-13 07:51:33 -04:00
Matthias Clasen
fd4fa7be29 emoji: Start search on the first character
There is no need to wait for a longer prefix here.
We already display all the content anyway, it will
only get less.
2017-08-13 07:51:33 -04:00
Matthias Clasen
c6c1619646 Add an Emoji chooser widget
Add a popover that shows color Emoji, with a search entry.
The recently-used Emoji are stored in a GSetting.
2017-08-12 18:48:14 -04:00