[nautilus-sendto/gnome-3-0] evolution: Fix getting default mailer for GNOME 3.0
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-sendto/gnome-3-0] evolution: Fix getting default mailer for GNOME 3.0
- Date: Wed, 14 Mar 2012 15:32:07 +0000 (UTC)
commit fb9359354d10d8393affe4181a5773cdc3902d88
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 14 16:26:41 2012 +0100
evolution: Fix getting default mailer for GNOME 3.0
Using the handler for x-scheme-handler/mailto rather than
reading obsolete info in GConf.
https://bugzilla.gnome.org/show_bug.cgi?id=667780
src/plugins/evolution/evolution.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/evolution/evolution.c b/src/plugins/evolution/evolution.c
index 782520e..e8679a6 100644
--- a/src/plugins/evolution/evolution.c
+++ b/src/plugins/evolution/evolution.c
@@ -29,8 +29,6 @@
#include <libedataserverui/e-client-utils.h>
#include "nautilus-sendto-plugin.h"
-#define DEFAULT_MAILTO "/desktop/gnome/url-handlers/mailto/command"
-
#define CONTACT_FORMAT "%s <%s>"
typedef enum {
@@ -79,16 +77,20 @@ get_evo_cmd (void)
static gboolean
init (NstPlugin *plugin)
{
- GConfClient *client;
+ GAppInfo *app_info;
g_print ("Init evolution plugin\n");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- client = gconf_client_get_default ();
- mail_cmd = gconf_client_get_string (client, DEFAULT_MAILTO, NULL);
- g_object_unref (client);
+ app_info = g_app_info_get_default_for_uri_scheme ("mailto");
+ if (app_info) {
+ mail_cmd = g_strdup (g_app_info_get_commandline (app_info));
+ g_object_unref (app_info);
+ } else {
+ mail_cmd = NULL;
+ }
if (mail_cmd == NULL || *mail_cmd == '\0') {
g_free (mail_cmd);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]