Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fcitx5-chewing for openSUSE:Factory checked in at 2025-06-23 15:04:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcitx5-chewing (Old) and /work/SRC/openSUSE:Factory/.fcitx5-chewing.new.7067 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcitx5-chewing" Mon Jun 23 15:04:08 2025 rev:12 rq:1287684 version:5.1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/fcitx5-chewing/fcitx5-chewing.changes 2025-01-29 16:18:04.730630500 +0100 +++ /work/SRC/openSUSE:Factory/.fcitx5-chewing.new.7067/fcitx5-chewing.changes 2025-06-23 15:04:56.804917496 +0200 @@ -1,0 +2,6 @@ +Sun Jun 22 03:45:07 UTC 2025 - Marguerite Su <i...@marguerite.su> + +- update to 5.1.8 + * Port to StandardPaths + +------------------------------------------------------------------- Old: ---- fcitx5-chewing-5.1.7.tar.zst New: ---- fcitx5-chewing-5.1.8.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcitx5-chewing.spec ++++++ --- /var/tmp/diff_new_pack.COugV2/_old 2025-06-23 15:04:57.512947035 +0200 +++ /var/tmp/diff_new_pack.COugV2/_new 2025-06-23 15:04:57.512947035 +0200 @@ -17,7 +17,7 @@ Name: fcitx5-chewing -Version: 5.1.7 +Version: 5.1.8 Release: 0 Summary: Chewing Wrapper for Fcitx5 License: GPL-2.0-or-later @@ -26,7 +26,11 @@ BuildRequires: cmake BuildRequires: extra-cmake-modules BuildRequires: fcitx5-devel +%if 0%{?suse_version} >= 1550 BuildRequires: gcc-c++ +%else +BuildRequires: gcc13-c++ +%endif BuildRequires: hicolor-icon-theme BuildRequires: libchewing-devel BuildRequires: pkgconfig @@ -46,6 +50,9 @@ %setup -q %build +%if 0%{?suse_version} < 1550 +export CXX=%{_bindir}/g++-13 +%endif %cmake %make_build ++++++ fcitx5-chewing-5.1.7.tar.zst -> fcitx5-chewing-5.1.8.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/CMakeLists.txt new/fcitx5-chewing-5.1.8/CMakeLists.txt --- old/fcitx5-chewing-5.1.7/CMakeLists.txt 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/CMakeLists.txt 2025-06-16 08:25:06.000000000 +0200 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.6) -project(fcitx5-chewing VERSION 5.1.7) +project(fcitx5-chewing VERSION 5.1.8) -set(REQUIRED_FCITX_VERSION 5.1.12) +set(REQUIRED_FCITX_VERSION 5.1.13) find_package(ECM REQUIRED 1.0.0) 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-chewing-5.1.7/org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in new/fcitx5-chewing-5.1.8/org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in --- old/fcitx5-chewing-5.1.7/org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in 2025-06-16 08:25:06.000000000 +0200 @@ -14,6 +14,7 @@ <url type="vcs-browser">https://github.com/fcitx/fcitx5-chewing</url> <project_group>Fcitx</project_group> <releases> + <release version="5.1.8" date="2025-06-15"/> <release version="5.1.7" date="2025-01-22"/> <release version="5.1.6" date="2024-10-08"/> <release version="5.1.5" date="2024-06-12"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/po/LINGUAS new/fcitx5-chewing-5.1.8/po/LINGUAS --- old/fcitx5-chewing-5.1.7/po/LINGUAS 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/po/LINGUAS 2025-06-16 08:25:06.000000000 +0200 @@ -7,5 +7,6 @@ ko ru tr +vi zh_CN zh_TW diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/po/vi.po new/fcitx5-chewing-5.1.8/po/vi.po --- old/fcitx5-chewing-5.1.7/po/vi.po 1970-01-01 01:00:00.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/po/vi.po 2025-06-16 08:25:06.000000000 +0200 @@ -0,0 +1,192 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the fcitx5-chewing package. +# +# Translators: +# hoanghuy309 <hoanghuy...@gmail.com>, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: fcitx5-chewing\n" +"Report-Msgid-Bugs-To: fcitx-...@googlegroups.com\n" +"POT-Creation-Date: 2025-04-22 20:24+0000\n" +"PO-Revision-Date: 2017-12-08 17:30+0000\n" +"Last-Translator: hoanghuy309 <hoanghuy...@gmail.com>, 2025\n" +"Language-Team: Vietnamese (https://app.transifex.com/fcitx/teams/12005/vi/)\n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: src/eim.h:55 +msgid "1234567890" +msgstr "" + +#: src/eim.h:58 +msgid "1234qweras" +msgstr "" + +#: src/eim.h:172 +msgid "Action when switching input method" +msgstr "Hành động khi chuyển đổi kiểu gõ" + +#: src/eim.h:175 +msgid "Add Phrase Forward" +msgstr "" + +#: src/eim.h:179 +msgid "Automatically shift cursor" +msgstr "" + +#: src/eim.h:177 +msgid "Backward phrase choice" +msgstr "" + +#: src/eim.h:165 +msgid "Candidate List Layout" +msgstr "" + +#: src/eim.h:108 +msgid "Carpalx Keyboard" +msgstr "" + +#: src/chewing-addon.conf.in.in:2 src/chewing.conf.in:2 +msgid "Chewing" +msgstr "" + +#: src/chewing-addon.conf.in.in:3 +msgid "Chewing Wrapper For Fcitx" +msgstr "" + +#: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:7 +msgid "Chewing for Fcitx 5" +msgstr "" + +#: org.fcitx.Fcitx5.Addon.Chewing.metainfo.xml.in:8 +msgid "Chewing input method" +msgstr "" + +#: src/eim.h:149 +msgid "Clear" +msgstr "" + +#: src/eim.h:109 +msgid "Colemak-DH ANSI Keyboard" +msgstr "" + +#: src/eim.h:109 +msgid "Colemak-DH Orth Keyboard" +msgstr "" + +#: src/eim.h:150 +msgid "Commit current preedit" +msgstr "" + +#: src/eim.h:151 +msgid "Commit default selection" +msgstr "" + +#: src/eim.h:106 +msgid "DACHEN_CP26 Keyboard" +msgstr "" + +#: src/eim.h:103 +msgid "Default Keyboard" +msgstr "Bàn Phím Mặc Định" + +#: src/eim.h:105 +msgid "Dvorak Keyboard" +msgstr "" + +#: src/eim.h:106 +msgid "Dvorak Keyboard with Hsu's support" +msgstr "" + +#: src/eim.h:104 +msgid "ETen Keyboard" +msgstr "" + +#: src/eim.h:105 +msgid "ETen26 Keyboard" +msgstr "" + +#: src/eim.h:181 +msgid "Enable easy symbol" +msgstr "" + +#: src/eim.h:104 +msgid "Gin-Yieh Keyboard" +msgstr "" + +#: src/eim.h:107 +msgid "Han-Yu PinYin Keyboard" +msgstr "" + +#: src/eim.h:40 +msgid "Horizontal" +msgstr "" + +#: src/eim.h:103 +msgid "Hsu's Keyboard" +msgstr "" + +#: src/eim.h:104 +msgid "IBM Keyboard" +msgstr "" + +#: src/eim.h:184 +msgid "Keyboard Layout" +msgstr "Bố Cục Bàn Phím" + +#: src/eim.h:108 +msgid "MPS2 PinYin Keyboard" +msgstr "" + +#: src/eim.h:161 +msgid "Page Size" +msgstr "" + +#: src/eim.h:160 +msgid "Select candidate with arrow key" +msgstr "Chọn ứng cử viên với phím mũi tên" + +#: src/eim.h:156 +msgid "Selection Key" +msgstr "Phím Lựa Chọn" + +#: src/eim.h:183 +msgid "Space as selection key" +msgstr "Khoảng trắng làm phím lựa chọn" + +#: src/eim.h:107 +msgid "THL PinYin Keyboard" +msgstr "" + +#: src/eim.h:168 +msgid "Use Keypad as Selection key" +msgstr "" + +#: src/eim.h:39 +msgid "Vertical" +msgstr "" + +#: src/eim.h:57 +msgid "aoeuhtn789" +msgstr "" + +#: src/eim.h:56 +msgid "asdfghjkl;" +msgstr "" + +#: src/eim.h:57 +msgid "asdfjkl789" +msgstr "" + +#: src/eim.h:56 +msgid "asdfzxcv89" +msgstr "" + +#: src/eim.h:58 +msgid "dstnaeo789" +msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/src/eim.cpp new/fcitx5-chewing-5.1.8/src/eim.cpp --- old/fcitx5-chewing-5.1.7/src/eim.cpp 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/src/eim.cpp 2025-06-16 08:25:06.000000000 +0200 @@ -6,21 +6,33 @@ * */ #include "eim.h" +#include <array> #include <chewing.h> #include <cstdarg> #include <cstdio> +#include <fcitx-config/iniparser.h> +#include <fcitx-utils/capabilityflags.h> +#include <fcitx-utils/key.h> #include <fcitx-utils/keysym.h> #include <fcitx-utils/log.h> +#include <fcitx-utils/standardpaths.h> +#include <fcitx-utils/textformatflags.h> #include <fcitx-utils/utf8.h> +#include <fcitx/addoninstance.h> #include <fcitx/candidatelist.h> #include <fcitx/event.h> #include <fcitx/inputcontext.h> #include <fcitx/inputpanel.h> +#include <fcitx/instance.h> #include <fcitx/statusarea.h> #include <fcitx/text.h> #include <fcitx/userinterface.h> #include <fcitx/userinterfacemanager.h> +#include <filesystem> #include <memory> +#include <stdexcept> +#include <string> +#include <string_view> #include <utility> #include <vector> @@ -33,12 +45,17 @@ constexpr int CHEWING_MAX_LEN = 18; -const char *builtin_selectkeys[] = { - "1234567890", "asdfghjkl;", "asdfzxcv89", "asdfjkl789", - "aoeuhtn789", "1234qweras", "dstnaeo789", -}; +constexpr auto builtin_selectkeys = std::to_array<std::string_view>({ + "1234567890", + "asdfghjkl;", + "asdfzxcv89", + "asdfjkl789", + "aoeuhtn789", + "1234qweras", + "dstnaeo789", +}); -static_assert(FCITX_ARRAY_SIZE(builtin_selectkeys) == +static_assert(builtin_selectkeys.size() == ChewingSelectionKeyI18NAnnotation::enumLength, "Enum mismatch"); @@ -64,7 +81,7 @@ void select(InputContext *inputContext) const override { auto *ctx = engine_->context(); auto pageSize = chewing_get_candPerPage(ctx); - int page = index_ / pageSize + chewing_cand_CurrentPage(ctx); + int page = (index_ / pageSize) + chewing_cand_CurrentPage(ctx); int off = index_ % pageSize; if (page < 0 || page >= chewing_cand_TotalPage(ctx)) { return; @@ -274,11 +291,11 @@ } // namespace ChewingContext *getChewingContext() { - const auto &sp = StandardPath::global(); - std::string dictData = - sp.locate(StandardPath::Type::Data, "libchewing/dictionary.dat"); + const auto &sp = StandardPaths::global(); + std::filesystem::path dictData = + sp.locate(StandardPathsType::Data, "libchewing/dictionary.dat"); if (!dictData.empty()) { - std::string sysPath = fs::dirName(dictData); + std::string sysPath = dictData.parent_path().string(); return chewing_new2(sysPath.c_str(), nullptr, nullptr, nullptr); } return chewing_new(); @@ -365,7 +382,7 @@ } } -bool ChewingEngine::handleCandidateKeyEvent(const KeyEvent &keyEvent) { +bool ChewingEngine::handleCandidateKeyEvent(const KeyEvent &keyEvent) const { auto *ic = keyEvent.inputContext(); auto candidateList = std::dynamic_pointer_cast<ChewingCandidateList>( ic->inputPanel().candidateList()); @@ -540,7 +557,7 @@ keyEvent.filterAndAccept(); ic->commitString(safeChewing_commit_String(ctx)); } - return updateUI(ic); + updateUI(ic); } void ChewingEngine::filterKey(const InputMethodEntry & /*entry*/, @@ -554,7 +571,8 @@ keyEvent.key().check(FcitxKey_space, KeyState::Shift) || keyEvent.key().check(FcitxKey_Tab) || keyEvent.key().check(FcitxKey_Return, KeyState::Shift))) { - return keyEvent.filterAndAccept(); + keyEvent.filterAndAccept(); + return; } if (!ic->inputPanel().candidateList()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/src/eim.h new/fcitx5-chewing-5.1.8/src/eim.h --- old/fcitx5-chewing-5.1.7/src/eim.h 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/src/eim.h 2025-06-16 08:25:06.000000000 +0200 @@ -219,7 +219,7 @@ ChewingContext *context() { return context_.get(); } private: - bool handleCandidateKeyEvent(const KeyEvent &keyEvent); + bool handleCandidateKeyEvent(const KeyEvent &keyEvent) const; void updatePreeditImpl(InputContext *ic); FCITX_ADDON_DEPENDENCY_LOADER(chttrans, instance_->addonManager()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-chewing-5.1.7/test/testchewing.cpp new/fcitx5-chewing-5.1.8/test/testchewing.cpp --- old/fcitx5-chewing-5.1.7/test/testchewing.cpp 2025-01-23 00:27:18.000000000 +0100 +++ new/fcitx5-chewing-5.1.8/test/testchewing.cpp 2025-06-16 08:25:06.000000000 +0200 @@ -12,7 +12,6 @@ #include <fcitx-utils/keysym.h> #include <fcitx-utils/log.h> #include <fcitx-utils/macros.h> -#include <fcitx-utils/standardpath.h> #include <fcitx-utils/testing.h> #include <fcitx/addonmanager.h> #include <fcitx/inputmethodgroup.h>