Fix SBSP_ flags dumping
Francois Gouget
fgouget at free.fr
Mon Apr 18 19:39:35 CDT 2005
IShellBrowserImpl_BrowseObject() was using this code:
(wFlags & SBSP_RELATIVE) ? "SBSP_RELATIVE" :
(wFlags & SBSP_PARENT) ? "SBSP_PARENT" :
(wFlags & SBSP_ABSOLUTE) ? "SBSP_ABSOLUTE" : "SBPS_????");
But SBSP_ABSOLUTE is 0 so this does not make sense. The idea here is to
dump the SBSP_ flags so I made a separate function to dump them based on
code found in dlls/dinput/device.c.
Changelog:
* dlls/commdlg/filedlgbrowser.c
Francois Gouget <fgouget at free.fr>
SBSP_ABSOLUTE is 0 so we cannot do (wFlags & SBSP_ABSOLUTE).
Add COMDLG32_DumpSBSPFlags().
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
f u kn rd ts, ur wy 2 gky 4 ur wn gd.
-------------- next part --------------
Index: dlls/commdlg/filedlgbrowser.c
===================================================================
RCS file: /var/cvs/wine/dlls/commdlg/filedlgbrowser.c,v
retrieving revision 1.49
diff -u -p -r1.49 filedlgbrowser.c
--- dlls/commdlg/filedlgbrowser.c 23 Mar 2005 13:15:20 -0000 1.49
+++ dlls/commdlg/filedlgbrowser.c 18 Apr 2005 23:39:01 -0000
@@ -95,6 +95,49 @@ extern HRESULT SendCustomDlgNotification
* Helper functions
*/
+#define add_flag(a) if (flags & a) {strcat(str, #a );strcat(str," ");}
+static void COMDLG32_DumpSBSPFlags(UINT uflags)
+{
+ if (TRACE_ON(commdlg))
+ {
+ unsigned int i;
+ static const struct {
+ DWORD mask;
+ const char *name;
+ } flags[] = {
+#define FE(x) { x, #x}
+ /* SBSP_DEFBROWSER == 0 */
+ FE(SBSP_SAMEBROWSER),
+ FE(SBSP_NEWBROWSER),
+
+ /* SBSP_DEFMODE == 0 */
+ FE(SBSP_OPENMODE),
+ FE(SBSP_EXPLOREMODE),
+ FE(SBSP_HELPMODE),
+ FE(SBSP_NOTRANSFERHIST),
+
+ /* SBSP_ABSOLUTE == 0 */
+ FE(SBSP_RELATIVE),
+ FE(SBSP_PARENT),
+ FE(SBSP_NAVIGATEBACK),
+ FE(SBSP_NAVIGATEFORWARD),
+ FE(SBSP_ALLOW_AUTONAVIGATE),
+
+ FE(SBSP_NOAUTOSELECT),
+ FE(SBSP_WRITENOHISTORY),
+
+ FE(SBSP_REDIRECT),
+ FE(SBSP_INITIATEDBYHLINKFRAME),
+ };
+#undef FE
+ DPRINTF("SBSP Flags: %08x =", uflags);
+ for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
+ if (flags[i].mask & uflags)
+ DPRINTF("%s ", flags[i].name);
+ DPRINTF("\n");
+ }
+}
+
static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos)
{
char lpstrPath[MAX_PATH];
@@ -314,10 +357,8 @@ HRESULT WINAPI IShellBrowserImpl_BrowseO
IShellBrowserImpl *This = (IShellBrowserImpl *)iface;
- TRACE("(%p)(pidl=%p,flags=0x%08x(%s))\n", This, pidl, wFlags,
- (wFlags & SBSP_RELATIVE) ? "SBSP_RELATIVE" :
- (wFlags & SBSP_PARENT) ? "SBSP_PARENT" :
- (wFlags & SBSP_ABSOLUTE) ? "SBSP_ABSOLUTE" : "SBPS_????");
+ TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
+ COMDLG32_DumpSBSPFlags(wFlags);
fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
More information about the wine-patches
mailing list