GNOME Bugzilla – Bug 648467
g_app_info_set_as_last_used_for_type can wrongly change default
Last modified: 2011-09-10 00:33:36 UTC
Created attachment 186478 [details] small test program to illustrate the problem If I use the "Open With" dialog in nautilus or file-roller 3.0.0, and choose gedit for a plain text file, gedit opens, but the default application for plain text files gets changed from gedit to KWrite. It only happens if there was no entry for "text/plain" in the "Default Applications" section of ~/.local/share/applications/mimeapps.list - in that case, an entry gets added, but somehow ends up set to kde4-kwrite.desktop. This is with glib 2.28.6.
Created attachment 189202 [details] [review] fix - when adding a default to avoid it being overriden, don't exclude from the apps found for the mimetype I investigated this bug further, and discovered that the reason the default ends up wrong is because the app given to set_as_last_used_for_type was later being excluded from the list of apps found for that mimetype.
Created attachment 195222 [details] [review] desktopappinfo: don't exclude from system list Bug still present in glib 2.29.16, here is the same patch, but git formatted and against master.
Bug 658188 has a better patch, closing as a duplicate. *** This bug has been marked as a duplicate of bug 658188 ***