diff options
author | Devashish Sharma <dsharma@src.gnome.org> | 2006-08-03 19:35:23 +0800 |
---|---|---|
committer | Devashish Sharma <dsharma@src.gnome.org> | 2006-08-03 19:35:23 +0800 |
commit | 07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0 (patch) | |
tree | 138d4c45f98cfad9652366edc62ee5f444af246c /plugins/bbdb/bbdb.c | |
parent | 6d4bad19269315dceb0a0e5d26f7b04c6da3376f (diff) | |
download | gsoc2013-evolution-07ea8ad49bdee8a6a2c68c70c25ebe8e3249e7e0.tar.gz 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.c | 15 |
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 |