@@ -36,10 +36,16 @@ FCITX_CONFIG_ENUM_NAME_WITH_I18N(CandidateLayoutHint, N_("Not set"),
3636 N_ (" Vertical" ), N_(" Horizontal" ));
3737
3838FCITX_CONFIG_ENUM (CandidateSelectionKeys, Number, ABCD, QwertyCenter)
39+
40+ enum class ShowAnnotationCondition {
41+ Always, SingleCandidate, Never
42+ };
43+ FCITX_CONFIG_ENUM_NAME_WITH_I18N (ShowAnnotationCondition, N_(" Always" ),
44+ N_ (" SingleCandidate" ), N_(" Never" ));
45+
3946static constexpr const char *CandidateSelectionKeys_Annotations[] = {
4047 " Number (1,2,3,...)" , " ABCD (a,b,c,d,...)" ,
4148 " Qwerty Center row (a,s,d,f,...)" };
42-
4349struct CandidateSelectionKeysAnnotation : public EnumAnnotation {
4450 void dumpDescription (RawConfig &config) const {
4551 EnumAnnotation::dumpDescription (config);
@@ -132,10 +138,13 @@ FCITX_CONFIGURATION(
132138 candidateSelectionKeys{this , " Candidate selection keys" ,
133139 _ (" Candidate selection keys" ),
134140 CandidateSelectionKeys::Number};
141+ OptionWithAnnotation<ShowAnnotationCondition,
142+ ShowAnnotationConditionI18NAnnotation>
143+ showAnnotationCondition{this , " Show Annotation when" ,
144+ _ (" Show Annotation when" ),
145+ ShowAnnotationCondition::Always};
135146 ExternalOption dictionary{this , " Dictionary" , _ (" Dictionary" ),
136147 " fcitx://config/addon/cskk/dictionary_list" };
137- // Option<bool> showAnnotation{this, "ShowAnnotation",
138- // _("Show Annotation. Fake yet."), true};);
139148 ) // FCITX_CONFIGURATION
140149} // namespace fcitx
141150#endif // FCITX5_CSKK_CSKKCONFIG_H
0 commit comments