🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
6 messages
6 total messages Started by Sqwertz Tue, 02 Oct 2012 01:01
Dialog: Changing File Chooser Control
#251745
Author: Sqwertz
Date: Tue, 02 Oct 2012 01:01
9 lines
1491 bytes
Is there any way to tell Dialog to call the more full featured Windows
7 style file picker dialog for choosing attachments?  The Windows 7
style file picker has a search bar in the upper right, and a few other
changes that make it slightly easier to navigate the filesystem.

Thunderbird would be an example of an app that calls the new style
file chooser dialog for attachments.

-sw
Re: Dialog: Changing File Chooser Control
#251750
Author: Bernd Rose
Date: Wed, 03 Oct 2012 08:20
37 lines
3333 bytes
On Mon, 1 Oct 2012 20:01:57 -0500, Sqwertz wrote:

> Is there any way to tell Dialog to call the more full featured Windows
> 7 style file picker dialog for choosing attachments?  The Windows 7
> style file picker has a search bar in the upper right, and a few other
> changes that make it slightly easier to navigate the filesystem.

Without source code? No. Runtime code injection would /technically/
be possible, but I doubt that anybody would take such an effort.

Most important problem is, that the "file" picker you are referring to,
isn't really a file picker, but a directory picker. Although Microsoft
supported file operations by common dialogs, that may have different
functionality on different OS versions, picking of directories got
only measly support, at best. Therefore, separate solutions were built
by compiler producers, separate system coders or even by any single
software author. A good directory picker was provided by Microsoft
later on as part of the IE libraries. But at this time, the "in-house
production" of separate directory pickers had already grown too large
for easy adoption. Moreover, using IE libraries reduced portability
to older systems.

Marcus used directory picker code written by Troy Wolbrink. (See help
file "Thanks" section.) It can neither be customized to your needs
nor do I expect general extender solutions like the ones written for
a couple of Microsoft dialogs.

You *can* provide the target path from external source, though. So
just use the file manager of your choice to browse to the target
directory, copy the whole path of that directory to clipboard and
insert it into the Folder entry field of the Dialog directory picker.
If you keep using a definite couple of directories, save the whole
path entries into a text file for easy access. Apart from these
suggestions, you are (IMHO) stuck with the current functionality
of the directory picker.

Bernd
Re: Dialog: Changing File Chooser Control
#251752
Author: Sqwertz
Date: Wed, 03 Oct 2012 12:00
54 lines
4031 bytes
On Wed, 3 Oct 2012 10:20:09 +0200, Bernd Rose wrote:

> On Mon, 1 Oct 2012 20:01:57 -0500, Sqwertz wrote:
> 
>> Is there any way to tell Dialog to call the more full featured Windows
>> 7 style file picker dialog for choosing attachments?  The Windows 7
>> style file picker has a search bar in the upper right, and a few other
>> changes that make it slightly easier to navigate the filesystem.
> 
> Without source code? No. Runtime code injection would /technically/
> be possible, but I doubt that anybody would take such an effort.
> 
> Most important problem is, that the "file" picker you are referring to,
> isn't really a file picker, but a directory picker. Although Microsoft
> supported file operations by common dialogs, that may have different
> functionality on different OS versions, picking of directories got
> only measly support, at best. Therefore, separate solutions were built
> by compiler producers, separate system coders or even by any single
> software author. A good directory picker was provided by Microsoft
> later on as part of the IE libraries. But at this time, the "in-house
> production" of separate directory pickers had already grown too large
> for easy adoption. Moreover, using IE libraries reduced portability
> to older systems.
> 
> Marcus used directory picker code written by Troy Wolbrink. (See help
> file "Thanks" section.) It can neither be customized to your needs
> nor do I expect general extender solutions like the ones written for
> a couple of Microsoft dialogs.
> 
> You *can* provide the target path from external source, though. So
> just use the file manager of your choice to browse to the target
> directory, copy the whole path of that directory to clipboard and
> insert it into the Folder entry field of the Dialog directory picker.
> If you keep using a definite couple of directories, save the whole
> path entries into a text file for easy access. Apart from these
> suggestions, you are (IMHO) stuck with the current functionality
> of the directory picker.


I assumed this was some sort of pre-built control for Windows since it
appears to be the exact same control that other XP programs used.  And
it's different when you upgrade to Windows 7 (how would an Windows
2000/NT/XP the control know about the "Libraries" convention in
Windows 7, for example.

Anyway, if it can't be done it can't be done.  I thought maybe there
was some way in windows to redirect a common control to another.  Just
like if I install Firefox on Windows XP I get different file chooser
controls than if I use that SAME version of Firefox on Windows 7.

It still doesn't make much sense to me that it's not a common control,
but it's not worth spending any more time on it.

-sw
Re: Dialog: Changing File Chooser Control
#251753
Author: Bernd Rose
Date: Wed, 03 Oct 2012 13:01
10 lines
2067 bytes
On Wed, 3 Oct 2012 07:00:00 -0500, Sqwertz wrote:

[Dialog directory picker for saving attachment(s)]
> I assumed this was some sort of pre-built control for Windows since 

Look for a system-wide injection/replacement for the function
shell32.SHBrowseForFolderA. It /may/ show effect. (If there is
any replacement at all, in the first place...)

Bernd
Re: Dialog: Changing File Chooser Control
#251763
Author: Sqwertz
Date: Thu, 04 Oct 2012 19:15
23 lines
2172 bytes
On Wed, 3 Oct 2012 15:01:19 +0200, Bernd Rose wrote:

> On Wed, 3 Oct 2012 07:00:00 -0500, Sqwertz wrote:
> 
> [Dialog directory picker for saving attachment(s)]
>> I assumed this was some sort of pre-built control for Windows since 
> 
> Look for a system-wide injection/replacement for the function
> shell32.SHBrowseForFolderA. It /may/ show effect. (If there is
> any replacement at all, in the first place...)

While it looks like I might be able to successfully drop in a call to
the "Common Item Dialog" (IFileDialog - which appeared in Vista) it
doesn't look like the return object (or array of objects) would be
compatible with teh structure that Dialog is expecting.

And the reason I see Windows 7 specific features in the open file
dialog is that the control is customizable VIA registry keys.  Which
explains why it's semi-Windows 7 aware.

Thanks!

-sw
Re: Dialog: Changing File Chooser Control
#251767
Author: Bernd Rose
Date: Fri, 05 Oct 2012 19:56
37 lines
3594 bytes
On Thu, 4 Oct 2012 14:15:46 -0500, Sqwertz wrote:

[Replace Dialog directory picker for saving attachment(s)]
> While it looks like I might be able to successfully drop in a call to
> the "Common Item Dialog" (IFileDialog - which appeared in Vista) it
> doesn't look like the return object (or array of objects) would be
> compatible with teh structure that Dialog is expecting.

The undocumented IShellBrowserService.GetPidl may help doing such
a conversation. But are you really ready to hook into a running
Dialog just to get a better directory picker??
 
> And the reason I see Windows 7 specific features in the open file
> dialog is that the control is customizable VIA registry keys.  Which
> explains why it's semi-Windows 7 aware.

Do you now refer to an "open file dialog" (like <Import messages...>)
or is it still the directory picker (<Save Attachment(s)>) you are
talking about. The latter does look different on different Windows
versions out of two reasons:

First, resizing and direct folder name input (edit box) as well as 
Unicode support will only be active on systems supporting these 
functions. Therefore, Marcus will have implemented code to decide 
such cases. (Btw.: I overlooked the presence of SHBrowseForFolderW 
in the code the day before yesterday. Since this is the one that 
will be used on contemporary Windows systems, it will be the one 
you'd need to intercept.)

Second, the content of the selection pane of the directory picker 
changes with Windows version, because Marcus obviously did not define
a root entry. (That's the usual approach, btw., and no oversight.) 
In such cases, the namespace root of the Windows shell file system 
will be used. Newer Windows versions just pluck more special "folders"
into this root. Hence the changes...

Bernd
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads