From 9e0c55571c469803870d5265e8a300e691114123 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 3 Feb 2005 07:06:10 +0000 Subject: Implement based on the create_groups () function in addressbook-migrate.c. 2004-02-02 Hans Petter Jansson * gui/component/addressbook-component.c (ensure_sources): Implement based on the create_groups () function in addressbook-migrate.c. (addressbook_component_init): Call ensure_sources (). This will create the necessary addressbook source groups if they somehow disappeared from GConf. * gui/component/addressbook-config.c (addressbook_config_edit_source): If we can't get any source groups, just issue a console warning and return NULL. Creating sources without groups is meaningless. Work around for #67411 svn path=/trunk/; revision=28685 --- addressbook/gui/component/addressbook-config.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addressbook/gui/component/addressbook-config.c') diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 7b69fb8c4f..980ae3bc77 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -1075,6 +1075,12 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) gconf = gconf_client_get_default(); sdialog->source_list = e_source_list_new_for_gconf(gconf, "/apps/evolution/addressbook/sources"); l = e_source_list_peek_groups(sdialog->source_list); + if (!l) { + g_warning ("Addressbook source groups are missing! Check your GConf setup."); + g_free (sdialog); + return NULL; + } + sdialog->menu_source_groups = g_slist_copy(l); #ifndef HAVE_LDAP for (;l;l = g_slist_next(l)) -- cgit v1.2.3