GNOME Bugzilla – Bug 729892
g_app_info_remove_supports_type needs better API documentation
Last modified: 2018-05-24 16:30:56 UTC
The g_app_info_remove_supports_type() desktop entry function located in gio/gappinfo.c could use better API documentation. Right now without my attached patch, it wasn't clear that the first parameter 'GAppInfo *appinfo' was not required. According to the source, it can actually be NULL. In order to remove a MIME entry from both of the 'Added Associations' and 'Default Applications' keys in the user's mimeapps.list, instead of only the former, this parameter actually must be NULL and is the only way to do it from what I could see in following the code paths.
Created attachment 276259 [details] [review] Patch to add better API documentation for GIO's g_app_info_remove_supports_type()
Ok, I don't know what I was thinking, but I just realized that setting it to NULL is not going to work, but really just if we could set the desktop_id field within it only. But I don't know if there is a safe way to do that.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/871.