[PATCH] shell32: Add general tab in file property dialog.

Nikolay Sivov bunglehead at gmail.com
Thu May 3 01:07:27 CDT 2018


On 5/3/2018 7:27 AM, Alistair Leslie-Hughes wrote:
> +    if (SHGetFileInfoW(props->path, 0, &shinfo, sizeof(shinfo), SHGFI_TYPENAME|SHGFI_ICON))
> +    {
> +        if (shinfo.hIcon) SendDlgItemMessageW(hwndDlg, IDC_FPROP_ICON, STM_SETICON, (WPARAM)shinfo.hIcon, 0);
> +        if (shinfo.szTypeName[0]) SetDlgItemTextW(hwndDlg, IDC_FPROP_TYPE, shinfo.szTypeName);
> +    }

I think this leaks returned icon handle.

It's a new chunk of code, so could you please demangle things like:

> +            LPPROPSHEETPAGEW ppsp = (LPPROPSHEETPAGEW)lParam;
> +                LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam;
> +static UINT CALLBACK file_properties_callback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGEW ppsp)
> +static void init_file_properties_pages(IDataObject *pDo, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)

etc.

Last example could also use better arguments naming, 'pDo' is very obscure.

> +    if (!DragQueryFileW((HDROP)stgm.DUMMYUNIONNAME.hGlobal, 0,
> +                        props->path, sizeof(props->path) / sizeof(props->path[0])))

Does it work as stgm.u.hGlobal? Also now we have ARRAY_SIZE() globally
in shell32 you can use it instead of sizeof() / sizeof().

> +    static WCHAR title[] = {'G','e','n','e','r','a','l',0};

This looks like it should be translated.



More information about the wine-devel mailing list