From ee9c31143f63d798e0a8c4cee36f790640dce324 Mon Sep 17 00:00:00 2001 From: zonble Date: Tue, 24 Sep 2024 18:08:34 +0800 Subject: [PATCH] Use a proper header to import FCITX APIs. --- src/McBopomofo.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/McBopomofo.h b/src/McBopomofo.h index 04dae5d..9f07d64 100644 --- a/src/McBopomofo.h +++ b/src/McBopomofo.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -171,9 +172,12 @@ FCITX_CONFIGURATION( this, "AssociatedPhrasesEnabled", _("Enable Associated Phrases"), false}; -// Helps to open the user data directory. -#ifdef USE_LEGACY_FCITX5_API -#else + // Helps to open the user data directory. + // + // We have menu items in FCITX's input method to let the users to edit the + // user phrases, however, the input menu is not visiable on some desktop + // environments, so we provide another button in the preferenace dialog to + // open the user data directory. fcitx::ExternalOption userDataDir{ this, "UserDataDir", _("User Data"), fcitx::stringutils::concat( @@ -184,9 +188,7 @@ FCITX_CONFIGURATION( fcitx::StandardPath::Type::PkgData), "mcbopomofo"), "\"", "\"\"\""), - "\"")}; -#endif -); + "\"")};); class McBopomofoEngine : public fcitx::InputMethodEngine { public: