================ DialogDeclBrowser::AddScriptsToTree ================ */
| 158 | ================ |
| 159 | */ |
| 160 | void DialogDeclBrowser::AddScriptsToTree( CPathTreeCtrl &tree ) { |
| 161 | int i; |
| 162 | idPathTreeStack stack; |
| 163 | idStr scriptName; |
| 164 | idFileList *files; |
| 165 | |
| 166 | files = fileSystem->ListFilesTree( "script", ".script", true ); |
| 167 | |
| 168 | stack.PushRoot( NULL ); |
| 169 | |
| 170 | for ( i = 0; i < files->GetNumFiles(); i++) { |
| 171 | scriptName = files->GetFile( i ); |
| 172 | |
| 173 | scriptName.BackSlashesToSlashes(); |
| 174 | scriptName.StripFileExtension(); |
| 175 | |
| 176 | tree.AddPathToTree( scriptName, GetIdFromTypeAndIndex( DECLTYPE_SCRIPT, i ), stack ); |
| 177 | } |
| 178 | |
| 179 | fileSystem->FreeFileList( files ); |
| 180 | } |
| 181 | |
| 182 | /* |
| 183 | ================ |
nothing calls this directly
no test coverage detected