From 0432e0fb2709cf09a898a8c9cf914ed7e81e88b1 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 3 Dec 2007 07:31:16 +0000 Subject: ** Fix for bug #391062 * bbdb.c: (bbdb_open_addressbook): Dont add contacts, if it is enabled to do so. svn path=/trunk/; revision=34626 --- plugins/bbdb/bbdb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/bbdb/bbdb.c') diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 9155bcb93b..ad02eb2aca 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -307,9 +307,17 @@ bbdb_open_addressbook (int type) gboolean status; GError *error = NULL; - + gboolean enable = TRUE; gconf = gconf_client_get_default (); + /* Check to see if we're supposed to be running */ + if (type == AUTOMATIC_CONTACTS_ADDRESSBOOK) + enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL); + if (!enable) { + g_object_unref (G_OBJECT (gconf)); + return NULL; + } + /* Open the appropriate addresbook. */ if (type == GAIM_ADDRESSBOOK) uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL); -- cgit v1.2.3