From 6670ee244eef4af6542725781c0c902fb6eeab74 Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Tue, 12 Nov 2024 21:39:28 -0500 Subject: [PATCH] Revert "fix name conflict with rime for static build (#8)" This reverts commit 3a43635289762248ccc1b24b4ad2a7858828877c. --- src/hallelujah.cpp | 11 +++++------ src/hallelujah.h | 22 +++++++++------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/hallelujah.cpp b/src/hallelujah.cpp index adcd873..aac78cf 100644 --- a/src/hallelujah.cpp +++ b/src/hallelujah.cpp @@ -103,17 +103,16 @@ void HallelujahState::updatePreedit(InputContext *ic) { preedit.setCursor(buffer_.cursor()); } - hallelujah::PreeditMode mode = - ic->capabilityFlags().test(CapabilityFlag::Preedit) - ? *engine_->config().preeditMode - : hallelujah::PreeditMode::No; + PreeditMode mode = ic->capabilityFlags().test(CapabilityFlag::Preedit) + ? *engine_->config().preeditMode + : PreeditMode::No; auto &inputPanel = ic->inputPanel(); switch (mode) { - case hallelujah::PreeditMode::No: + case PreeditMode::No: inputPanel.setPreedit(preedit); inputPanel.setClientPreedit(Text()); break; - case hallelujah::PreeditMode::ComposingText: + case PreeditMode::ComposingText: inputPanel.setClientPreedit(preedit); break; } diff --git a/src/hallelujah.h b/src/hallelujah.h index 2dcee57..0ab0c36 100644 --- a/src/hallelujah.h +++ b/src/hallelujah.h @@ -14,24 +14,20 @@ #include namespace fcitx { -namespace hallelujah { enum class PreeditMode { No, ComposingText }; FCITX_CONFIG_ENUM_NAME_WITH_I18N(PreeditMode, N_("Do not show"), N_("Composing text")) -} // namespace hallelujah -FCITX_CONFIGURATION(HallelujahEngineConfig, - OptionWithAnnotation - preeditMode{this, "PreeditMode", _("Preedit Mode"), - hallelujah::PreeditMode::ComposingText}; - Option showIPA{this, "ShowIPA", _("Show IPA"), true}; - Option showTranslation{this, "ShowTranslation", - _("Show translation"), true}; - Option commitWithSpace{this, "CommitWithSpace", - _("Commit with space"), - false};); +FCITX_CONFIGURATION( + HallelujahEngineConfig, + OptionWithAnnotation preeditMode{ + this, "PreeditMode", _("Preedit Mode"), PreeditMode::ComposingText}; + Option showIPA{this, "ShowIPA", _("Show IPA"), true}; + Option showTranslation{this, "ShowTranslation", _("Show translation"), + true}; + Option commitWithSpace{this, "CommitWithSpace", + _("Commit with space"), false};); struct HallelujahWord { HallelujahWord(const std::vector &translation,