| 153 | } |
| 154 | |
| 155 | void MainMenuControlLE::updateRecentFilesMenu() |
| 156 | { |
| 157 | MyGUI::MenuItem* recentFilesMenu = mBar->findItemById("RecentFiles", true); |
| 158 | if (recentFilesMenu != nullptr) |
| 159 | { |
| 160 | recentFilesMenu->getItemChild()->removeAllItems(); |
| 161 | // список последних открытых файлов |
| 162 | const RecentFilesManager::VectorUString& recentFiles = RecentFilesManager::getInstance().getRecentFiles(); |
| 163 | if (!recentFiles.empty()) |
| 164 | { |
| 165 | size_t index = 1; |
| 166 | for (RecentFilesManager::VectorUString::const_iterator iter = recentFiles.begin(); |
| 167 | iter != recentFiles.end(); |
| 168 | ++iter, ++index) |
| 169 | { |
| 170 | addUserTag("IndexRecentFile", MyGUI::utility::toString(index)); |
| 171 | addUserTag("RecentFile", *iter); |
| 172 | recentFilesMenu->getItemChild()->addItem( |
| 173 | replaceTags("FormatRecentFile"), |
| 174 | MyGUI::MenuItemType::Normal, |
| 175 | "Command_OpenRecentFile", |
| 176 | *iter); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | void MainMenuControlLE::updateRecentProjectsMenu() |
| 183 | { |
nothing calls this directly
no test coverage detected