[Bug 39841] New: Double Commander context menus missing most entries
https://bugs.winehq.org/show_bug.cgi?id=39841 Bug ID: 39841 Summary: Double Commander context menus missing most entries Product: Wine Version: 1.8 Hardware: x86 URL: http://sourceforge.net/p/doublecmd/wiki/Download/ OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: shell32 Assignee: wine-bugs(a)winehq.org Reporter: jhansonxi(a)gmail.com Distribution: Ubuntu Double Commander 0.6.6 beta build 6327M 32-bit (64-bit doesn't function as per bug #38329) Right-clicking in an empty space within the directory view in WinXP shows "Refresh, Sort by, Paste, New Properties". In Wine it triggers an error dialog stating "Error: Invalid parameter". Right clicking on a a text file in WinXP shows "Open, Print, Edit, Open with, Actions, Send to, Cut, Copy, Create shortcut, Delete, Rename, Properties". In Wine it only shows "Actions>View, Edit". Wine reports: fixme:shell:ContextMenu_HandleMenuMsg2 (0x2dd8ed0)->(0x117 0x602c6 0x0 0x1b7ead4): stub -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #1 from super_man(a)post.com --- Could be dupe of bug 31145. It has a hacky patch. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 --- Comment #2 from super_man(a)post.com --- Still the same (as reported) wine 1.9.11 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest(a)luukku.com --- Comment #3 from winetest(a)luukku.com --- (In reply to super_man from comment #2)
Still the same (as reported) wine 1.9.11
Still valid 1.9.22-git. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com --- Comment #4 from winetest(a)luukku.com --- I believe that this bug is duplicate of bug 24893. The program is just different, but the console output is the same. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Keywords| |source CC| |damjan.jov(a)gmail.com Status|UNCONFIRMED |NEW --- Comment #5 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- After hours of battling with the comedy build environment featuring FreePascal, Lazarus, various packages, Double Commander and its Github fork, 3 source code versions, and I can't remember what else, I finally figured out the "Error: Invalid parameter" problem when you right-click on an empty space. In src/platform/uosforms.pas, procedure ShowContextMenu() calls src/platform/win/ushellcontextmenu.pas constructor TShellContextMenu.Create() which ultimately calls: OleCheckUTF8(Folder.CreateViewObject(Handle, IID_IContextMenu, Result)); which calls Wine's dlls/shell32/shfldr_unixfs.c function ShellFolder2_CreateViewObject() which doesn't implement the "IID_IContextMenu" interface. Since it's default HRESULT is: ---snip--- HRESULT hr = E_INVALIDARG; ---snip--- that ends up being returned, and causes Double Commander to display "Error: Invalid parameter". If I patch it to return E_NOINTERFACE (like it probably should), Double Commander shows an "Error:" messagebox instead, with no error description. None of Wine's other shell32 "folders" (desktop, fs, mycomp, netplaces, printers) seem to support the IID_IContextMenu interface in their CreateViewObject() method either, with some explicitly checking for it and failing, some WARNing, some silently failing (sometimes with the wrong HRESULT). I'll also try to take a look at the issue of there not being enough menu items when right-clicking on a file, though it's probably something similar. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 --- Comment #6 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Let's examine the scarcity of menu options when right-clicking a file. Starting as before, but now in platform/win/ushellcontextmenu.pas: constructor TShellContextMenu.Create() calls GetShellContextMenu() calls GetForegroundContextMenu() runs Folder.GetUIObjectOf(Handle, Files.Count, PItemIDList(List^), IID_IContextMenu, nil, Result); which calls Wine's ShellFolder2_GetUIObjectOf() with IID_IContextMenu, in dlls/shell32/shfldr_unixfs.c which runs: ---snip--- if (IsEqualIID(&IID_IContextMenu, riid)) { return ItemMenu_Constructor((IShellFolder*)iface, This->m_pidlLocation, apidl, cidl, riid, ppvOut); ---snip--- Once created, we go back to TShellContextMenu.Create(), which runs OleCheckUTF8(FShellMenu1.QueryContextMenu(FShellMenu, 0, 1, USER_CMD_ID - 1, UFlags)); which is Wine's ItemMenu_QueryContextMenu() in dlls/shell32/shlview_cmenu.c. This seems to return an unpopulated menu. Then TShellContextMenu.Create() will return, and TShellContextMenu.PopUp() will get called, which just adds the "Actions" submenu with "View" and "Edit" subitems. Where were the missing menu options meant to be added? 0024:trace:shell:ItemMenu_QueryContextMenu (0x6270108)->(0xd01e2 0 0x1 0xfff 0x14 ) uFlags were 0x14 == CMF_CANRENAME | CMF_EXPLORE That idCmdLast == 0xfff seems to be wrong, as when I hack ItemMenu_QueryContextMenu() to use 0xffff instead, I get the full list of context menu items: Open Actions Cut Copy Create Link Delete Rename Properties But why are they otherwise absent? That idCmdLast == 0xfff (or my "better" 0xffff) is passed to Shell_MergeMenus(). Is Shell_MergeMenus() behaving incorrectly? Maybe it should ignore idCmdLast when the destination is empty? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 --- Comment #7 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Comment 6, the lack of options in file menus, has the same cause as bug #24893, which is now fixed. (Shellview menu IDs are large numbers, and Double Commander wants them within the range 1-4093. Wine excluded them because they're > 4093, but we now rebase them to lower values, and they fit.) Comment 5, the "Error: Invalid parameter" when right-clicking on an empty space, is the only remaining issue here. It's very easy to fix, it's just these 2 lines: ---snip--- } else if (IsEqualIID(&IID_IContextMenu, riid)) { hr = BackgroundMenu_Constructor((IShellFolder*)iface, FALSE, riid, ppv); ---snip--- that have to be added to ShellFolder2_CreateViewObject() in dlls/shell32/shfldr_unixfs.c. That's just for the filesystem though. It would be nice to also try implement IID_IContextMenu in CreateViewObject() for other shell folders, like desktop, recycle bin, etc. Since only right-clicking the background is the problem now, I am changing the summary to reflect. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Summary|Double Commander context |IShellFolder.CreateViewObje |menus missing most entries |ct() doesn't support | |IID_IContextMenu (Double | |Commander "Error: invalid | |parameter" when | |right-clicking on an empty | |space) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |ad412b11a7ea17b708994ed6609 | |f8ed0cbfb169b --- Comment #8 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- My IShellFolder::CreateViewObject() patch has been committed, resolving FIXED. Thank you for your bug report! There are a number of other bugs with Double Commander, and it is a good app to use for finding shell32 bugs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 6.8. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |--- --- Comment #10 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 6.0.x milestone from bug fixes included in 6.0.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39841 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |focht(a)gmx.net URL|http://sourceforge.net/p/do |https://web.archive.org/web |ublecmd/wiki/Download/ |/20211029120944/https://mas | |ter.dl.sourceforge.net/proj | |ect/doublecmd/DC%20for%20Wi | |ndows%2032%20bit/Double%20C | |ommander%200.6.6%20beta/dou | |blecmd-0.6.6.i386-win32.exe | |?viasf=1 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla