GNOME Bugzilla – Bug 545351
Reset associations for content type
Last modified: 2008-09-26 19:56:46 UTC
With the latest desktop file based gio, one can now remove associations from an application to a content type, in particular if you have [Removed Associations] x-content/acme-device-frobnicator=acme-app.desktop in ~/.local/share/applications/mimeapps.list it means you've removed the association "x-content/acme-device-frobnicator" from the acme-app.desktop application. This works even if acme-app is installed system-wide. Thus the "Remove" button in http://people.freedesktop.org/~david/nautilus-open-with.png will happily let you remove "gThumb Image Viewer" and there's no apparent way to get it back. Hence, in that dialog in Nautilus it would be useful with a "Reset Associations" button. Therefore, I propose the addition of new API g_content_type_reset_associations() to reset all application associations for a given file.
I've included an implementation of g_app_info_reset_type_associations() in the patch attached to bug 545350
2008-09-26 Matthias Clasen <mclasen@redhat.com> Bug 545350 – GAppInfo deletion Bug 545351 – Reset associations for content type * gio.symbols: * gappinfo.[hc]: New functions g_app_info_can_delete, g_app_info_delete and g_app_info_reset_type_associations. * gdesktopappinfo.c: * gwin32appinfo.c: Implementations of these. * tests/Makefile.am: * tests/desktop-app-info.c: Tests for GAppInfo functionality.