mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
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.
This commit is contained in:
parent
ac1b8f66b1
commit
7937da632a
@ -159,8 +159,8 @@ add_recent_item (GtkEmojiChooser *chooser,
|
||||
|
||||
g_variant_ref (item);
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a((aus)u)"));
|
||||
g_variant_builder_add (&builder, "(@(aus)u)", item, modifier);
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a((auss)u)"));
|
||||
g_variant_builder_add (&builder, "(@(auss)u)", item, modifier);
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (chooser->recent.box));
|
||||
for (l = children, i = 1; l; l = l->next, i++)
|
||||
@ -180,7 +180,7 @@ add_recent_item (GtkEmojiChooser *chooser,
|
||||
continue;
|
||||
}
|
||||
|
||||
g_variant_builder_add (&builder, "(@(aus)u)", item2, modifier2);
|
||||
g_variant_builder_add (&builder, "(@(auss)u)", item2, modifier2);
|
||||
}
|
||||
g_list_free (children);
|
||||
|
||||
@ -333,7 +333,7 @@ populate_emoji_chooser (GtkEmojiChooser *chooser)
|
||||
GtkWidget *box;
|
||||
|
||||
bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
|
||||
chooser->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(aus)"), bytes, TRUE));
|
||||
chooser->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes, TRUE));
|
||||
|
||||
g_variant_iter_init (&iter, chooser->data);
|
||||
box = chooser->people.box;
|
||||
|
@ -2,12 +2,12 @@
|
||||
<schemalist>
|
||||
|
||||
<schema id='org.gtk.Settings.EmojiChooser' path='/org/gtk/settings/emoji-chooser/'>
|
||||
<key name='recent-emoji' type='a((aus)u)'>
|
||||
<key name='recent-emoji' type='a((auss)u)'>
|
||||
<default>[]</default>
|
||||
<summary>Recently used Emoji</summary>
|
||||
<description>
|
||||
An array of Emoji definitions to show in the Emoji chooser. Each Emoji is
|
||||
specified as an array of codepoints and a name. The extra integer after this
|
||||
specified as an array of codepoints, name and shortname. The extra integer after this
|
||||
pair is the code of the Fitzpatrick modifier to use in place of a 0 in the
|
||||
codepoint array.
|
||||
</description>
|
||||
|
Loading…
Reference in New Issue
Block a user