ibus/ibus-HEAD.patch

38 lines
1.3 KiB
Diff
Raw Normal View History

From 7edaefdc1d80aefdbbc2dc52526c20715759da83 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 22 Aug 2018 17:20:53 +0900
Subject: [PATCH] ui/gtk3: Do not clear unicode data when emoji annotation lang
is changed
---
ui/gtk3/emojier.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
index 85dcdceb..637ae049 100644
--- a/ui/gtk3/emojier.vala
+++ b/ui/gtk3/emojier.vala
@@ -440,13 +440,17 @@ public class IBusEmojier : Gtk.ApplicationWindow {
m_emoji_to_emoji_variants_dict =
new GLib.HashTable<string, GLib.SList<string>>(GLib.str_hash,
GLib.str_equal);
- m_unicode_to_data_dict =
+ if (m_unicode_to_data_dict == null) {
+ m_unicode_to_data_dict =
new GLib.HashTable<unichar, IBus.UnicodeData>(
GLib.direct_hash,
GLib.direct_equal);
- m_name_to_unicodes_dict =
+ }
+ if (m_name_to_unicodes_dict == null) {
+ m_name_to_unicodes_dict =
new GLib.HashTable<string, GLib.SList<unichar>>(GLib.str_hash,
GLib.str_equal);
+ }
}
--
2.17.1