[Windows] PathRequester returns empty on libraries

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
es_91
Enthusiast
Enthusiast
Posts: 242
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

[Windows] PathRequester returns empty on libraries

Post by es_91 »

Hi, Fred
Hi, community

On Windows 10 ( and propably earlier versions as well ) you, as user, have the choice to use libraries within the file explorer to quickly access for example your documents or your music. These library shortcuts are combined and displayed together with all directories, can however partially be deleted, partially be edited and be hidden within the more extended functioning file explorer.

These libraries can not be hidden within the PathRequester.

Inside the PathRequester selecting a library shortcut never returns any path, not even the simplest routes to say c:\users\documents, selecting them and confirming means returning an empty string.

Handling strings like "\" or "/" is out of use and the lack of any usable information despite selecting something inside the requester will confuse, might disturb the end user.

So my request would be to simply add a flag to the PathRequester that hides out these shortcuts or to correct the PathRequester's behaviour ( IF that would be correction! ) to return usable paths to the libraries.
(Usable paths to the libraries would require a list of strings to be raised because a library consists of a list of directories. )

What's the communities' opinion?

Thanks for reading this and i would be very thankful if you soon take care of this.

With regards es_91

Image
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [Windows] PathRequester returns empty on libraries

Post by nco2k »

a library can contain multiple folders. so i dont know how you expect pb to handle this.

however, they could specify #BIF_RETURNONLYFSDIRS. then the 'OK' button would grey out on such items:

Code: Select all

lpbi.BROWSEINFO\ulFlags = #BIF_NEWDIALOGSTYLE | #BIF_RETURNONLYFSDIRS
SHBrowseForFolder_(@lpbi)
might have some unwanted sideffects though, so maybe its best to introduce a new flag. and while they are at it, they could also give us the option to hide the 'New Folder' button.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
es_91
Enthusiast
Enthusiast
Posts: 242
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

Re: [Windows] PathRequester returns empty on libraries

Post by es_91 »

It would surely do enough to return the first folder out of that librarie's list to have at least 'some' use of it..

Hiding the 'new folder' button... not a good idea, i think.
Post Reply