Bug 154595 - Adding applications in edit file type doesn't work
Summary: Adding applications in edit file type doesn't work
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 155457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-25 15:18 UTC by James Richard Tyrer
Modified: 2008-02-29 22:34 UTC (History)
2 users (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 James Richard Tyrer 2007-12-25 15:18:46 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC-4.1.2 
OS:                Linux

Test case. KDE SVN r752699
 
Open Dolphin, right click an SVG file, choose "Properties" and click the "Edit File Type" button. 
 
Then add Gwenview to the list of applications.  Click "OK" "OK".  Now try to open the file with Gwenview.  It isn't there in the context menu.  So go back to the applications list, it isn't there. 
 
Since this is a very wide spread problem, I would rate this as a show stopper.
Comment 1 James Richard Tyrer 2007-12-25 15:19:43 UTC
Correcting Priority.
Comment 2 James Richard Tyrer 2007-12-25 16:13:58 UTC
And just like Bug 126823, applications disappear from the menu.  Not the new menu (Kickoff) but both the traditional menu and the menu dialog box that you can open from the right click menu.

Second test case.

I right clicked a JP2 file, "Open With -> Other" and then selected Gwenview in the menu dialog.  I checked the box: "Remember application association for this type of file".  OK, it worked after closing Gwenview, I right clicked the JP2 file again and Gwenview was in the list of applications.

Then back to the first test case.  Try it again.  You can't add Gwenview because it has disappeared from the menu dialog.  Note that it has also disappeared from the traditional menu although it is still in KickOff.
Comment 3 David Faure 2007-12-25 19:48:22 UTC
Good timing, I'm working on the filetypes module again theses days.
Comment 4 David Faure 2008-02-21 12:06:35 UTC
*** Bug 155457 has been marked as a duplicate of this bug. ***
Comment 5 David Faure 2008-02-21 12:06:58 UTC
Yes the generated .desktop file is broken.
But I'm working on changing all this in order to use a new freedesktop standard which I discussed with the nautilus developer, saving associations into a "mimeapps.list" file.
Comment 6 David Faure 2008-02-21 12:23:42 UTC
Hint: meanwhile you can edit the file generated in ~/.local/share/applications/ to give it a valid Name and Exec field (and Type=Application).
Comment 7 David Faure 2008-02-26 00:30:08 UTC
SVN commit 779366 by dfaure:

Fix mime-application association support by porting the code to the new XDG standard mimeapps.list
(see kdelibs commit r779354)
BUG: 154595


 M  +0 -1      filetypesview.cpp  
 M  +0 -19     kservicelistwidget.cpp  
 M  +39 -198   mimetypedata.cpp  
 M  +2 -7      mimetypedata.h  
 M  +15 -9     tests/filetypestest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=779366
Comment 8 James Richard Tyrer 2008-02-26 22:39:25 UTC
This works correctly in TRUNK when using the "Edit File Type" button.

However, I find that it doesn't work correctly if you use "Open With..." and they check the box for: "Remember application association for this type of file".  When I do this, a 'desktop' file is created and the application disappears from the tree in the dialog as stated in the original report.
Comment 9 David Faure 2008-02-29 20:33:15 UTC
SVN commit 780692 by dfaure:

Fix KConfig::copyTo, used by KOpenWithDialog when associating an application with a mimetype.
BUG: 154595


 M  +4 -0      config/kconfig.cpp  
 M  +32 -0     tests/kconfigtest.cpp  
 M  +1 -0      tests/kconfigtest.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=780692
Comment 10 David Faure 2008-02-29 22:34:18 UTC
SVN commit 780728 by dfaure:

Backport reformattings and r780723:
Make KOpenWithDialog write to mimeapps.list when asked to remember an association between a mimetype and an existing application.

It still has to write a new .desktop file when the user types the name of a program without a .desktop file, or when checking "Run in terminal" (but in that case it's not a copy of another desktop file, so the previous fix to KConfig::copyTo is now unrelated to this code).
CCBUG: 154595


 M  +134 -168  kopenwithdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=780728