| 148 | } |
| 149 | |
| 150 | void OpenSaveFileDialog::update() |
| 151 | { |
| 152 | if (mCurrentFolder.empty()) |
| 153 | mCurrentFolder = "/"; |
| 154 | mCurrentFolderField->setCaption(mCurrentFolder); |
| 155 | |
| 156 | mListFiles->removeAllItems(); |
| 157 | |
| 158 | // add all folders first |
| 159 | common::VectorFileInfo infos; |
| 160 | getSystemFileList(infos, mCurrentFolder, L"*.*"); |
| 161 | |
| 162 | for (auto& info : infos) |
| 163 | { |
| 164 | if (info.folder) |
| 165 | mListFiles->addItem(L"[" + info.name + L"]", info); |
| 166 | } |
| 167 | |
| 168 | if (!mFolderMode) |
| 169 | { |
| 170 | // add files by given mask |
| 171 | infos.clear(); |
| 172 | getSystemFileList(infos, mCurrentFolder, mFileMask); |
| 173 | |
| 174 | for (auto& info : infos) |
| 175 | { |
| 176 | if (!info.folder) |
| 177 | mListFiles->addItem(info.name, info); |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | void OpenSaveFileDialog::setFileName(const MyGUI::UString& _value) |
| 183 | { |
nothing calls this directly
no test coverage detected