Commit cfdb9f95 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent bdff7924
......@@ -176,8 +176,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++)
......@@ -197,7 +197,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);
......@@ -371,7 +371,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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment