summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2021-02-27 20:10:32 +0000
committerryoon <ryoon@pkgsrc.org>2021-02-27 20:10:32 +0000
commitef90b3be88b6ea8fdf2ce40bd9cbebe2b8c62d2f (patch)
treeb65ec10bfbfd7badddfcdf7290c673a2bed9ea29 /inputmethod
parentf93569aac8efbf9a19d06e5cc85c36f8429fd9f0 (diff)
downloadpkgsrc-ef90b3be88b6ea8fdf2ce40bd9cbebe2b8c62d2f.tar.gz
fcitx5-skk: Update to 5.0.4
Changelog: * Add input mode floating window. * Update translations.
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/fcitx5-skk/Makefile4
-rw-r--r--inputmethod/fcitx5-skk/distinfo11
-rw-r--r--inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff135
3 files changed, 7 insertions, 143 deletions
diff --git a/inputmethod/fcitx5-skk/Makefile b/inputmethod/fcitx5-skk/Makefile
index cb724d1bc4d..76cf1bbe478 100644
--- a/inputmethod/fcitx5-skk/Makefile
+++ b/inputmethod/fcitx5-skk/Makefile
@@ -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 --git a/inputmethod/fcitx5-skk/distinfo b/inputmethod/fcitx5-skk/distinfo
index e49f2ff9f0a..f68e4e1b411 100644
--- a/inputmethod/fcitx5-skk/distinfo
+++ b/inputmethod/fcitx5-skk/distinfo
@@ -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 --git a/inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff b/inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff
deleted file mode 100644
index f78b965c945..00000000000
--- a/inputmethod/fcitx5-skk/patches/patch-current-mode-popup.diff
+++ /dev/null
@@ -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