Martin Vermeer wrote: >> controller().params().type = fl_get_choice_text(dialog_->choice_type); >> will just break when >> _("Note|Comment|Greyedout"); >> gets translated. > > Ah! Yes, these are standard tokens and should not be translated. But > we need "user names" in locale to present in the menu. Hmmm...
Add a function to ControlNote.[Ch] void note_gui_tokens(vector<string> & ids, vector<string> & gui_names) { char const * const ids_[] = {"note", "comment", "greyedout"}; size_t const ids_size = sizeof(ids_) / sizeof(char *); char const * const gui_names_[] = {_("Note"), _("comment"), _("greyedout") }; size_t const gui_names_size = sizeof(gui_names_) / sizeof(char *); ids = vector<string>(ids_, ids_ + ids_size); gui_names = vector<string>(gui_names_, gui_names_ + gui_names_size); } Use gui_names to fill the gui widget and then discard. Store ids in FormNote, QtNote and use it to get/set the params. Or something... -- Angus