Hello community, here is the log from the commit of package ibus-pinyin for openSUSE:Factory checked in at 2017-03-03 17:45:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ibus-pinyin (Old) and /work/SRC/openSUSE:Factory/.ibus-pinyin.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ibus-pinyin" Fri Mar 3 17:45:14 2017 rev:30 rq:461268 version:1.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ibus-pinyin/ibus-pinyin.changes 2017-02-03 17:42:34.107365600 +0100 +++ /work/SRC/openSUSE:Factory/.ibus-pinyin.new/ibus-pinyin.changes 2017-03-03 17:45:15.682970806 +0100 @@ -1,0 +2,6 @@ +Wed Mar 1 06:15:22 UTC 2017 - [email protected] + +- add patch: ibus-pinyin-fix-select-words-could-be-cleared.patch + * Fix boo#980890: The select words could be cleared while use ibus-pinyin in Firefox + +------------------------------------------------------------------- New: ---- ibus-pinyin-fix-select-words-could-be-cleared.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ibus-pinyin.spec ++++++ --- /var/tmp/diff_new_pack.NhJ4wN/_old 2017-03-03 17:45:16.926795027 +0100 +++ /var/tmp/diff_new_pack.NhJ4wN/_new 2017-03-03 17:45:16.930794463 +0100 @@ -33,22 +33,25 @@ Patch3: Wlogical-not-parentheses.patch # PATFH-FIX-SUSE ibus-pinyin-default-full.patch [email protected] -- set Fullpinyin beyond dconf database as default. Patch4: ibus-pinyin-default-full.patch +# PATCH-FIX-UPSTREAM ibus-pinyin-select-words-could-be-cleared.patch [email protected] +# Fix boo#980890 -- The select words could be cleared while use ibus-pinyin in Firefox +Patch5: ibus-pinyin-fix-select-words-could-be-cleared.patch %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else BuildRequires: boost-devel %endif BuildRequires: gcc-c++ -BuildRequires: gettext-devel -BuildRequires: ibus-devel >= 1.4.99 +BuildRequires: gettext-tools BuildRequires: intltool -BuildRequires: libuuid-devel -BuildRequires: lua-devel >= 5.1 BuildRequires: python >= 2.5 -BuildRequires: pyzy-devel >= 1.0 BuildRequires: sqlite3 -BuildRequires: sqlite3-devel BuildRequires: update-desktop-files +BuildRequires: pkgconfig(ibus-1.0) >= 1.4.99 +BuildRequires: pkgconfig(lua) >= 5.1 +BuildRequires: pkgconfig(pyzy-1.0) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(uuid) Requires: ibus >= 1.4.99 Requires: opencc Requires: python-xdg @@ -68,6 +71,7 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %configure --disable-static \ @@ -78,7 +82,7 @@ %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=${RPM_BUILD_ROOT} install +%make_install %find_lang %{name} ++++++ ibus-pinyin-fix-select-words-could-be-cleared.patch ++++++ diff -Nur ibus-pinyin-1.5.0/src/PYPhoneticEditor.cc ibus-pinyin-1.5.0-new/src/PYPhoneticEditor.cc --- ibus-pinyin-1.5.0/src/PYPhoneticEditor.cc 2012-08-02 22:22:38.000000000 +0800 +++ ibus-pinyin-1.5.0-new/src/PYPhoneticEditor.cc 2017-03-01 14:07:10.359693690 +0800 @@ -32,7 +32,8 @@ PhoneticEditor::PhoneticEditor (PinyinProperties & props, Config & config) : Editor (props, config), m_observer (PinyinObserver(*this)), - m_lookup_table (m_config.pageSize ()) + m_lookup_table (m_config.pageSize ()), + m_dont_update_preedit (FALSE) { } @@ -382,7 +383,18 @@ void PhoneticEditor::reset (void) { + const String &selected_text = m_context->selectedText (); + const String &conversion_text = m_context->conversionText (); + const String &rest_text = m_context->restText (); + + if (selected_text.empty () && conversion_text.empty () && + rest_text.empty ()) + m_dont_update_preedit = TRUE; + else + m_dont_update_preedit = FALSE; + m_context->reset(); + m_dont_update_preedit = FALSE; } void @@ -424,6 +436,9 @@ void PhoneticEditor::updatePreeditText (void) { + if (m_dont_update_preedit) + return; + const String &selected_text = m_context->selectedText (); const String &conversion_text = m_context->conversionText (); const String &rest_text = m_context->restText (); diff -Nur ibus-pinyin-1.5.0/src/PYPhoneticEditor.h ibus-pinyin-1.5.0-new/src/PYPhoneticEditor.h --- ibus-pinyin-1.5.0/src/PYPhoneticEditor.h 2012-08-02 22:22:38.000000000 +0800 +++ ibus-pinyin-1.5.0-new/src/PYPhoneticEditor.h 2017-03-01 14:07:08.035693702 +0800 @@ -88,6 +88,7 @@ std::unique_ptr<PyZy::InputContext> m_context; PinyinObserver m_observer; LookupTable m_lookup_table; + gboolean m_dont_update_preedit; }; };
