| 180 | } |
| 181 | |
| 182 | void MainMenuControlLE::updateRecentProjectsMenu() |
| 183 | { |
| 184 | MyGUI::MenuItem* recentProjectsMenu = mBar->findItemById("RecentProjects", true); |
| 185 | if (recentProjectsMenu != nullptr) |
| 186 | { |
| 187 | recentProjectsMenu->getItemChild()->removeAllItems(); |
| 188 | // список последних открытых проектов |
| 189 | const RecentFilesManager::VectorUString& recentProjects = |
| 190 | RecentFilesManager::getInstance().getRecentProjects(); |
| 191 | if (!recentProjects.empty()) |
| 192 | { |
| 193 | size_t index = 1; |
| 194 | for (RecentFilesManager::VectorUString::const_iterator iter = recentProjects.begin(); |
| 195 | iter != recentProjects.end(); |
| 196 | ++iter, ++index) |
| 197 | { |
| 198 | addUserTag("IndexRecentProject", MyGUI::utility::toString(index)); |
| 199 | addUserTag("RecentProject", *iter); |
| 200 | recentProjectsMenu->getItemChild()->addItem( |
| 201 | replaceTags("FormatRecentProject"), |
| 202 | MyGUI::MenuItemType::Normal, |
| 203 | "Command_OpenRecentProject", |
| 204 | *iter); |
| 205 | } |
| 206 | } |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | void MainMenuControlLE::setVisible(bool _value) |
| 211 | { |
nothing calls this directly
no test coverage detected