| 157 | } |
| 158 | |
| 159 | void UpdateItemName(std::pair<std::string, wxMenuItem*> const& item) { |
| 160 | cmd::Command *c = cmd::get(item.first); |
| 161 | wxString text; |
| 162 | if (c->Type() & cmd::COMMAND_DYNAMIC_NAME) |
| 163 | text = c->StrMenu(context); |
| 164 | else |
| 165 | text = item.second->GetItemLabel().BeforeFirst('\t'); |
| 166 | item.second->SetItemLabel(text + "\t" + to_wx(hotkey::get_hotkey_str_first("Default", c->name()))); |
| 167 | } |
| 168 | |
| 169 | public: |
| 170 | CommandManager(int id_base, agi::Context *context) |