Bug 364864 - Saving to any format actually save to *.kra format with the wrong extension
Summary: Saving to any format actually save to *.kra format with the wrong extension
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 17:18 UTC by laerne
Modified: 2016-09-23 14:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description laerne 2016-06-28 17:18:52 UTC
When trying to save to *.jpg or *.png files, by selecting the correct option in the format in the save dialogue, krita actually save the image as a *.kra file, with the wrong extension.

    $ file /tmp/tmp.jpg
    /tmp/tmp.jpg: Zip data (MIME type "application/x-krita"?)



Reproducible: Always

Steps to Reproduce:
There's not much more to say.  Just save the image, chose a filename ending in .jpg, and pick "jpeg" file format in the drop menu, save, try to open with a browser, it fails.


Actual Results:  
Saved a .kra file

Expected Results:  
Saved a .jpg file

Purging the configuration in $HOME did not helped.  Currently using old commit 1f9f0cd, because I have enough of building krita and keep not using it because I cannot do anything with what I paint.

Using fedora linux 23 with x86_64.

The issue affects "Save", "Save as" and "Export".
Comment 1 Halla Rempt 2016-06-28 18:29:16 UTC
I'm sorry, but that works for me. What desktop are you using? Since you say you build yourself, you probably have platform integration instead of the default Qt file dialog -- so if you're using Gnome, maybe the GTK file dialog got messed up again in new and wonderful ways.
Comment 2 laerne 2016-06-29 21:19:40 UTC
Yes I use Gnome-Shell.  I didn't notice I was presented with a GTK dialog instead of a Qt one.  I installed KDE-plasma and on KDE exports works.  But on GNOME it regardless keeps failing.

Good call.

Maybe always using a Qt dialogue instead of that weird GTK/Qt crossover would be better ?
Comment 3 Halla Rempt 2016-06-30 06:18:49 UTC
I tried that, but people protested very loudly :-( And with an older version of Gnome/GTK, there are no problems. That probably means it's actually a bug in GTK. I'll disable the GTK dialog for 3.0.1 -- it's a waste of my time to try and figure out what's going on there.
Comment 4 Halla Rempt 2016-06-30 11:33:12 UTC
Git commit cfc4efaf01cc17e795dfcac972563d4095cbd02f by Boudewijn Rempt.
Committed on 30/06/2016 at 11:33.
Pushed by rempt into branch 'krita/3.0'.

Disable the native file dialog integration on Linux

Unless we're running in KDE, where platform integration gives us
the best file dialog in the world. The GTK one completely broke
in the latest version of Fedora

M  +8    -12   libs/widgetutils/KoFileDialog.cpp

http://commits.kde.org/krita/cfc4efaf01cc17e795dfcac972563d4095cbd02f
Comment 5 laerne 2016-07-08 13:54:04 UTC
The dialog fix did not solve the problem.  With the qt dialog, I still have krita saving every file as .kra file under gnome, except for *.ora, which it saves correctly, despise extensions and file type selection.

Additionaly, I'd like to point it's worse than that.  The same issue arises to open file.  Whether you input a file with the open dialogue or the drag-and-drop feature, krita will ever only know how to open OpenRaster images, not *.jpg, *.png or even krita's *.kra it wants so hard to save many format with.
Comment 6 Halla Rempt 2016-07-08 16:47:22 UTC
Hi,

I'm sorry, but you will really have to debug this: I don't have access to a system where this problem occurs, and since it doesn't occur in our code, it must be something specific to Fedora 23. I guess they could have totally messed up the shared-mime-info database...
Comment 7 laerne 2016-09-23 14:43:51 UTC
I build the software again, and it seems to work fine.  Maybe I had some bad configuration the last time I built it.