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