@@ -190,9 +190,6 @@ SOFTWARE.
190190#ifndef resetButtonString
191191#define resetButtonString " R"
192192#endif // resetButtonString
193- #ifndef drivesButtonString
194- #define drivesButtonString " Drives"
195- #endif // drivesButtonString
196193#ifndef editPathButtonString
197194#define editPathButtonString " E"
198195#endif // editPathButtonString
@@ -217,9 +214,6 @@ SOFTWARE.
217214#ifndef buttonResetSearchString
218215#define buttonResetSearchString " Reset search"
219216#endif // buttonResetSearchString
220- #ifndef buttonDriveString
221- #define buttonDriveString " Drives"
222- #endif // buttonDriveString
223217#ifndef buttonEditPathString
224218#define buttonEditPathString " Edit path\n You can also right click on path buttons"
225219#endif // buttonEditPathString
@@ -1685,7 +1679,6 @@ IGFD::FileManager::FileManager() {
16851679}
16861680
16871681void IGFD::FileManager::OpenCurrentPath (const FileDialogInternal& vFileDialogInternal) {
1688- showDrives = false ;
16891682 ClearComposer ();
16901683 ClearFileLists ();
16911684 if (dLGDirectoryMode) { // directory mode
@@ -2013,7 +2006,6 @@ bool IGFD::FileManager::GetDrives() {
20132006 m_FileList.push_back (info);
20142007 }
20152008 }
2016- showDrives = true ;
20172009 return true ;
20182010 }
20192011 return false ;
@@ -2300,24 +2292,15 @@ bool IGFD::FileManager::SelectDirectory(const std::shared_ptr<FileInfos>& vInfos
23002292 } else {
23012293 std::string newPath;
23022294
2303- if (showDrives) {
2304- newPath = vInfos->fileNameExt + IGFD::Utils::GetPathSeparator ();
2305- } else {
23062295#ifdef __linux__
23072296 if (fsRoot == m_CurrentPath)
23082297 newPath = m_CurrentPath + vInfos->fileNameExt ;
23092298 else
23102299#endif // __linux__
23112300 newPath = m_CurrentPath + IGFD::Utils::GetPathSeparator () + vInfos->fileNameExt ;
2312- }
23132301
23142302 if (m_FileSystemPtr->IsDirectoryCanBeOpened (newPath)) {
2315- if (showDrives) {
2316- m_CurrentPath = vInfos->fileNameExt ;
2317- fsRoot = m_CurrentPath;
2318- } else {
2319- m_CurrentPath = newPath; // -V820
2320- }
2303+ m_CurrentPath = newPath; // -V820
23212304 pathClick = true ;
23222305 }
23232306 }
@@ -2639,12 +2622,6 @@ void IGFD::FileDialogInternal::EndFrame() {
26392622 fileManager.OpenCurrentPath (*this );
26402623 }
26412624
2642- if (fileManager.drivesClicked ) {
2643- if (fileManager.GetDrives ()) {
2644- fileManager.ApplyFilteringOnFileList (*this );
2645- }
2646- }
2647-
26482625 if (fileManager.inputPathActivated ) {
26492626 auto gio = ImGui::GetIO ();
26502627 if (ImGui::IsKeyReleased (ImGuiKey_Enter)) {
@@ -3001,7 +2978,7 @@ void IGFD::PlacesFeature::m_InitPlaces(FileDialogInternal& vFileDialogInternal)
30012978 if (devices_ptr != nullptr && vFileDialogInternal.fileManager .GetFileSystemInstance () != nullptr ) {
30022979 const auto & devices = vFileDialogInternal.fileManager .GetFileSystemInstance ()->GetDevicesList ();
30032980 IGFD::FileStyle style;
3004- style.icon = ICON_IGFD_DRIVES ;
2981+ style.icon = PLACE_DEVICES_ICON ;
30052982 for (const auto & device : devices) {
30062983 devices_ptr->AddPlace (device.first + " " + device.second , device.first , false , style);
30072984 }
@@ -3360,15 +3337,6 @@ void IGFD::KeyExplorerFeature::m_ExploreWithkeys(FileDialogInternal& vFileDialog
33603337 m_LocateFileByInputChar_lastFileIdx = 0 ;
33613338 }
33623339 }
3363- #ifdef _IGFD_WIN_
3364- else {
3365- if (fdi.GetComposerSize () == 1U ) {
3366- if (fdi.GetDrives ()) {
3367- fdi.ApplyFilteringOnFileList (vFileDialogInternal);
3368- }
3369- }
3370- }
3371- #endif // _IGFD_WIN_
33723340 }
33733341 }
33743342 }
@@ -3656,7 +3624,7 @@ bool IGFD::FileDialog::Display(const std::string& vKey, ImGuiWindowFlags vFlags,
36563624 fdFilter.SetDefaultFilterIfNotDefined ();
36573625
36583626 // init list of files
3659- if (fdFile.IsFileListEmpty () && !fdFile. showDrives ) {
3627+ if (fdFile.IsFileListEmpty ()) {
36603628 if (fdFile.dLGpath != " ." ) // Removes extension seperator in filename if we don't check
36613629 IGFD::Utils::ReplaceString (fdFile.dLGDefaultFileName , fdFile.dLGpath , " " ); // local path
36623630
0 commit comments