Be the top handler for .kra files by default
ClosedPublic

Authored by ngraham on Feb 18 2019, 3:57 PM.

Details

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.

CCBUG: 337272

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

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Feb 18 2019, 3:57 PM
Restricted Application added a project: Krita. · View Herald TranscriptFeb 18 2019, 3:57 PM
ngraham requested review of this revision.Feb 18 2019, 3:57 PM
ngraham edited the test plan for this revision. (Show Details)Feb 18 2019, 4:00 PM

If accepted, it would be nice if this could get into the bugfix branch so that it can land in advance of the Gwenview patch, which is slated to go into KDE Applications 19.04.0. That way hopefully there will never be a situation where Gwenview temporarily becomes the default handler for .kra files.

rempt accepted this revision.Feb 18 2019, 4:04 PM
rempt added a subscriber: rempt.

Yes, this is fine. Backporting it to 4.1 is fine as well, though I wasn't intending to make a new release from that branch. I could do a source-only 4.18, though with this commit in it. That should be fine for Linux distributions.

This revision is now accepted and ready to land.Feb 18 2019, 4:04 PM
ngraham edited the summary of this revision. (Show Details)Feb 18 2019, 4:07 PM

Thanks @rempt! Would you like me to land this, or are you going to take care of it since you're more familiar with the branches?

rempt added a comment.Feb 18 2019, 4:08 PM

If you push it to master, I'll merge it to the 4.1 branch :-)

This revision was automatically updated to reflect the committed changes.