From 1caaa90300d03f1c3d0f2953887e8f7057f580f3 Mon Sep 17 00:00:00 2001 From: Kip Warner Date: Fri, 9 May 2014 11:27:33 -0700 Subject: [PATCH] gio: Better API documentation for g_app_info_remove_supports_type() The g_app_info_remove_supports_type() desktop entry function located in gio/gappinfo.c could use better API documentation. Before this patch, it wasn't clear that the first parameter 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. --- gio/gappinfo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gio/gappinfo.c b/gio/gappinfo.c index df0cfe0..faced14 100644 --- a/gio/gappinfo.c +++ b/gio/gappinfo.c @@ -427,12 +427,17 @@ g_app_info_can_remove_supports_type (GAppInfo *appinfo) /** * g_app_info_remove_supports_type: - * @appinfo: a #GAppInfo. + * @appinfo: (allow-none): a #GAppInfo or %NULL. * @content_type: a string. * @error: a #GError. * * Removes a supported type from an application, if possible. - * + * + * On UNIX-like systems, setting @appinfo to %NULL will remove the supported + * type from both the `Default Applications` and `Added Associations` keys + * in the user's `mimeapps.list`. Otherwise it is removed only from the `Added + * Associations` key. + * * Returns: %TRUE on success, %FALSE on error. **/ gboolean -- 1.9.1