Network on ExplorerGadgets ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Network on ExplorerGadgets ?

Post by fsw »

Is this possible?

The Windows Explorer TreeView has also:

My Network Places
and
Recycle Bin

Both are not available on the PB Gadgets...

I am to provide the public with beneficial shocks.
Alfred Hitshock
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

This is not easily possible, because these are not part of the
directory tree, but Folders of the Shell Namespace.
For example, if you browse to the RECYCLED folder with the
ExplorerGadget, you only get rubbish, because the Recycle Bin doesn't
contain real Files.

MyDocuments also is only an object in the Shell Namespace, but it is
mapped to a *real* Directory, so it was possible to implement it with
some tricks.

To enable these, a full rewrite of the gadgets would be needed, to use
Shell Namespace objects instead of Directorys, and this would IMHO also
blow the code. It is small and fast compared to what it can do, and I'd like
to keep it that way.

This would also raise another problem. How should a program tell
the Gadget to select a folder that doesn't exist in the directory tree?
And what should it return, if the user is, for example inside the
Recycle bin?


Anyway, IMHO it is too much work and problems for the benefit it could
bring.

Timo
quidquid Latine dictum sit altum videtur
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

Thanks Timo for your explanation, didn't know all that.
freak wrote: MyDocuments also is only an object in the Shell Namespace, but it is
mapped to a *real* Directory, so it was possible to implement it with
some tricks.
I have a question for you:
Is it possible to have a FLAG to switch 'MyDocuments' ON/OFF :?:

Again, thanks for your time and effort.

Franco

I am to provide the public with beneficial shocks.
Alfred Hitshock
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

freak wrote: MyDocuments also is only an object in the Shell Namespace, but it is
mapped to a *real* Directory, so it was possible to implement it with
some tricks.
Some?, only one is needed:
You must get the path to the MyDocuments and this isn't realy a problem.

Code: Select all

#GetPath_MyDocuments = $5
Procedure.s GetPath(type); - Return the path of some system-directorys
  *itemid.Long = #NULL
  If SHGetSpecialFolderLocation_ (0, Type, @*itemid) = #NOERROR
    location$ = Space (#MAX_PATH+1)
    If SHGetPathFromIDList_ (*itemid, @location$)
      If Right(location$,1)<>"" : location$+"" : EndIf
      ProcedureReturn location$
    EndIf
  EndIf
EndProcedure
debug getpath(#getpath_mydocuments)
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

GPI:
> Some?, only one is needed:

The ExplorerGadgets are a little more complex, than just knowing where
the stuff is.

It also needs for example:
- right Icon
- right display name for mydocuments in the language of the user's os
(was not an easy one)

fsw:

Yes, that is easily possible, as it allready switches MyDocuments off
internally, if the right path can't be read (on win95 for example).

Flag added for the next release.

Timo
quidquid Latine dictum sit altum videtur
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

freak wrote:Yes, that is easily possible, as it allready switches MyDocuments off internally, if the right path can't be read (on win95 for example).

Flag added for the next release.

Timo
8)

I am to provide the public with beneficial shocks.
Alfred Hitshock
Post Reply