aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-11-04 22:55:21 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-11-04 22:55:21 +0800
commit80b0ca6849fd7b09a81a445771ae4ec64610ba18 (patch)
treef0feb9b2d362d65503d036d3d53521360dec6ed2 /plugins
parent48b565039b8a442ec4b5d8602e3d5e43399684f8 (diff)
downloadgsoc2013-evolution-80b0ca6849fd7b09a81a445771ae4ec64610ba18.tar.gz
gsoc2013-evolution-80b0ca6849fd7b09a81a445771ae4ec64610ba18.tar.zst
gsoc2013-evolution-80b0ca6849fd7b09a81a445771ae4ec64610ba18.zip
Migrate itip formatter to GSettings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/itip-formatter/itip-formatter.c15
-rw-r--r--plugins/itip-formatter/itip-view.c1
2 files changed, 7 insertions, 9 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 72535a3a99..d9ec622f6e 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
#include <libecal/e-cal-client.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserverui/e-source-selector.h>
@@ -51,7 +50,7 @@
#include <misc/e-attachment.h>
#define CLASSID "itip://"
-#define GCONF_KEY_DELETE "/apps/evolution/itip/delete_processed"
+#define CONF_KEY_DELETE "delete-processed"
#define d(x)
@@ -2888,7 +2887,7 @@ void
format_itip (EPlugin *ep,
EMFormatHookTarget *target)
{
- GConfClient *gconf;
+ GSettings *settings;
gchar *classid;
struct _itip_puri *puri;
CamelDataWrapper *content;
@@ -2907,8 +2906,8 @@ format_itip (EPlugin *ep,
em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object);
- gconf = gconf_client_get_default ();
- puri->delete_message = gconf_client_get_bool (gconf, GCONF_KEY_DELETE, NULL);
+ settings = g_settings_new ("org.gnome.evolution.eplugin.itip");
+ puri->delete_message = g_settings_get_boolean (settings, CONF_KEY_DELETE);
puri->has_organizer = FALSE;
puri->no_reply_wanted = FALSE;
puri->folder = ((EMFormat *) target->format)->folder;
@@ -2918,7 +2917,7 @@ format_itip (EPlugin *ep,
puri->cancellable = g_cancellable_new ();
puri->puri.free = puri_free;
- g_object_unref (gconf);
+ g_object_unref (settings);
/* This is non-gui thread. Download the part for using in the main thread */
content = camel_medium_get_content ((CamelMedium *) target->part);
@@ -2952,7 +2951,7 @@ delete_toggled_cb (GtkWidget *widget,
{
EMConfigTargetPrefs *target = data;
- gconf_client_set_bool (target->gconf, GCONF_KEY_DELETE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)), NULL);
+ g_settings_set_boolean (target->settings, CONF_KEY_DELETE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
}
static void
@@ -3053,7 +3052,7 @@ itip_formatter_page_factory (EPlugin *ep,
/* Delete message after acting */
/* FIXME Need a schema for this */
check = gtk_check_button_new_with_mnemonic (_("_Delete message after acting"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gconf_client_get_bool (target->gconf, GCONF_KEY_DELETE, NULL));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), g_settings_get_boolean (target->settings, CONF_KEY_DELETE));
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (delete_toggled_cb), target);
gtk_box_pack_start (GTK_BOX (inner_vbox), check, FALSE, FALSE, 0);
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index 5163d25e02..fd4190b593 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserver/e-data-server-util.h>
#include <libedataserverui/e-source-combo-box.h>