Hi all, Please help to sponsor ibus-cangjie for Jessie [0] to fix #782453, the jessie-pu is #783811, thanks.
[0] http://anonscm.debian.org/cgit/pkg-ime/ibus-cangjie.git/log/?h=jessie -- ChangZhuo Chen (陳昌倬) <czc...@gmail.com> http://czchen.info/ Key fingerprint = EC9F 905D 866D BE46 A896 C827 BE0C 9242 03F4 552D
diff --git a/Makefile.am b/Makefile.am index 1142421..d7ece7c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,8 +8,8 @@ SUBDIRS = po # -- scripts/ ------------------------ bin_SCRIPTS = scripts/ibus-setup-cangjie -libexec_SCRIPTS = scripts/ibus-engine-cangjie -libexecdir = $(prefix)/lib/ibus +pkglibexec_SCRIPTS = scripts/ibus-engine-cangjie +libexecdir = $(prefix)/lib scripts/ibus-%-cangjie: scripts/ibus-%-cangjie.in Makefile $(AM_V_GEN) \ @@ -38,7 +38,7 @@ componentdir = $(COMPONENT_DIR) sed -e 's&@_VERSION@&$(VERSION)&g' \ -e 's&@BINDIR@&$(bindir)&g' \ -e 's&@ICON16DIR@&$(icon16dir)&g' \ - -e 's&@PKGLIBEXECDIR@&$(libexecdir)&g' $< > $@ + -e 's&@PKGLIBEXECDIR@&$(pkglibexecdir)&g' $< > $@ gsettings_in_files = data/org.cangjians.ibus.cangjie.gschema.xml.in data/org.cangjians.ibus.quick.gschema.xml.in gsettings_SCHEMAS = $(gsettings_in_files:.xml.in=.xml) @@ -115,7 +115,7 @@ CLEANFILES = \ $(desktop_in_files) \ $(gsettings_SCHEMAS) \ $(bin_SCRIPTS) \ - $(libexec_SCRIPTS) \ + $(pkglibexec_SCRIPTS) \ src/*.pyc \ tests/run_tests \ data/gschemas.compiled \ diff --git a/debian/changelog b/debian/changelog index 2cfa206..e0426b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 (陳昌倬) <czc...@gmail.com> Sun, 10 May 2015 18:00:01 +0800 + ibus-cangjie (2.2-2) unstable; urgency=medium [ChangZhuo Chen] diff --git a/debian/patches/0002-backport-2.4-bugfix.patch b/debian/patches/0002-backport-2.4-bugfix.patch new file mode 100644 index 0000000..2b111f1 --- /dev/null +++ b/debian/patches/0002-backport-2.4-bugfix.patch @@ -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 ++ + def update_lookup_table(self): + """Update the lookup table.""" + if not self.current_input: +--- ibus-cangjie-2.2.orig/src/setup.py ++++ ibus-cangjie-2.2/src/setup.py +@@ -99,6 +99,9 @@ class Setup(object): + We need to react, in case the value was changed from somewhere else, + for example from another setup UI. + """ ++ if key == "halfwidth-chars": ++ return ++ + if key == "version": + new_value = self.settings.get_int(key) + +--- ibus-cangjie-2.2.orig/tests/run_tests.in ++++ ibus-cangjie-2.2/tests/run_tests.in +@@ -47,6 +47,12 @@ class MockEngine: + # We don't need anything here for the unit tests + pass + ++ def update_preedit_text(self, text, cursor_pos, visible): ++ # We don't need anything here for the unit tests ++ # ++ # We only have this for an ugly workaround. ++ pass ++ + + class MockLookupTable: + def __init__(self): diff --git a/debian/patches/series b/debian/patches/series index 17a4961..1cc56fb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-install-engine-to-correct-dir.diff +0002-backport-2.4-bugfix.patch
signature.asc
Description: Digital signature