Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fcitx5-anthy for openSUSE:Factory 
checked in at 2022-02-13 00:15:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fcitx5-anthy (Old)
 and      /work/SRC/openSUSE:Factory/.fcitx5-anthy.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fcitx5-anthy"

Sun Feb 13 00:15:33 2022 rev:2 rq:953923 version:5.0.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/fcitx5-anthy/fcitx5-anthy.changes        
2022-02-10 23:12:29.428271277 +0100
+++ /work/SRC/openSUSE:Factory/.fcitx5-anthy.new.1956/fcitx5-anthy.changes      
2022-02-13 00:16:13.908258351 +0100
@@ -1,0 +2,7 @@
+Sat Feb 12 15:12:13 UTC 2022 - Marguerite Su <[email protected]>
+
+- update version 5.0.9
+  * Small fix in the paging logic. Now it's possible to always
+    go to the next page regardless of current cursor position.
+
+-------------------------------------------------------------------

Old:
----
  fcitx5-anthy-5.0.8.tar.xz

New:
----
  fcitx5-anthy-5.0.9.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fcitx5-anthy.spec ++++++
--- /var/tmp/diff_new_pack.m7DKRV/_old  2022-02-13 00:16:14.412259779 +0100
+++ /var/tmp/diff_new_pack.m7DKRV/_new  2022-02-13 00:16:14.416259791 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package fcitx5-anthy
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           fcitx5-anthy
-Version:        5.0.8
+Version:        5.0.9
 Release:        0
 Summary:        Anthy Wrapper for Fcitx5
 License:        GPL-2.0-or-later

++++++ fcitx5-anthy-5.0.8.tar.xz -> fcitx5-anthy-5.0.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/CMakeLists.txt 
new/fcitx5-anthy-5.0.9/CMakeLists.txt
--- old/fcitx5-anthy-5.0.8/CMakeLists.txt       2021-12-04 16:43:23.297494400 
+0100
+++ new/fcitx5-anthy-5.0.9/CMakeLists.txt       2022-02-02 00:50:21.426165800 
+0100
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.6)
 
-project(fcitx5-anthy VERSION 5.0.8)
+project(fcitx5-anthy VERSION 5.0.9)
 
 find_package(ECM 1.0.0 REQUIRED)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" 
${CMAKE_MODULE_PATH})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fcitx5-anthy-5.0.8/org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in 
new/fcitx5-anthy-5.0.9/org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in
--- old/fcitx5-anthy-5.0.8/org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in 
2021-12-04 16:43:23.357495000 +0100
+++ new/fcitx5-anthy-5.0.9/org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in 
2022-02-02 00:50:21.476163600 +0100
@@ -10,6 +10,7 @@
   <url type="bugtracker">https://github.com/fcitx/fcitx5-anthy/issues</url>
   <project_group>Fcitx</project_group>
   <releases>
+    <release version="5.0.9" date="2022-02-01"/>
     <release version="5.0.8" date="2021-12-04"/>
     <release version="5.0.7" date="2021-11-05"/>
     <release version="5.0.6" date="2021-08-29"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/po/de.po 
new/fcitx5-anthy-5.0.9/po/de.po
--- old/fcitx5-anthy-5.0.8/po/de.po     2021-12-04 16:31:51.088696500 +0100
+++ new/fcitx5-anthy-5.0.9/po/de.po     2022-01-20 21:01:46.712785200 +0100
@@ -5,14 +5,15 @@
 # Translators:
 # csslayer <[email protected]>, 2017
 # mar well <[email protected]>, 2018
+# Ettore Atalan <[email protected]>, 2022
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: fcitx5-anthy\n"
 "Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2021-11-25 20:24+0000\n"
+"POT-Creation-Date: 2022-01-15 20:24+0000\n"
 "PO-Revision-Date: 2017-12-26 07:08+0000\n"
-"Last-Translator: mar well <[email protected]>, 2018\n"
+"Last-Translator: Ettore Atalan <[email protected]>, 2022\n"
 "Language-Team: German (https://www.transifex.com/fcitx/teams/12005/de/)\n"
 "Language: de\n"
 "MIME-Version: 1.0\n"
@@ -235,7 +236,7 @@
 
 #: src/config.h:71 src/config.h:80
 msgid "Follow mode"
-msgstr ""
+msgstr "Folgemodus"
 
 #: src/config.h:653
 msgid "General"
@@ -327,7 +328,7 @@
 
 #: src/config.h:657
 msgid "Key Profile"
-msgstr ""
+msgstr "Tastenprofil"
 
 #: src/config.h:289
 msgid "Key binding profile"
@@ -359,7 +360,7 @@
 
 #: src/config.h:463
 msgid "Move caret backward"
-msgstr ""
+msgstr "Eingabemarke nach hinten"
 
 #: src/config.h:445
 msgid "Move caret first"
@@ -563,7 +564,7 @@
 
 #: src/config.h:17
 msgid "Vertical"
-msgstr ""
+msgstr "Vertikal"
 
 #: src/config.h:238 src/config.h:254
 msgid "Vje Delta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/po/ja.po 
new/fcitx5-anthy-5.0.9/po/ja.po
--- old/fcitx5-anthy-5.0.8/po/ja.po     2021-12-04 16:31:51.088696500 +0100
+++ new/fcitx5-anthy-5.0.9/po/ja.po     2022-01-09 07:03:04.850223800 +0100
@@ -5,15 +5,15 @@
 # Translators:
 # csslayer <[email protected]>, 2017
 # Takuro Onoue <[email protected]>, 2020
-# UTUMI Hirosi <[email protected]>, 2020
+# UTUMI Hirosi <[email protected]>, 2022
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: fcitx5-anthy\n"
 "Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2021-11-25 20:24+0000\n"
+"POT-Creation-Date: 2022-01-07 20:24+0000\n"
 "PO-Revision-Date: 2017-12-26 07:08+0000\n"
-"Last-Translator: UTUMI Hirosi <[email protected]>, 2020\n"
+"Last-Translator: UTUMI Hirosi <[email protected]>, 2022\n"
 "Language-Team: Japanese (https://www.transifex.com/fcitx/teams/12005/ja/)\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
@@ -564,7 +564,7 @@
 
 #: src/config.h:17
 msgid "Vertical"
-msgstr ""
+msgstr "???"
 
 #: src/config.h:238 src/config.h:254
 msgid "Vje Delta"
@@ -576,7 +576,7 @@
 
 #: src/config.h:71 src/config.h:79
 msgid "Wide"
-msgstr "???"
+msgstr "??????"
 
 #: src/config.h:31
 msgid "Wide Latin"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/po/ru.po 
new/fcitx5-anthy-5.0.9/po/ru.po
--- old/fcitx5-anthy-5.0.8/po/ru.po     2021-12-04 16:31:51.088696500 +0100
+++ new/fcitx5-anthy-5.0.9/po/ru.po     2022-01-20 21:01:46.712785200 +0100
@@ -4,14 +4,15 @@
 #
 # Translators:
 # csslayer <[email protected]>, 2017
+# Dmitry <[email protected]>, 2022
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: fcitx5-anthy\n"
 "Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2021-11-25 20:24+0000\n"
+"POT-Creation-Date: 2022-01-15 20:24+0000\n"
 "PO-Revision-Date: 2017-12-26 07:08+0000\n"
-"Last-Translator: csslayer <[email protected]>, 2017\n"
+"Last-Translator: Dmitry <[email protected]>, 2022\n"
 "Language-Team: Russian (https://www.transifex.com/fcitx/teams/12005/ru/)\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
@@ -48,7 +49,7 @@
 
 #: org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in:7
 msgid "Anthy for Fcitx 5"
-msgstr ""
+msgstr "Anthy ?????? Fcitx 5"
 
 #: src/config.h:237 src/config.h:252
 msgid "Atok"
@@ -120,7 +121,7 @@
 
 #: src/config.h:517
 msgid "Commit first segement reverse learn"
-msgstr ""
+msgstr "?????????????????????????? ???????????? ?????????????? 
?????????????????? ????????????????"
 
 #: src/config.h:505
 msgid "Commit first segment"
@@ -128,7 +129,7 @@
 
 #: src/config.h:523
 msgid "Commit selected segement reverse learn"
-msgstr ""
+msgstr "?????????????????????????? ?????????????????? ?????????????? 
?????????????????? ????????????????"
 
 #: src/config.h:511
 msgid "Commit selected segment"
@@ -228,7 +229,7 @@
 
 #: src/config.h:177
 msgid "Entering the pseudo ASCII input mode with capital letters"
-msgstr ""
+msgstr "???????? ?? ?????????? ?????????? ????????????-ASCII ?? 
???????????????????? ??????????????"
 
 #: src/config.h:499
 msgid "Expand segment"
@@ -236,7 +237,7 @@
 
 #: src/config.h:71 src/config.h:80
 msgid "Follow mode"
-msgstr ""
+msgstr "?????????? ????????????????????"
 
 #: src/config.h:653
 msgid "General"
@@ -244,7 +245,7 @@
 
 #: src/config.h:79
 msgid "Half"
-msgstr ""
+msgstr "????????????????"
 
 #: src/config.h:30
 msgid "Half Katakana"
@@ -284,7 +285,7 @@
 
 #: src/config.h:174
 msgid "Insert a blank with a blank key"
-msgstr ""
+msgstr "???????????????? ?????????????????? ?? ???????????? ????????????"
 
 #: src/config.h:373
 msgid "Insert space"
@@ -304,7 +305,7 @@
 
 #: org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in:8
 msgid "Japanese input method based on Anthy"
-msgstr ""
+msgstr "???????????????? ?????????? ?????????? ???? ???????????? Anthy"
 
 #: src/config.h:66 src/engine.cpp:57
 msgid "Kana"
@@ -328,7 +329,7 @@
 
 #: src/config.h:657
 msgid "Key Profile"
-msgstr ""
+msgstr "???????????????? ??????????????"
 
 #: src/config.h:289
 msgid "Key binding profile"
@@ -360,11 +361,11 @@
 
 #: src/config.h:463
 msgid "Move caret backward"
-msgstr ""
+msgstr "?????????????????????? ?????????????? ??????????"
 
 #: src/config.h:445
 msgid "Move caret first"
-msgstr ""
+msgstr "?????????????? ?????????????????????? ??????????????"
 
 #: src/config.h:457
 msgid "Move caret forward"
@@ -408,7 +409,7 @@
 
 #: src/config.h:16
 msgid "Not Set"
-msgstr ""
+msgstr "???? ????????????"
 
 #: src/config.h:168
 msgid "Number candidate of Triggers To Show Candidate Window"
@@ -432,7 +433,7 @@
 
 #: src/config.h:171
 msgid "Predict on input"
-msgstr ""
+msgstr "?????????????????????????? ?????? ??????????"
 
 #: src/config.h:267
 msgid "Quick Kana"
@@ -488,7 +489,7 @@
 
 #: src/config.h:487
 msgid "Select prev segment"
-msgstr ""
+msgstr "?????????????? ???????????????????? ??????????????"
 
 #: src/config.h:213 src/config.h:226
 msgid "Show candidates label"
@@ -524,7 +525,7 @@
 
 #: src/config.h:200
 msgid "Space type"
-msgstr ""
+msgstr "?????? ????????????????????????"
 
 #: src/config.h:197
 msgid "Symbol style"
@@ -532,7 +533,7 @@
 
 #: src/config.h:202
 msgid "Ten key type"
-msgstr ""
+msgstr "???????????? ???????????????? ??????????"
 
 #: src/engine.cpp:58
 msgid "Thumb shift"
@@ -556,15 +557,15 @@
 
 #: src/config.h:182
 msgid "Use half-width characters for numbers"
-msgstr ""
+msgstr "?????????????????????? ???????????????????????? ?????????? ?????? 
?????????? ??????????"
 
 #: src/config.h:179
 msgid "Use half-width characters for symbols"
-msgstr ""
+msgstr "?????????????????????? ????????????????????????  ?????????? ?????? 
?????????? ????????????????"
 
 #: src/config.h:17
 msgid "Vertical"
-msgstr ""
+msgstr "??????????????????????"
 
 #: src/config.h:238 src/config.h:254
 msgid "Vje Delta"
@@ -576,7 +577,7 @@
 
 #: src/config.h:71 src/config.h:79
 msgid "Wide"
-msgstr ""
+msgstr "????????????"
 
 #: src/config.h:31
 msgid "Wide Latin"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/src/conversion.cpp 
new/fcitx5-anthy-5.0.9/src/conversion.cpp
--- old/fcitx5-anthy-5.0.8/src/conversion.cpp   2021-11-16 18:40:14.659921400 
+0100
+++ new/fcitx5-anthy-5.0.9/src/conversion.cpp   2022-01-20 21:01:46.716118600 
+0100
@@ -424,15 +424,47 @@
     int idx_;
 };
 
+class AnthyCandidateList : public fcitx::CommonCandidateList {
+public:
+    AnthyCandidateList(AnthyState &anthy) : anthy_(anthy) {}
+
+    void prev() override {
+        fcitx::CommonCandidateList::prev();
+        syncCursor();
+    }
+    void next() override {
+        fcitx::CommonCandidateList::next();
+        syncCursor();
+    }
+    void prevCandidate() override {
+        fcitx::CommonCandidateList::prevCandidate();
+        syncCursor();
+    }
+    void nextCandidate() override {
+        fcitx::CommonCandidateList::nextCandidate();
+        syncCursor();
+    }
+
+private:
+    void syncCursor() {
+        if (int index = globalCursorIndex(); index >= 0) {
+            anthy_.selectCandidateNoDirect(index);
+        }
+    }
+    AnthyState &anthy_;
+};
+
 //
 // candidates for a segment or prediction
 //
 std::unique_ptr<fcitx::CommonCandidateList>
 Conversion::candidates(int segment_id) {
-    auto table = std::make_unique<fcitx::CommonCandidateList>();
+    auto table = std::make_unique<AnthyCandidateList>(state_);
     table->setLayoutHint(*state_.config().general->candidateLayout);
     auto pageSize = *state_.config().general->pageSize;
     table->setPageSize(*state_.config().general->pageSize);
+    table->setCursorPositionAfterPaging(
+        fcitx::CursorPositionAfterPaging::SameAsLast);
     int selected = selectedCandidate();
 
     if (isPredicting()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/src/state.cpp 
new/fcitx5-anthy-5.0.9/src/state.cpp
--- old/fcitx5-anthy-5.0.8/src/state.cpp        2020-11-25 20:05:11.194942000 
+0100
+++ new/fcitx5-anthy-5.0.9/src/state.cpp        2022-01-20 21:01:46.716118600 
+0100
@@ -241,14 +241,6 @@
     setPreedition();
 
     setLookupTable();
-    if (auto candList = ic_->inputPanel().candidateList()) {
-        if (cursorPos_ >= 0 && cursorPos_ < candList->size()) {
-            auto commonCandList =
-                std::static_pointer_cast<fcitx::CommonCandidateList>(candList);
-            commonCandList->setGlobalCursorIndex(cursorPos_);
-            commonCandList->setPage(cursorPos_ / *config().general->pageSize);
-        }
-    }
 
     // update aux string
     if (*config().general->showCandidatesLabel)
@@ -317,7 +309,7 @@
     }
 }
 
-int AnthyState::setLookupTable() {
+std::shared_ptr<fcitx::CandidateList> AnthyState::setLookupTable() {
 
     // if (!is_selecting_candidates ()) {
     if (isRealtimeConversion() && preedit_.selectedSegment() < 0) {
@@ -332,7 +324,7 @@
     auto candList = preedit_.candidates();
 
     if (candList->size() == 0) {
-        return 0;
+        return nullptr;
     }
 
     // update preedit
@@ -343,23 +335,30 @@
         *config().general->nTriggersToShowCandWin > 0 &&
         (int)nConvKeyPressed_ >= *config().general->nTriggersToShowCandWin;
 
-    int len = candList->totalSize();
-
+    bool setCandidateList = true;
     if (!lookupTableVisible_ && (preedit_.isPredicting() || beyond_threshold)) 
{
         lookupTableVisible_ = true;
         nConvKeyPressed_ = 0;
-
-        if (*config().general->showCandidatesLabel) {
-            setAuxString();
-        }
     } else if (!lookupTableVisible_) {
-        candList.reset();
+        setCandidateList = false;
     }
 
-    ic_->inputPanel().setCandidateList(std::move(candList));
+    if (cursorPos_ >= 0 && cursorPos_ < candList->size()) {
+        candList->setGlobalCursorIndex(cursorPos_);
+        candList->setPage(cursorPos_ / *config().general->pageSize);
+    }
     uiUpdate_ = true;
 
-    return len;
+    if (setCandidateList) {
+        ic_->inputPanel().setCandidateList(std::move(candList));
+
+        if (*config().general->showCandidatesLabel) {
+            setAuxString();
+        }
+        return ic_->inputPanel().candidateList();
+    }
+    ic_->inputPanel().setCandidateList(nullptr);
+    return std::shared_ptr<fcitx::CandidateList>(candList.release());
 }
 
 void AnthyState::unsetLookupTable() {
@@ -1003,15 +1002,11 @@
         return false;
 
     // if (!is_selecting_candidates ())
-    int end = setLookupTable();
-
-    if (cursorPos_ >= end - 1)
-        cursorPos_ = 0;
-    else
-        cursorPos_++;
+    auto candList = setLookupTable();
     nConvKeyPressed_++;
-
-    selectCandidateNoDirect(cursorPos_);
+    if (candList) {
+        candList->toCursorMovable()->nextCandidate();
+    }
     return true;
 }
 
@@ -1019,27 +1014,12 @@
     if (!preedit_.isConverting())
         return false;
     // if (!is_selecting_candidates ())
-    int end = setLookupTable();
-
-    if (end < 0)
-        end = 0;
-    if (cursorPos_ == 0)
-        cursorPos_ = end - 1;
-    else
-        cursorPos_--;
+    auto candList = setLookupTable();
     nConvKeyPressed_++;
-
-    if (auto candList = ic_->inputPanel().candidateList()) {
-        if (candList->size() > cursorPos_ && cursorPos_ >= 0) {
-            auto commonCandList =
-                std::static_pointer_cast<fcitx::CommonCandidateList>(candList);
-            commonCandList->setGlobalCursorIndex(cursorPos_);
-            commonCandList->setPage(cursorPos_ / *config().general->pageSize);
-        }
+    if (candList) {
+        candList->toCursorMovable()->prevCandidate();
     }
 
-    selectCandidateNoDirect(cursorPos_);
-
     return true;
 }
 
@@ -1078,9 +1058,9 @@
     if (!lookupTableVisible_)
         return false;
 
-    if (cursorPos_ - *config().general->pageSize >= 0) {
-        cursorPos_ -= *config().general->pageSize;
-        selectCandidateNoDirect(cursorPos_);
+    if (auto pageable = ic_->inputPanel().candidateList()->toPageable();
+        pageable && pageable->hasPrev()) {
+        pageable->prev();
     }
 
     return true;
@@ -1094,11 +1074,9 @@
     if (!lookupTableVisible_)
         return false;
 
-    int end = ic_->inputPanel().candidateList()->toBulk()->totalSize();
-
-    if (cursorPos_ + *config().general->pageSize < end) {
-        cursorPos_ += *config().general->pageSize;
-        selectCandidateNoDirect(cursorPos_);
+    if (auto pageable = ic_->inputPanel().candidateList()->toPageable();
+        pageable && pageable->hasNext()) {
+        pageable->next();
     }
 
     return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-anthy-5.0.8/src/state.h 
new/fcitx5-anthy-5.0.9/src/state.h
--- old/fcitx5-anthy-5.0.8/src/state.h  2020-05-08 23:56:29.367088800 +0200
+++ new/fcitx5-anthy-5.0.9/src/state.h  2022-01-20 21:01:46.716118600 +0100
@@ -134,6 +134,7 @@
     bool actionSelectCandidate(unsigned int i);
     void resetCursor(int cursor);
     void autoCommit(fcitx::InputContextEvent &event);
+    void selectCandidateNoDirect(unsigned int item);
 
 private:
     /* processing key event */
@@ -145,13 +146,12 @@
     /* utility */
     void setPreedition();
     void setAuxString();
-    int setLookupTable();
+    std::shared_ptr<fcitx::CandidateList> setLookupTable();
     void unsetLookupTable();
     void installProperties();
     void setPeriodStyle(PeriodStyle period, CommaStyle comma);
     void setSymbolStyle(BracketStyle bracket, SlashStyle slash);
     bool isSelectingCandidates();
-    void selectCandidateNoDirect(unsigned int item);
     bool convertKana(CandidateType type);
 
     bool action_commit(bool learn, bool do_real_commit = true);

Reply via email to