From bf762467c8703006c96d4698b558a7af6d14262b Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 25 Jan 2001 19:05:22 +0000 Subject: Made this only add the initial VCard if it finds a file "create-initial" 2001-01-25 Christopher James Lahey * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): Made this only add the initial VCard if it finds a file "create-initial" in the directory it's creating the database in. * gui/component/addressbook-component.c (factory_fn): Added a create_folder function. * gui/search/e-addressbook-search-dialog.c (e_addressbook_search_dialog_init): Fixed an unused variable warning. svn path=/trunk/; revision=7816 --- addressbook/gui/component/addressbook-component.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index fbd7424e96..129a2f2d97 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -76,6 +76,26 @@ create_view (EvolutionShellComponent *shell_component, return EVOLUTION_SHELL_COMPONENT_OK; } +static void +create_folder (EvolutionShellComponent *shell_component, + const char *physical_uri, + const char *type, + const GNOME_Evolution_ShellComponentListener listener, + void *closure) +{ + CORBA_Environment ev; + GNOME_Evolution_ShellComponentListener_Result result; + + if (g_strcasecmp (type, "contacts") != 0) + result = GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE; + else + result = GNOME_Evolution_ShellComponentListener_OK; + + CORBA_exception_init(&ev); + GNOME_Evolution_ShellComponentListener_notifyResult(listener, result, &ev); + CORBA_exception_free(&ev); +} + static int owner_count = 0; static void @@ -111,7 +131,7 @@ factory_fn (BonoboGenericFactory *factory, { EvolutionShellComponent *shell_component; - shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL, NULL, NULL); + shell_component = evolution_shell_component_new (folder_types, create_view, create_folder, NULL, NULL, NULL, NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); -- cgit v1.2.3