Bug 380065 - "Open with" menu entry missing [patch]
Summary: "Open with" menu entry missing [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-OpenWith (show other bugs)
Version: 5.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-22 00:43 UTC by philippe weyland
Modified: 2022-01-31 07:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.0


Attachments
Click-Right menu under windows - "open with" missing (47.02 KB, image/png)
2017-05-22 00:43 UTC, philippe weyland
Details
Open with for single file on windows (3.25 KB, patch)
2017-08-03 23:08 UTC, Simon
Details
Update patch to support native Open With under Windows. (4.98 KB, patch)
2018-02-12 19:55 UTC, caulier.gilles
Details
Update patch to support native Open With under Windows (version 3). (5.48 KB, patch)
2018-02-12 22:51 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description philippe weyland 2017-05-22 00:43:19 UTC
Created attachment 105666 [details]
Click-Right menu under windows - "open with" missing

Under Linux I've the menu entry to open images (I use Photoflow).
But under Windows this entry doesn't exist. I've verified that NEF and JPG files are set to be opened by photoflow.
Comment 1 caulier.gilles 2017-05-22 07:13:14 UTC
OpenWith feature use KIO API from KDE and is Linux only. Under MAcOS and Windows, this do not work. In fact KIO is disabled outside Linux.

Gilles Caulier
Comment 2 philippe weyland 2017-05-25 10:20:30 UTC
OK, the answer is clear. But ...
Is this not a showstopper for using Digikam along with any other image editor ?
Philippe
Comment 3 caulier.gilles 2017-05-25 11:45:18 UTC
Certainly,

I try to find how non KDE application (and portable) try to deal with Open With feature... It's not simple... Wait and see

Gilles Caulier
Comment 4 philippe weyland 2017-05-25 15:50:47 UTC
I wish you success :-)
Comment 5 Simon 2017-08-03 12:34:27 UTC
*** Bug 383079 has been marked as a duplicate of this bug. ***
Comment 6 Simon 2017-08-03 12:51:18 UTC
*** Bug 374356 has been marked as a duplicate of this bug. ***
Comment 7 Simon 2017-08-03 12:52:14 UTC
The port to QT has happened, but there might still be a problem on Windows (see cited post below). Can you please test with the pre-release and report back whether it works or not:
https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

From a duplicated issue:

(In reply to caulier.gilles from bug 374356 comment #4)
> File/Open in file explorer is already implemented, through QDesktopService,
> but it sound like under Windows, the Qt wrapper do not do the job properly.
> 
> Can you confirm this ? The last build for Windows use Qt 5.9 (previous one
> Qt 5.7). Perhaps the situation has changed now...
> 
> https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> 
> Gilles Caulier
Comment 8 Andrius 2017-08-03 16:06:26 UTC
(In reply to Simon from comment #7)
> The port to QT has happened, but there might still be a problem on Windows
> (see cited post below). Can you please test with the pre-release and report
> back whether it works or not:
> https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> 
> From a duplicated issue:
> 
> (In reply to caulier.gilles from bug 374356 comment #4)
> > File/Open in file explorer is already implemented, through QDesktopService,
> > but it sound like under Windows, the Qt wrapper do not do the job properly.
> > 
> > Can you confirm this ? The last build for Windows use Qt 5.9 (previous one
> > Qt 5.7). Perhaps the situation has changed now...
> > 
> > https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> > 
> > Gilles Caulier

Still missing.
Here is the options I see:

Right click - Open (F4) - opens Editor

Menu - Item - Open (F4) - same
Menu - Item  - Open with Default Application (Meta + F4) - opens windows viewer

"Open with" is still missing
Comment 9 Simon 2017-08-03 16:37:47 UTC
Andrius checked, so:
Comment 10 philippe weyland 2017-08-03 18:29:09 UTC
I confirm that version 5.7 beta doesn't bring (yet) the entry "Open with" (Windows 10)
Comment 11 caulier.gilles 2017-08-03 20:21:02 UTC
OpenWith feature require KIO slave from KDE. This do not work under Windows or require a complex run time puzzle that i don't want to solve in the bundle.

Also, the OpenWith feature will only provide external tool from Unix world, not Windows.

So we need a native Windows solution to reproduce the feature.

Note : It's exactly the same problem under MacOS.

Gilles Caulier
Comment 12 Simon 2017-08-03 23:08:16 UTC
Created attachment 107063 [details]
Open with for single file on windows

This is based on a quick google search turning up this SO question:
https://stackoverflow.com/questions/6364879/how-to-open-a-default-dialog-for-window-if-shellexecute-fails-due-to-no-file-ass

Maybe this just works, but I wouldn't get my hopes up and I can't test myself.
Comment 13 caulier.gilles 2017-08-04 12:04:00 UTC
Hi Simon,

I do not have a windows computer to test here.

The patch sound like not too intrusive. I recommend to move Windows API code to a dedicated cpp file (as Qt implementation do).

Something like /app/utils/contextmenuhelper_win.cpp

Typically, the windows specific code must be separated from Qt based code.

Gilles
Comment 14 caulier.gilles 2018-02-12 19:55:54 UTC
Created attachment 110575 [details]
Update patch to support native Open With under Windows.

This new version of the patch compile against git/master and add the feature to Showfoto.
Comment 15 caulier.gilles 2018-02-12 22:51:21 UTC
Created attachment 110586 [details]
Update patch to support native Open With under Windows (version 3).

Fix broken compilation with UNICODE support
Comment 16 caulier.gilles 2018-02-12 23:17:58 UTC
On digiKam windows, we have now an "Open With" option, but this one as no effect. There is nothing to see on debugview, no error, no warning...

Gilles Caulier
Comment 17 caulier.gilles 2018-02-13 06:15:41 UTC
There is also some pointers here with native open with dialog under windows :

https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-the-default-app-for-a-file
Comment 18 Maik Qualmann 2018-10-01 21:22:22 UTC
*** Bug 399285 has been marked as a duplicate of this bug. ***
Comment 19 caulier.gilles 2019-03-07 10:48:04 UTC
*** Bug 405174 has been marked as a duplicate of this bug. ***
Comment 20 caulier.gilles 2019-03-07 12:41:51 UTC
Git commit 6e7f92971d2fdbc611d10e141c835795d2e75623 by Gilles Caulier.
Committed on 07/03/2019 at 12:41.
Pushed by cgilles into branch 'master'.

First try to handle OpenWith dialog under Windows

M  +63   -7    core/app/items/utils/contextmenuhelper.cpp
M  +16   -0    core/app/main/main.cpp
M  +16   -0    core/showfoto/main/main.cpp

https://commits.kde.org/digikam/6e7f92971d2fdbc611d10e141c835795d2e75623
Comment 21 caulier.gilles 2019-03-08 11:00:25 UTC
Maik,

Under Windows 7, with DebugView, i never seen this debug trace :

https://cgit.kde.org/digikam.git/tree/core/app/items/utils/contextmenuhelper.cpp#n350

...when i activate "Open With" action from context menu. Can you confirm on your computer ?

Gilles
Comment 22 Maik Qualmann 2019-03-08 22:18:18 UTC
Git commit ae51ba537e7307d9d7598cf943f19ca99f5a400b by Maik Qualmann.
Committed on 08/03/2019 at 22:17.
Pushed by mqualmann into branch 'master'.

fix empty item list

M  +2    -2    core/app/items/utils/contextmenuhelper.cpp

https://commits.kde.org/digikam/ae51ba537e7307d9d7598cf943f19ca99f5a400b
Comment 23 Maik Qualmann 2019-03-08 22:22:35 UTC
Git commit 01a20933a2c7c211f55c0591ffca06dfe0656c06 by Maik Qualmann.
Committed on 08/03/2019 at 22:21.
Pushed by mqualmann into branch 'master'.

fix file not found error

M  +2    -2    core/app/items/utils/contextmenuhelper.cpp

https://commits.kde.org/digikam/01a20933a2c7c211f55c0591ffca06dfe0656c06
Comment 24 Maik Qualmann 2019-03-08 22:41:17 UTC
There is now an error message that the file no program is assigned and you should assign a program in the control panel...

Maik
Comment 25 Maik Qualmann 2019-03-08 22:51:43 UTC
Ok, works in part, if an unknown file type is selected (PGF) appears the desired dialog. But not with a JPG file that is associated with Paint.

Maik
Comment 26 Maik Qualmann 2019-03-08 23:18:14 UTC
Git commit 63d778b4b4b3bca9bdfac4be2d2adf7f02f5aa17 by Maik Qualmann.
Committed on 08/03/2019 at 23:17.
Pushed by mqualmann into branch 'master'.

this open with dialog now seems to work

M  +1    -1    core/app/items/utils/contextmenuhelper.cpp

https://commits.kde.org/digikam/63d778b4b4b3bca9bdfac4be2d2adf7f02f5aa17
Comment 27 Maik Qualmann 2019-03-09 20:45:49 UTC
Git commit 4b55d48e5500feb59c2564ae6fc1e0672c77ff29 by Maik Qualmann.
Committed on 09/03/2019 at 20:44.
Pushed by mqualmann into branch 'master'.

polish shell execute and fix compile warnings
tested on Windows7 and Windows10
FIXED-IN: 6.1.0

M  +2    -1    NEWS
M  +6    -8    core/app/items/utils/contextmenuhelper.cpp

https://commits.kde.org/digikam/4b55d48e5500feb59c2564ae6fc1e0672c77ff29