From 1cfa64bf80c897a4d3e5eae16ae7d0978b01a2bf Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 24 May 2002 12:39:49 +0000 Subject: [ part of #25047 ] remove the autocompletion config control from here, as 2002-05-24 Chris Toshok [ part of #25047 ] * gui/component/addressbook-config.c: remove the autocompletion config control from here, as it lives in the shell now. * gui/component/GNOME_Evolution_Addressbook.oaf.in: same. svn path=/trunk/; revision=17001 --- addressbook/ChangeLog | 8 +++ .../component/GNOME_Evolution_Addressbook.oaf.in | 25 ------- addressbook/gui/component/addressbook-config.c | 80 ---------------------- 3 files changed, 8 insertions(+), 105 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 8907fad318..23df529067 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2002-05-24 Chris Toshok + + [ part of #25047 ] + * gui/component/addressbook-config.c: remove the autocompletion + config control from here, as it lives in the shell now. + + * gui/component/GNOME_Evolution_Addressbook.oaf.in: same. + 2002-05-24 Chris Toshok [ #24189 ] diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in index c475ef47f5..d5fe3bb8ca 100644 --- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in +++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in @@ -166,31 +166,6 @@ - - - - - - - - - - - - - - - - - - - diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 74eaff863e..91e113bb2f 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -46,9 +46,7 @@ #define LDAPS_PORT_STRING "636" #define GLADE_FILE_NAME "ldap-config.glade" -#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory" #define LDAP_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl" -#define ADDRESSBOOK_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_ConfigControl" #ifdef HAVE_LDAP GtkWidget* addressbook_dialog_create_sources_table (char *name, char *string1, char *string2, @@ -1645,82 +1643,6 @@ ldap_config_control_new (GNOME_Evolution_Shell shell) return control; } -static void -addressbook_folder_list_changed_callback (EFolderList *efl, - EvolutionConfigControl *control) -{ - evolution_config_control_changed (control); -} - -static void -addressbook_config_control_destroy_callback (EvolutionConfigControl *config_control, - void *data) -{ -} - - -static void -addressbook_config_control_apply_callback (EvolutionConfigControl *config_control, - EFolderList *list) -{ - Bonobo_ConfigDatabase config_db; - char *xml; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - config_db = addressbook_config_database(&ev); - - xml = e_folder_list_get_xml (list); - bonobo_config_set_string (config_db, "/Addressbook/Completion/uris", xml, &ev); - g_free (xml); - - CORBA_exception_free (&ev); -} - -static EvolutionConfigControl * -addressbook_config_control_new (GNOME_Evolution_Shell shell) -{ - GtkWidget *control_widget; - EvolutionConfigControl *control; - EvolutionShellClient *shell_client; - Bonobo_ConfigDatabase config_db; - char *xml; - CORBA_Environment ev; - static const char *possible_types[] = { "contacts", "ldap-contacts", NULL }; - - CORBA_exception_init (&ev); - - config_db = addressbook_config_database(&ev); - - xml = bonobo_config_get_string (config_db, "/Addressbook/Completion/uris", &ev); - shell_client = evolution_shell_client_new (shell); - control_widget = e_folder_list_new (shell_client, - xml); - bonobo_object_client_unref (BONOBO_OBJECT_CLIENT (shell_client), NULL); - g_free (xml); - - gtk_object_set (GTK_OBJECT (control_widget), - "title", _("Extra Completion folders"), - "possible_types", possible_types, - NULL); - - gtk_widget_show (control_widget); - - control = evolution_config_control_new (control_widget); - - gtk_signal_connect (GTK_OBJECT (control_widget), "changed", - GTK_SIGNAL_FUNC (addressbook_folder_list_changed_callback), control); - gtk_signal_connect (GTK_OBJECT (control), "apply", - GTK_SIGNAL_FUNC (addressbook_config_control_apply_callback), control_widget); - gtk_signal_connect (GTK_OBJECT (control), "destroy", - GTK_SIGNAL_FUNC (addressbook_config_control_destroy_callback), control_widget); - - CORBA_exception_free (&ev); - - return control; -} - /* Implementation of the factory for the configuration control. */ @@ -1738,8 +1660,6 @@ config_control_factory_fn (BonoboGenericFactory *factory, if (!strcmp (component_id, LDAP_CONFIG_CONTROL_ID)) { control = ldap_config_control_new (shell); - } else if (!strcmp (component_id, ADDRESSBOOK_CONFIG_CONTROL_ID)) { - control = addressbook_config_control_new (shell); } else { control = NULL; g_assert_not_reached (); -- cgit v1.2.3