pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod/fcitx5-skk fcitx5-skk: Update to 5.0.4



details:   https://anonhg.NetBSD.org/pkgsrc/rev/291f3dfade04
branches:  trunk
changeset: 447846:291f3dfade04
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Feb 27 20:10:32 2021 +0000

description:
fcitx5-skk: Update to 5.0.4

Changelog:
* Add input mode floating window.
* Update translations.

diffstat:

 inputmethod/fcitx5-skk/Makefile                              |    4 +-
 inputmethod/fcitx5-skk/distinfo                              |   11 +-
 inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff |  135 -----------
 3 files changed, 7 insertions(+), 143 deletions(-)

diffs (167 lines):

diff -r dcdb28d0ff18 -r 291f3dfade04 inputmethod/fcitx5-skk/Makefile
--- a/inputmethod/fcitx5-skk/Makefile   Sat Feb 27 20:08:22 2021 +0000
+++ b/inputmethod/fcitx5-skk/Makefile   Sat Feb 27 20:10:32 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2021/02/17 15:26:00 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2021/02/27 20:10:32 ryoon Exp $
 
-DISTNAME=      fcitx5-skk-5.0.3
+DISTNAME=      fcitx5-skk-5.0.4
 CATEGORIES=    inputmethod
 MASTER_SITES=  https://download.fcitx-im.org/fcitx5/fcitx5-skk/
 EXTRACT_SUFX=  .tar.xz
diff -r dcdb28d0ff18 -r 291f3dfade04 inputmethod/fcitx5-skk/distinfo
--- a/inputmethod/fcitx5-skk/distinfo   Sat Feb 27 20:08:22 2021 +0000
+++ b/inputmethod/fcitx5-skk/distinfo   Sat Feb 27 20:10:32 2021 +0000
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.1 2021/02/17 15:26:00 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2021/02/27 20:10:32 ryoon Exp $
 
-SHA1 (fcitx5-skk-5.0.3.tar.xz) = 772d97d170371788775e74de7b001b196cca1e57
-RMD160 (fcitx5-skk-5.0.3.tar.xz) = 21248a0de443e30ae54e3bf55d62d8091e03dd86
-SHA512 (fcitx5-skk-5.0.3.tar.xz) = a66feb197640b0b49cec604fa1391b9c87f67ed90b884342809a9a07329df006d16d36cc9cf34c0fcf803c5ae83d4d71884224fe2521a9cc81ab7713ba0621bc
-Size (fcitx5-skk-5.0.3.tar.xz) = 36084 bytes
-SHA1 (patch-current-mode-popup.diff) = 7a01774f600ef9db45519aaad5c79602cd311ae5
+SHA1 (fcitx5-skk-5.0.4.tar.xz) = 3d25d065fafcc831a1f96111e4532e574a84aa50
+RMD160 (fcitx5-skk-5.0.4.tar.xz) = 2b33796a23590d9d7f502eb0cd08a516fb493d7e
+SHA512 (fcitx5-skk-5.0.4.tar.xz) = aeb9a6f23f6bebc9650868fe1c7f840cd4e05f4dce494402200f2ddf207e389d8db5f86f115c1c26598cdcda89c3ec2a12c91b07eb6961104a95fa1a9a88e2e8
+Size (fcitx5-skk-5.0.4.tar.xz) = 36448 bytes
diff -r dcdb28d0ff18 -r 291f3dfade04 inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff
--- a/inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff      Sat Feb 27 20:08:22 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-$NetBSD: patch-current-mode-popup.diff,v 1.1 2021/02/17 15:26:01 ryoon Exp $
-
-* Add floating status window.
-  From upstream git repo.
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 971a4ff..31310ea 100644
---- src/CMakeLists.txt
-+++ src/CMakeLists.txt
-@@ -12,7 +12,7 @@ target_link_libraries(skk
- set_target_properties(skk PROPERTIES PREFIX "")
- install(TARGETS skk DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5")
- fcitx5_translate_desktop_file(skk.conf.in skk.conf)
--install(FILES "${CMAKE_CURRENT_BINARY_DIR}/skk.conf" "${CMAKE_CURRENT_BINARY_DIR}/skk.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/inputmethod")
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/skk.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/inputmethod")
- fcitx5_translate_desktop_file(skk-addon.conf.in skk-addon.conf)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/skk-addon.conf" RENAME skk.conf DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon")
- 
-diff --git a/src/skk.conf.in b/src/skk.conf.in
-index 139e557..0a100b3 100644
---- src/skk.conf.in
-+++ src/skk.conf.in
-@@ -3,5 +3,5 @@ Name=Skk
- Icon=fcitx-skk
- LangCode=ja
- Addon=skk
--Label=skk
-+Label=SKK
- Configurable=True
-diff --git a/src/skk.cpp b/src/skk.cpp
-index a689252..4b92571 100644
---- src/skk.cpp
-+++ src/skk.cpp
-@@ -562,6 +562,7 @@ SkkState::SkkState(SkkEngine *engine, InputContext *ic)
-     skk_context_set_period_style(context, *engine_->config().punctuationStyle);
-     skk_context_set_input_mode(context, *engine_->config().inputMode);
- 
-+    lastMode_ = skk_context_get_input_mode(context);
-     g_signal_connect(context, "notify::input-mode",
-                      G_CALLBACK(SkkState::input_mode_changed_cb), this);
-     g_signal_connect(context, "retrieve_surrounding_text",
-@@ -673,15 +674,14 @@ bool SkkState::handleCandidate(KeyEvent &keyEvent) {
- }
- 
- void SkkState::updateUI() {
--    auto context = context_.get();
--
-     auto &inputPanel = ic_->inputPanel();
--    inputPanel.reset();
-+    auto context = context_.get();
- 
-     SkkCandidateList *skkCandidates = skk_context_get_candidates(context);
-+
-+    std::unique_ptr<SkkFcitxCandidateList> candidateList;
-     if (skk_candidate_list_get_page_visible(skkCandidates)) {
--        inputPanel.setCandidateList(
--            std::make_unique<SkkFcitxCandidateList>(engine_, ic_));
-+        candidateList = std::make_unique<SkkFcitxCandidateList>(engine_, ic_);
-     }
- 
-     if (auto str = UniqueCPtr<char, g_free>{skk_context_poll_output(context)}) {
-@@ -690,6 +690,32 @@ void SkkState::updateUI() {
-         }
-     }
-     Text preedit = skkContextGetPreedit(context);
-+
-+    // Skk almost filter every key, which makes it calls updateUI on release.
-+    // We add an additional check here for checking if the UI is empty or not.
-+    // If previous state is empty and the current state is also empty, we'll
-+    // ignore the UI update. This makes the input method info not disappear
-+    // immediately up key release.
-+    bool lastIsEmpty = lastIsEmpty_;
-+    bool newIsEmpty = preedit.empty() && !candidateList;
-+    lastIsEmpty_ = newIsEmpty;
-+
-+    // Ensure we are not composing any text.
-+    if (modeChanged_ && newIsEmpty) {
-+        inputPanel.reset();
-+        engine_->instance()->showInputMethodInformation(ic_);
-+        return;
-+    }
-+
-+    if (lastIsEmpty && newIsEmpty) {
-+        return;
-+    }
-+
-+    inputPanel.reset();
-+    if (candidateList) {
-+        inputPanel.setCandidateList(std::move(candidateList));
-+    }
-+
-     if (ic_->capabilityFlags().test(CapabilityFlag::Preedit)) {
-         inputPanel.setClientPreedit(preedit);
-         ic_->updatePreedit();
-@@ -723,11 +749,17 @@ void SkkState::copyTo(InputContextProperty *property) {
-                                skk_context_get_input_mode(context()));
- }
- 
--void SkkState::updateInputMode() { engine_->modeAction()->update(ic_); }
-+void SkkState::updateInputMode() {
-+    engine_->modeAction()->update(ic_);
-+    auto newMode = skk_context_get_input_mode(context());
-+    if (lastMode_ != newMode) {
-+        lastMode_ = newMode;
-+        modeChanged_ = true;
-+    }
-+}
- 
- void SkkState::input_mode_changed_cb(GObject *, GParamSpec *, SkkState *skk) {
-     skk->updateInputMode();
--    skk->modeChanged_ = true;
- }
- 
- gboolean SkkState::retrieve_surrounding_text_cb(GObject *, gchar **text,
-diff --git a/src/skk.h b/src/skk.h
-index 051dd5c..d0cb401 100644
---- src/skk.h
-+++ src/skk.h
-@@ -142,6 +142,7 @@ class SkkEngine final : public InputMethodEngine {
- 
-     auto &factory() { return factory_; }
-     auto &config() { return config_; }
-+    auto instance() { return instance_; }
-     void setConfig(const RawConfig &config) override {
-         config_.load(config, true);
-         safeSaveAsIni(config_, "conf/skk.conf");
-@@ -213,6 +214,8 @@ class SkkState final : public InputContextProperty {
-     InputContext *ic_;
-     GObjectUniquePtr<SkkContext> context_;
-     bool modeChanged_ = false;
-+    SkkInputMode lastMode_ = SKK_INPUT_MODE_DEFAULT;
-+    bool lastIsEmpty_ = true;
- };
- 
- } // namespace fcitx



Home | Main Index | Thread Index | Old Index