@@ -2452,12 +2452,12 @@ void IGFD::FileManager::DrawPathComposer(const FileDialogInternal& vFileDialogIn
24522452 if (ImGui::IsItemHovered ()) ImGui::SetTooltip (buttonResetPathString);
24532453
24542454#ifdef _IGFD_WIN_
2455- ImGui::SameLine ();
2455+ /* ImGui::SameLine();
24562456
24572457 if (IMGUI_BUTTON(drivesButtonString)) {
24582458 drivesClicked = true;
24592459 }
2460- if (ImGui::IsItemHovered ()) ImGui::SetTooltip (buttonDriveString);
2460+ if (ImGui::IsItemHovered()) ImGui::SetTooltip(buttonDriveString);*/
24612461#endif // _IGFD_WIN_
24622462
24632463 ImGui::SameLine ();
@@ -2991,6 +2991,25 @@ IGFD::PlacesFeature::PlacesFeature() {
29912991}
29922992
29932993#ifdef USE_PLACES_FEATURE
2994+ void IGFD::PlacesFeature::m_InitPlaces (FileDialogInternal& vFileDialogInternal) {
2995+ #ifdef USE_PLACES_BOOKMARKS
2996+ AddPlacesGroup (PLACE_BOOKMARKS_NAME, PLACE_BOOKMARKS_DISPLAY_ORDER, true );
2997+ #endif // USE_PLACES_BOOKMARK
2998+ #ifdef USE_PLACES_DEVICES
2999+ AddPlacesGroup (PLACE_DEVICES_NAME, PLACE_DEVICES_DISPLAY_ORDER, false );
3000+ auto devices_ptr = GetPlacesGroupPtr (PLACE_DEVICES_NAME);
3001+ if (devices_ptr != nullptr && vFileDialogInternal.fileManager .GetFileSystemInstance () != nullptr ) {
3002+ const auto & devices = vFileDialogInternal.fileManager .GetFileSystemInstance ()->GetDevicesList ();
3003+ IGFD::FileStyle style;
3004+ style.icon = ICON_IGFD_DRIVES;
3005+ for (const auto & device : devices) {
3006+ devices_ptr->AddPlace (device.first + " " + device.second , device.first , false , style);
3007+ }
3008+ devices_ptr = nullptr ;
3009+ }
3010+ #endif // USE_PLACES_DEVICES
3011+ }
3012+
29943013void IGFD::PlacesFeature::m_DrawPlacesButton () {
29953014 IMGUI_TOGGLE_BUTTON (placesButtonString, &m_PlacesPaneShown);
29963015 if (ImGui::IsItemHovered ()) ImGui::SetTooltip (placesButtonHelpString);
@@ -3109,7 +3128,7 @@ void IGFD::PlacesFeature::DeserializePlaces(const std::string& vPlaces) {
31093128 }*/
31103129}
31113130
3112- bool IGFD::PlacesFeature::AddGroup (const std::string& vGroupName, const size_t & vDisplayOrder, const bool & vCanBeEdited) {
3131+ bool IGFD::PlacesFeature::AddPlacesGroup (const std::string& vGroupName, const size_t & vDisplayOrder, const bool & vCanBeEdited) {
31133132 if (vGroupName.empty ()) {
31143133 return false ;
31153134 }
@@ -3123,7 +3142,7 @@ bool IGFD::PlacesFeature::AddGroup(const std::string& vGroupName, const size_t&
31233142 return true ;
31243143}
31253144
3126- bool IGFD::PlacesFeature::RemoveGroup (const std::string& vGroupName) {
3145+ bool IGFD::PlacesFeature::RemovePlacesGroup (const std::string& vGroupName) {
31273146 for (auto it = m_Groups.begin (); it != m_Groups.end (); ++it) {
31283147 if ((*it).second ->name == vGroupName) {
31293148 m_Groups.erase (it);
@@ -3133,7 +3152,7 @@ bool IGFD::PlacesFeature::RemoveGroup(const std::string& vGroupName) {
31333152 return false ;
31343153}
31353154
3136- IGFD::PlacesFeature::GroupStruct* IGFD::PlacesFeature::getGroupPtr (const std::string& vGroupName) {
3155+ IGFD::PlacesFeature::GroupStruct* IGFD::PlacesFeature::GetPlacesGroupPtr (const std::string& vGroupName) {
31373156 if (m_Groups.find (vGroupName) != m_Groups.end ()) {
31383157 return m_Groups.at (vGroupName).get ();
31393158 }
@@ -3541,6 +3560,7 @@ void IGFD::KeyExplorerFeature::SetFlashingAttenuationInSeconds(float vAttenValue
35413560#pragma region FileDialog
35423561
35433562IGFD::FileDialog::FileDialog () : PlacesFeature(), KeyExplorerFeature(), ThumbnailFeature() {
3563+ m_InitPlaces (m_FileDialogInternal);
35443564}
35453565IGFD::FileDialog::~FileDialog () = default ;
35463566
0 commit comments