@@ -36,10 +36,14 @@ 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 { Always, SingleCandidate, Never };
41+ FCITX_CONFIG_ENUM_NAME_WITH_I18N (ShowAnnotationCondition, N_(" Always" ),
42+ N_ (" SingleCandidate" ), N_(" Never" ));
43+
3944static constexpr const char *CandidateSelectionKeys_Annotations[] = {
4045 " Number (1,2,3,...)" , " ABCD (a,b,c,d,...)" ,
4146 " Qwerty Center row (a,s,d,f,...)" };
42-
4347struct CandidateSelectionKeysAnnotation : public EnumAnnotation {
4448 void dumpDescription (RawConfig &config) const {
4549 EnumAnnotation::dumpDescription (config);
@@ -132,10 +136,13 @@ FCITX_CONFIGURATION(
132136 candidateSelectionKeys{this , " Candidate selection keys" ,
133137 _ (" Candidate selection keys" ),
134138 CandidateSelectionKeys::Number};
135- ExternalOption dictionary{this , " Dictionary" , _ (" Dictionary" ),
136- " fcitx://config/addon/cskk/dictionary_list" };
137- // Option<bool> showAnnotation{this, "ShowAnnotation",
138- // _("Show Annotation. Fake yet."), true};);
139- ) // FCITX_CONFIGURATION
139+ OptionWithAnnotation<ShowAnnotationCondition,
140+ ShowAnnotationConditionI18NAnnotation>
141+ showAnnotationCondition{this , " Show Annotation when" ,
142+ _ (" Show Annotation when" ),
143+ ShowAnnotationCondition::Always};
144+ ExternalOption dictionary{
145+ this , " Dictionary" , _ (" Dictionary" ),
146+ " fcitx://config/addon/cskk/dictionary_list" };) // FCITX_CONFIGURATION
140147} // namespace fcitx
141148#endif // FCITX5_CSKK_CSKKCONFIG_H
0 commit comments