public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Fixed Bug 1554714 - improve order of unicode matches
@ 2026-05-31 2:06 Takao Fujiwara
0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31 2:06 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ibus
Branch : autotool
Commit : e4d7f1ede0cee7d8f142a14e9bac3f5a1125ad3e
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date : 2018-03-30T12:52:30+09:00
Stats : +86/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ibus/c/e4d7f1ede0cee7d8f142a14e9bac3f5a1125ad3e?branch=autotool
Log:
Fixed Bug 1554714 - improve order of unicode matches
---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index b7299df..89530ca 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -72,3 +72,85 @@ index 8707e432..24029703 100644
--
2.14.3
+From b184861396279d903e62bf6aad271a2205a79832 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Fri, 30 Mar 2018 12:33:59 +0900
+Subject: [PATCH] ui/gtk3: Sort Unicode candidates
+
+BUG=rhbz#1554714
+R=Shawn.P.Huang@gmail.com
+
+Review URL: https://codereview.appspot.com/339430043
+---
+ ui/gtk3/emojier.vala | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
+index 24029703..0c0865f1 100644
+--- a/ui/gtk3/emojier.vala
++++ b/ui/gtk3/emojier.vala
+@@ -1144,9 +1144,11 @@ public class IBusEmojier : Gtk.ApplicationWindow {
+ lookup_emojis_from_annotation(string annotation) {
+ GLib.SList<string>? total_emojis = null;
+ unowned GLib.SList<string>? sub_emojis = null;
++ unowned GLib.SList<unichar>? sub_exact_unicodes = null;
+ unowned GLib.SList<unichar>? sub_unicodes = null;
+ int length = annotation.length;
+ if (m_has_partial_match && length >= m_partial_match_length) {
++ GLib.SList<string>? sorted_emojis = null;
+ foreach (unowned string key in
+ m_annotation_to_emojis_dict.get_keys()) {
+ if (key.length < length)
+@@ -1173,16 +1175,29 @@ public class IBusEmojier : Gtk.ApplicationWindow {
+ sub_emojis = m_annotation_to_emojis_dict.lookup(key);
+ foreach (unowned string emoji in sub_emojis) {
+ if (total_emojis.find_custom(emoji, GLib.strcmp) == null) {
+- total_emojis.append(emoji);
++ sorted_emojis.insert_sorted(emoji, GLib.strcmp);
+ }
+ }
+ }
++ foreach (string emoji in sorted_emojis) {
++ if (total_emojis.find_custom(emoji, GLib.strcmp) == null) {
++ total_emojis.append(emoji);
++ }
++ }
+ } else {
+ sub_emojis = m_annotation_to_emojis_dict.lookup(annotation);
+ foreach (unowned string emoji in sub_emojis)
+ total_emojis.append(emoji);
+ }
++ sub_exact_unicodes = m_name_to_unicodes_dict.lookup(annotation);
++ foreach (unichar code in sub_exact_unicodes) {
++ string ch = code.to_string();
++ if (total_emojis.find_custom(ch, GLib.strcmp) == null) {
++ total_emojis.append(ch);
++ }
++ }
+ if (length >= m_partial_match_length) {
++ GLib.SList<string>? sorted_unicodes = null;
+ foreach (unowned string key in m_name_to_unicodes_dict.get_keys()) {
+ bool matched = false;
+ if (key.index_of(annotation) >= 0)
+@@ -1192,11 +1207,16 @@ public class IBusEmojier : Gtk.ApplicationWindow {
+ sub_unicodes = m_name_to_unicodes_dict.lookup(key);
+ foreach (unichar code in sub_unicodes) {
+ string ch = code.to_string();
+- if (total_emojis.find_custom(ch, GLib.strcmp) == null) {
+- total_emojis.append(ch);
++ if (sorted_unicodes.find_custom(ch, GLib.strcmp) == null) {
++ sorted_unicodes.insert_sorted(ch, GLib.strcmp);
+ }
+ }
+ }
++ foreach (string ch in sorted_unicodes) {
++ if (total_emojis.find_custom(ch, GLib.strcmp) == null) {
++ total_emojis.append(ch);
++ }
++ }
+ }
+ return total_emojis;
+ }
+--
+2.14.3
+
diff --git a/ibus.spec b/ibus.spec
index 9e8360a..48a3c7e 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -30,7 +30,7 @@
Name: ibus
Version: 1.5.18
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@@ -431,6 +431,9 @@ dconf update || :
%{_datadir}/gtk-doc/html/*
%changelog
+* Fri Mar 30 2018 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.18-4
+- Fixed Bug 1554714 - improve order of unicode matches
+
* Thu Mar 15 2018 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.18-3
- Fixed Bug 1554813 - Enter key on numpad in Emojier
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-31 2:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31 2:06 [rpms/ibus] autotool: Fixed Bug 1554714 - improve order of unicode matches Takao Fujiwara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox