Comment 44 for bug 411358

Revision history for this message
In , Jon-mozillabugzilla (jon-mozillabugzilla) wrote :

Okay - I've confirmed my theory:

I've built a couple of alternative versions of the libgiogconf.so module.

All my edits/tests were made to gapplookupgconf.c in the function get_default_for_uri_scheme():
My first test was to call gconf_client_set_error_handling(client, GCONF_CLIENT_HANDLE_NONE) against the GConf client which, as I'd hoped, prevented the pop-up dialog...
Neither Thunderbird nor GIO's implementation of the GConf client changes the default error handling mode which is GCONF_CLIENT_HANDLE_UNRETURNED.

Next, I reverted to the original source and added an error handler:
--- gapplookupgconf.c.orig 2012-07-31 00:45:53.660787288 +0100
+++ gapplookupgconf.c 2012-07-31 00:45:31.050709620 +0100
@@ -113,9 +113,11 @@
                              uri_scheme,
                              "/command",
                              NULL);
+ GError *error = NULL; //Jonathan
   command = gconf_client_get_string (client,
                                      command_key,
- NULL);
+ &error);
   g_free (command_key);
   if (command)
     {

Sure enough, by making the error a 'returned' error, this also stops the pop-up dialog.

Unfortunately, Thunderbird has no control over the GConf client used by GIO to lookup the URI. To fix this problem from the Thunderbird side, the thunderbird source would have to be changed to prevent making URI Handler queries to GIO that contain the '+' character.

I'll see if I can suggest a diff for this in the next couple of days. I'd welcome any advice/help/comments from folks who've contributed to Mozilla products before - this is my first time so I don't know how the process works.