On Mon, May 11, 2015 at 12:40:21AM +0900, Osamu Aoki wrote:
> Hi,
>
> I am a bit confused. If this is 2.2-2+deb8u1 update on 2.2-2, why there
> is change for Makefile.am. I thought your change only happens in
> debian/patches/*
Sorry, I shall use debdiff instead of git to generate diff. The diff
generated by debdiff is attached.
The git branch for 2.2-2 already applied the previous bugfix patch
inside source code. It causes error when building source package via
"debuild -S". So I just change the git branch to patch unapplied state
so that "debuild -S" won't cause any error. This is why git diff has
change in Makefile.am.
--
ChangZhuo Chen (陳昌倬)
http://czchen.info/
Key fingerprint = EC9F 905D 866D BE46 A896 C827 BE0C 9242 03F4 552D
diff -Nru ibus-cangjie-2.2/debian/changelog ibus-cangjie-2.2/debian/changelog
--- ibus-cangjie-2.2/debian/changelog 2014-08-24 10:46:43.0 +0800
+++ ibus-cangjie-2.2/debian/changelog 2015-05-10 18:01:18.0 +0800
@@ -1,3 +1,25 @@
+ibus-cangjie (2.2-2+deb8u1) jessie; urgency=medium
+
+ * Backport 2.4 bugfix (Closes: 782453)
+* A serious usability issue, where we would in some cases suggest
+ duplicate characters to the users:
+ https://github.com/Cangjians/ibus-cangjie/issues/63
+
+* A python traceback (in the background, not crashing the engine,
+ but which was nevertheless triggering automatic crash catchers):
+ https://github.com/Cangjians/ibus-cangjie/issues/57
+
+* An incorrect translation for Taiwan users:
+ https://github.com/Cangjians/ibus-cangjie/issues/61
+
+* works around another serious usability issue, where the candidate popup
+ was misplaced (i.e not at the input cursor, but at the bottom of the
+ screen) on some applications, most notably Firefox (which is quite the
+ common app)
+ https://github.com/Cangjians/ibus-cangjie/issues/60
+
+ -- ChangZhuo Chen (陳昌倬) Sun, 10 May 2015 18:00:01 +0800
+
ibus-cangjie (2.2-2) unstable; urgency=medium
[ChangZhuo Chen]
diff -Nru ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch
--- ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch 1970-01-01 08:00:00.0 +0800
+++ ibus-cangjie-2.2/debian/patches/0002-backport-2.4-bugfix.patch 2015-05-10 17:55:49.0 +0800
@@ -0,0 +1,96 @@
+Description: Backport 2.4 bugfix
+---
+Origin: upstream
+Bug-Debian: http://bugs.debian.org/782453
+--- ibus-cangjie-2.2.orig/po/zh_TW.po
ibus-cangjie-2.2/po/zh_TW.po
+@@ -98,7 +98,7 @@ msgstr "輸入法版本"
+ msgid ""
+ "Only characters common in Hong Kong can be inputted by default.\n"
+ "The following additional characters can be enabled:"
+-msgstr "預設情況下只能輸入香港常用字。\n可以額外啟用下列額字元:"
++msgstr "預設情況下只能輸入香港常用字。\n可以額外啟用下列字元:"
+
+ #. The Taiwanese Zhuyin alphabet is known under two names in English.
+ #. Obviously, if it only has one name in your language, don't try to keep two
+--- ibus-cangjie-2.2.orig/src/engine.py
ibus-cangjie-2.2/src/engine.py
+@@ -249,7 +249,12 @@ class Engine(IBus.Engine):
+ self.get_candidates(by_shortcode=True)
+
+ else:
+-self.get_candidates()
++try:
++self.get_candidates()
++
++except cangjie.errors.CangjieNoCharsError:
++self.play_error_bell()
++return True
+
+ if self.lookuptable.get_number_of_candidates():
+ self.do_select_candidate(1)
+@@ -394,9 +399,16 @@ class Engine(IBus.Engine):
+ else:
+ chars = self.cangjie.get_characters_by_shortcode(code)
+
++# Finding an element in a dict is **much** faster than in a list
++seen = {}
++
+ for c in sorted(chars, key=attrgetter("frequency"), reverse=True):
++if c.chchar in seen:
++continue
++
+ self.lookuptable.append_candidate(IBus.Text.new_from_string(c.chchar))
+ num_candidates += 1
++seen[c.chchar] = True
+
+ if num_candidates == 1:
+ self.do_select_candidate(1)
+@@ -421,6 +433,20 @@ class Engine(IBus.Engine):
+ text = IBus.Text.new_from_string(self.current_radicals)
+ super(Engine, self).update_auxiliary_text(text, len(self.current_radicals)>0)
+
++# We don't use pre-edit at all for Cangjie or Quick
++#
++# However, some applications (most notably Firefox) fail to correctly
++# position the candidate popup, as if they got confused by the absence
++# of a pre-edit text. :(
++#
++# This is a horrible hack, but it fixes the immediate problem.
++if self.current_radicals:
++super(Engine, self).update_preedit_text(IBus.Text.new_from_string('\u200B'), 0, True)
++
++else:
++super(Engine, self).update_preedit_text(IBus.Text.new_from_string(''), 0, False)
++# End of the horrible workaround
++
+ de