Bug 337272

Summary: Gwenview not showing/opening .kra files
Product: [Applications] gwenview Reporter: Rafael Linux User <rafael.linux.user>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: myriam, nate, null, rafael.linux.user, xannax.prozaxx
Priority: NOR Keywords: junior-jobs, usability
Version: 4.13.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 19.04.0
Sentry Crash Report:

Description Rafael Linux User 2014-07-09 11:25:54 UTC
Gwenview doesn't recognize ORA and KRA files so I can't see them.

Reproducible: Always

Steps to Reproduce:
1.Open a folder with ORA and/or KRA files

Actual Results:  
ORA and KRA files doesn't appear listed

Expected Results:  
To show ORA and KRA files thumbnails
Comment 1 xannax.prozaxx 2015-01-16 11:31:27 UTC
Can confirm.

My setup:

Arch Linux
Qt: 4.8.6
KDE Development Platform: 4.14.3
Gwenview: 4.14.0 pre
Krita: 2.8.7

Gwenview file browser doesn't show .ora files, and forcibly opening them results in:
"loading 'file.ora' failed. Gwenview cannot display documents of type image/openraster".
Comment 2 Nate Graham 2017-11-10 18:16:52 UTC
Gwenview does indeed support .kra files, but the .desktop file doesn't say so. That should be easy to fix.

Gwenview does NOT support .ora files, so let's track that in a different bug: https://bugs.kde.org/show_bug.cgi?id=386718
Comment 3 null 2017-11-16 07:01:22 UTC
@cfeck: Nate already worked on it in https://phabricator.kde.org/D8751 (sadly no automatic notification between Phab and Bugzilla). Please comment there if you know how to change the mimetype order.
Comment 4 Christoph Feck 2017-11-29 02:27:02 UTC
I don't :)

Comment #3 has a reference to a commit adding .tga support, not .kra or .ora
Comment 5 Nate Graham 2017-11-29 02:58:42 UTC
That patch was changed to only do .tga support because I couldn't figure out how to fix the default app ordering.
Comment 6 Nate Graham 2019-02-18 16:09:45 UTC
Git commit 5997c73c7fa7ef67a6865b213d13eef2d98a51a0 by Nate Graham.
Committed on 18/02/2019 at 16:09.
Pushed by ngraham into branch 'master'.

Be the top handler for .kra files by default

Summary:
Currently, if there are any other apps installed that can open .kra files, and they
have the `InitialPreference` value set in their .desktop file, they will open .kra
files by default instead of Krita. This is non-ideal.

This patch sets the `InitialPreference` value in Krita's own .desktop file high
enough that it will always be the default first handler for .kra files.

Test Plan:
- Apply the patch and then this one for Gwenview: D19121
- Rebuild and install both apps
- Run `sudo update-desktop-database`
- Right-click on a .kra file in Dolphin. Krita shows up as the top app to open it, with Gwenview showing up in the "Open With" menu

Reviewers: #krita, rempt

Reviewed By: #krita, rempt

Subscribers: rempt

Tags: #krita

Differential Revision: https://phabricator.kde.org/D19120

M  +2    -0    krita/org.kde.krita.desktop

https://commits.kde.org/krita/5997c73c7fa7ef67a6865b213d13eef2d98a51a0
Comment 7 Halla Rempt 2019-02-18 16:15:52 UTC
Git commit 55a1810389b4f8ec6754d7be710fc2f8ec8ef96a by Boudewijn Rempt, on behalf of Nate Graham.
Committed on 18/02/2019 at 16:15.
Pushed by rempt into branch 'krita/4.1'.

Be the top handler for .kra files by default

Summary:
Currently, if there are any other apps installed that can open .kra files, and they
have the `InitialPreference` value set in their .desktop file, they will open .kra
files by default instead of Krita. This is non-ideal.

This patch sets the `InitialPreference` value in Krita's own .desktop file high
enough that it will always be the default first handler for .kra files.

Test Plan:
- Apply the patch and then this one for Gwenview: D19121
- Rebuild and install both apps
- Run `sudo update-desktop-database`
- Right-click on a .kra file in Dolphin. Krita shows up as the top app to open it, with Gwenview showing up in the "Open With" menu

Reviewers: #krita, rempt

Reviewed By: #krita, rempt

Subscribers: rempt

Tags: #krita

Differential Revision: https://phabricator.kde.org/D19120

M  +3    -0    krita/org.kde.krita.desktop

https://commits.kde.org/krita/55a1810389b4f8ec6754d7be710fc2f8ec8ef96a
Comment 8 Nate Graham 2019-02-18 16:21:12 UTC
Here's the patch for Gwenview itself: https://phabricator.kde.org/D19121
Comment 9 Nate Graham 2019-02-19 15:39:56 UTC
Git commit 5ae28dadba069a56b845c66c6a57f65c3883ede3 by Nate Graham.
Committed on 19/02/2019 at 15:39.
Pushed by ngraham into branch 'master'.

Allow Gwenview to be able to open .kra (Krita) files

Summary:
Add support for opening Krita files.
FIXED-IN: 19.04.0

Depends on D19120

Test Plan:
- Apply the patch and then this one for Krita: D19120
- Rebuild and install both apps
- Run `sudo update-desktop-database`
- Right-click on a .kra file in Dolphin. Krita shows up as the top app to open it, with Gwenview showing up in the "Open With" menu

Reviewers: #gwenview, sitter, cfeck

Reviewed By: sitter

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D19121

M  +1    -0    CMakeLists.txt

https://commits.kde.org/gwenview/5ae28dadba069a56b845c66c6a57f65c3883ede3