aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bbdb/bbdb.c
diff options
context:
space:
mode:
authorDevashish Sharma <dsharma@src.gnome.org>2006-08-03 19:35:23 +0800
committerDevashish Sharma <dsharma@src.gnome.org>2006-08-03 19:35:23 +0800
commit07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0 (patch)
tree138d4c45f98cfad9652366edc62ee5f444af246c /plugins/bbdb/bbdb.c
parent6d4bad19269315dceb0a0e5d26f7b04c6da3376f (diff)
downloadgsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.gz
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.bz2
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.lz
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.xz
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.zst
gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.zip
Fix for some bugs in gaim synchronization and automatic contacts.
svn path=/trunk/; revision=32467
Diffstat (limited to 'plugins/bbdb/bbdb.c')
-rw-r--r--plugins/bbdb/bbdb.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index 4faa43604c..64a00ad9f5 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -261,7 +261,10 @@ bbdb_open_addressbook (int type)
gconf = gconf_client_get_default ();
/* Check to see if we're supposed to be running */
- enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL);
+ if (type == GAIM_ADDRESSBOOK)
+ enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE_GAIM, NULL);
+ else
+ enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL);
if (! enable) {
g_object_unref (G_OBJECT (gconf));
return NULL;
@@ -326,6 +329,7 @@ enable_toggled_cb (GtkWidget *widget, gpointer data)
{
struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
gboolean active;
+ ESource *selected_source;
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
@@ -333,6 +337,10 @@ enable_toggled_cb (GtkWidget *widget, gpointer data)
gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE, active, NULL);
gtk_widget_set_sensitive (stuff->option_menu, active);
+ if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL)) {
+ selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->option_menu));
+ gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, e_source_get_uri (selected_source), NULL);
+ }
}
static void
@@ -340,6 +348,7 @@ enable_gaim_toggled_cb (GtkWidget *widget, gpointer data)
{
struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
gboolean active;
+ ESource *selected_source;
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
@@ -347,6 +356,10 @@ enable_gaim_toggled_cb (GtkWidget *widget, gpointer data)
gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE_GAIM, active, NULL);
gtk_widget_set_sensitive (stuff->gaim_option_menu, active);
+ if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL)) {
+ selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->gaim_option_menu));
+ gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (selected_source), NULL);
+ }
}
static void