Hey list,

I am currently re-factoring a patch I submitted to meet the
requirements of a separate upstream project (Thunderbird):

        <https://bugzilla.mozilla.org/show_bug.cgi?id=824909>

During my work in solving the aforementioned, I needed a function in
GLib's GIO module to do something it was already capable of doing, but
wasn't obvious from its API documentation.

        <https://bugzilla.gnome.org/show_bug.cgi?id=729892>

I've submitted the above bug report and included a patch I wrote that
appears to solve this. Please consider reviewing and committing at your
leisure.

Respectfully,

-- 
Kip Warner -- Senior Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
From 1caaa90300d03f1c3d0f2953887e8f7057f580f3 Mon Sep 17 00:00:00 2001
From: Kip Warner <k...@thevertigo.com>
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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to