Winecfg -> browse for folder
mh at codeweavers.com
Thu Dec 2 09:14:08 CST 2004
On Wed, 2004-12-01 at 20:32 +0100, Robert van Herk wrote:
> What do you mean? Does s/x/y/ mean that I should change x into y?
Yep, it's from vi regex syntax. Rather obscure geek notation I agree ...
> I did that, because the original code had some weird indentation and
> didn't want to change that where possible. So I kept the weird
> indentation where applicable. Overall, it gives it a bit a strange look,
> I agree.
OK, this is all a bit of a grey area. Generally when modifying existing
code you want to keep the differential to a minimum so it's easy to
review, so don't modify indentation/code style etc alongside functional
changes. Patches which are functional no-ops and just clean up code are
OK but they should be separate.
When writing new code though don't feel obliged to be consistent with
the oddness in the rest of the code. Choose a style and stick to it. The
rest of the code can always be adjusted later.
> Yes, this is the way MS intended SHBrowseForFolder to work, so I tried
> to stay consistent:
OK. I can't say whether you're right or wrong to do this, I don't have a
strong opinion either way. Consistency with existing APIs is good
because we can recycle the MSDN documentation for it, but it's bad
because to quote Alexandre "Win32 is a textbook case of how not to
design an API".
So I'll pass the buck on this one. AJ can decide.
> Another solution would be to let the API indeed allocate the buffer,
> though the user will have to free it, which he might forget more easily,
> since he didn't do the allocation.
Quite a lot of native APIs work this way, and I wouldn't say it's all
that easy to forget.
> Also, in the future, the pszDisplayName could perhaps be use to
> preselect an entry, or, the way it works in win32, define the root of
> the dialog.
OK, that makes sense. So maybe keep it like that.
More information about the wine-devel