diff options
author | Not Zed <NotZed@Ximian.com> | 2003-01-09 20:17:19 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-01-09 20:17:19 +0800 |
commit | 6e9cb1e2bf29610e0d111572e72244b11542cc8d (patch) | |
tree | 21db40dbfab1d71cd0316457ed3679f362bef96f /mail | |
parent | 45d0c39700d2d6ee12f45c17778d69f3119ba078 (diff) | |
download | gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar.gz gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar.bz2 gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar.lz gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar.xz gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.tar.zst gsoc2013-evolution-6e9cb1e2bf29610e0d111572e72244b11542cc8d.zip |
Added druidpagestart1 to the pages list. (construct): Change the limits on
2003-01-09 Not Zed <NotZed@Ximian.com>
* mail-config-druid.c: Added druidpagestart1 to the pages list.
(construct): Change the limits on the page initialisation, and
widget_show_all on the page rather than the content.
* GNOME_Evolution_Mail.server.in.in: Make Mail a shlib component.
* folder-info.c (evolution_folder_info_factory_init): Removed.
(evolution_folder_info_factory_fn): renamed to evolution_folder_info_new().
* mail-config-druid.c (evolution_mail_config_wizard_factory_fn):
Renamed to evolution_mail_config_wizard_new().
(evolution_mail_config_wizard_init): Removed.
* mail-config-factory.c (mail_config_register_factory): Remove.
(config_control_factory_cb): make this public.
* Makefile.am: setup evolution-mail as a shared library.
* component-factory.c (make_factory): implement the bonobo-plugin
factory for shlib operation. Also, preliminary work to setup mailer-specific
(factory): Implement the factory which starts various components.
* mail-config.c (xml_get_prop): g_free->xmlFree
(account_to_xml): copy xml memory to glib memory when adding the 0
on the end of the string.
(accounts_save): Use slightly different logic with appending to
the tail of the list, we can't use the &node trick with gslists.
(accounts_changed): Same here.
svn path=/trunk/; revision=19362
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 22 | ||||
-rw-r--r-- | mail/GNOME_Evolution_Mail.server.in.in | 136 | ||||
-rw-r--r-- | mail/Makefile.am | 15 | ||||
-rw-r--r-- | mail/component-factory.c | 112 | ||||
-rw-r--r-- | mail/folder-info.c | 33 | ||||
-rw-r--r-- | mail/folder-info.h | 1 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 28 | ||||
-rw-r--r-- | mail/mail-config-druid.h | 1 | ||||
-rw-r--r-- | mail/mail-config-factory.c | 19 |
9 files changed, 179 insertions, 188 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 58a4c4247b..6300241292 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,27 @@ 2003-01-09 Not Zed <NotZed@Ximian.com> + * mail-config-druid.c: Added druidpagestart1 to the pages list. + (construct): Change the limits on the page initialisation, and + widget_show_all on the page rather than the content. + + * GNOME_Evolution_Mail.server.in.in: Make Mail a shlib component. + + * folder-info.c (evolution_folder_info_factory_init): Removed. + (evolution_folder_info_factory_fn): renamed to evolution_folder_info_new(). + + * mail-config-druid.c (evolution_mail_config_wizard_factory_fn): + Renamed to evolution_mail_config_wizard_new(). + (evolution_mail_config_wizard_init): Removed. + + * mail-config-factory.c (mail_config_register_factory): Remove. + (config_control_factory_cb): make this public. + + * Makefile.am: setup evolution-mail as a shared library. + + * component-factory.c (make_factory): implement the bonobo-plugin + factory for shlib operation. Also, preliminary work to setup mailer-specific + (factory): Implement the factory which starts various components. + * mail-config.c (xml_get_prop): g_free->xmlFree (account_to_xml): copy xml memory to glib memory when adding the 0 on the end of the string. diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in index 929d988c00..853e59c011 100644 --- a/mail/GNOME_Evolution_Mail.server.in.in +++ b/mail/GNOME_Evolution_Mail.server.in.in @@ -2,38 +2,38 @@ <!-- Folder display control --> - <!-- (control) --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control" - type="factory" - location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> + <!-- (factory) --> + <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ControlFactory" + type="shlib" + location="@COMPONENTDIR@/libevolution-mail.so"> <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:BonoboControl/evolution-mail:1.0"/> - <item value="IDL:GNOME/Control:1.0"/> + <item value="IDL:GNOME/ObjectFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" - _value="Evolution mail folder display component."/> + _value="Factory for the controls exported by the Evolution Mailer"/> </oaf_server> - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ControlFactory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> + <!-- (control) --> + <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control" + type="factory" + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/ObjectFactory:1.0"/> + <item value="IDL:BonoboControl/evolution-mail:1.0"/> + <item value="IDL:GNOME/Control:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" - _value="Evolution mail folder factory component."/> + _value="Evolution mail folder display component."/> </oaf_server> <!-- Shell Component --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> + type="factory" + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/ShellComponent:1.0"/> @@ -50,21 +50,9 @@ <!-- Summary component, for showing info in the summary --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:Bonobo/Unknown:1.0"/> - </oaf_attribute> - - <oaf_attribute name="description" type="string" - _value="Factory for the Mail Summary component."/> - </oaf_server> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponent" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution:Summary:ComponentFactory:1.0"/> @@ -76,23 +64,10 @@ <!-- Message composer --> - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerFactory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/GenericFactory:1.0"/> - </oaf_attribute> - - <oaf_attribute name="description" type="string" - _value="Factory for the Evolution composer."/> - </oaf_server> - <!-- (composer) --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Composer" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ComposerFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution:Composer:1.0"/> @@ -103,19 +78,10 @@ _value="Evolution mail composer."/> </oaf_server> - <!-- Config Wizard interface --> - <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig_Factory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/GenericFactory:1.0"/> - </oaf_attribute> - </oaf_server> - + <!-- MailConfig interface --> <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig" type="factory" - location="OAFIID:GNOME_Evolution_MailConfig_Factory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/MailConfig:1.0"/> @@ -125,47 +91,11 @@ _value="Mail configuration interface"/> </oaf_server> - <!-- MailConfig interface --> - - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig_Factory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/GenericFactory:1.0"/> - </oaf_attribute> - </oaf_server> - - <!-- (interface) --> - <oaf_server iid="OAFIID:GNOME_Evolution_MailConfig" - type="factory" - location="OAFIID:GNOME_Evolution_MailConfig_Factory"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/Evolution/MailConfig:1.0"/> - </oaf_attribute> - - <oaf_attribute name="description" type="string" - _value="Mail configuration interface"/> - </oaf_server> - <!-- FolderInfo interface --> - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo_Factory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/GenericFactory:1.0"/> - </oaf_attribute> - </oaf_server> - - <!-- (interface) --> <oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo" type="factory" - location="OAFIID:GNOME_Evolution_FolderInfo_Factory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/FolderInfo:1.0"/> @@ -174,35 +104,19 @@ <!-- Startup Wizard --> - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard_Factory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - </oaf_server> - <!-- (wizard) --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard" type="factory" - location="OAFIID:GNOME_Evolution_Mail_Wizard_Factory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> </oaf_server> <!-- Configuration pages --> - <!-- (factory) --> - <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory" - type="exe" - location="@LIBEXECDIR@/evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/GenericFactory:1.0"/> - </oaf_attribute> - </oaf_server> - <!-- Account Editor --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Accounts_ConfigControl" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> @@ -231,7 +145,7 @@ <!-- Mail Preferences --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Preferences_ConfigControl" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> @@ -256,7 +170,7 @@ <!-- Font Preferences --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_FontPrefs_ConfigControl" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> @@ -281,7 +195,7 @@ <!-- Composer Preferences --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl" type="factory" - location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"> + location="OAFIID:GNOME_Evolution_Mail_ControlFactory"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> diff --git a/mail/Makefile.am b/mail/Makefile.am index 4c89094492..dbdb944a0c 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = importers -libexec_PROGRAMS = \ - evolution-mail +#libexec_PROGRAMS = \ +# evolution-mail # evolution-mail-upgrade importerdir = $(privlibdir)/evolution-mail-importers @@ -34,6 +34,9 @@ INCLUDES = \ -DGTK_DISABLE_DEPRECATED \ -DG_LOG_DOMAIN=\"evolution-mail\" +componentdir = $(COMPONENT_DIR) +component_LTLIBRARIES = libevolution-mail.la + EVOLUTION_MAIL_CORBA_GENERATED = \ Mailer.h \ Mailer-common.c \ @@ -53,7 +56,7 @@ $(IDL_GENERATED): $(SPELL_IDL) Spell-impl.o: Spell.h -evolution_mail_SOURCES = \ +libevolution_mail_la_SOURCES = \ $(EVOLUTION_MAIL_CORBA_GENERATED) \ $(IDL_GENERATED) \ component-factory.c \ @@ -140,7 +143,7 @@ evolution_mail_SOURCES = \ # mail-font-prefs.c \ # mail-font-prefs.h -evolution_mail_LDADD = \ +libevolution_mail_la_LIBADD = \ $(top_builddir)/shell/importer/libevolution-importer.la \ $(top_builddir)/camel/libcamel.la \ $(top_builddir)/e-util/libeutil.la \ @@ -155,7 +158,7 @@ evolution_mail_LDADD = \ $(top_builddir)/widgets/menus/libmenus.la \ $(EVOLUTION_MAIL_LIBS) -evolution_mail_LDFLAGS = \ +libevolution_mail_la_LDFLAGS = \ -export-dynamic #evolution_mail_upgrade_SOURCES = upgrade-mailer.c @@ -169,7 +172,7 @@ server_in_files = GNOME_Evolution_Mail.server.in.in serverdir = $(libdir)/bonobo/servers server_DATA = $(server_in_files:.server.in.in=.server) $(server_in_files:.server.in.in=.server.in): $(server_in_files) - sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ + sed -e "s|\@COMPONENTDIR\@|$(componentdir)|" $< > $@ @INTLTOOL_SERVER_RULE@ gladedir = $(datadir)/evolution/glade diff --git a/mail/component-factory.c b/mail/component-factory.c index 2e2cdb4c2c..652f62fcd2 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -943,9 +943,8 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data) { GConfClient *gconf; int i; - + gconf = gconf_client_get_default (); - for (i=0;i<sizeof(shell_component_handlers)/sizeof(shell_component_handlers[0]);i++) g_signal_handler_disconnect((GtkObject *)shell_component, shell_component_handlers[i].hand); @@ -1596,3 +1595,112 @@ mail_storages_foreach (GHFunc func, gpointer data) { g_hash_table_foreach (storages_hash, func, data); } + + + +#include <signal.h> + +#include <bonobo/bonobo-shlib-factory.h> +#include "folder-info.h" +#include "mail-preferences.h" +#include "mail-composer-prefs.h" + +#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ControlFactory" + +#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig" +#define WIZARD_IID "OAFIID:GNOME_Evolution_Mail_Wizard" +#define FOLDER_INFO_IID "OAFIID:GNOME_Evolution_FolderInfo" + +static BonoboObject * +factory (BonoboGenericFactory *factory, + const char *component_id, + void *closure) +{ + printf("Activating component '%s'\n", component_id); + + if (strcmp (component_id, COMPONENT_ID) == 0) + return create_component(); + else if (strcmp(component_id, MAIL_CONFIG_IID) == 0) + return (BonoboObject *)g_object_new (evolution_mail_config_get_type (), NULL); + else if (strcmp(component_id, FOLDER_INFO_IID) == 0) + return evolution_folder_info_new(); + else if (strcmp(component_id, WIZARD_IID) == 0) + return evolution_mail_config_wizard_new(); + +#warning "font prefs" +#define MAIL_FONT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_FontPrefs_ConfigControl" + + else if (strcmp (component_id, MAIL_ACCOUNTS_CONTROL_ID) == 0 + || strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID) == 0 + || strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID) == 0 + || strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID) == 0) + return config_control_factory_cb(factory, component_id, evolution_shell_client_corba_objref (global_shell_client)); + + g_warning (FACTORY_ID ": Don't know what to do with %s", component_id); + return NULL; +} + +/* The GNOME SEGV handler will lose if it's not run from the main Gtk + * thread. So if we crash in another thread, redirect the signal. + */ +static void (*gnome_segv_handler) (int); + +static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT; + +static void +segv_redirect (int sig) +{ + if (pthread_self () == mail_gui_thread) + gnome_segv_handler (sig); + else { + pthread_kill (mail_gui_thread, sig); + /* We can't return from the signal handler or the + * thread may SEGV again. But we can't pthread_exit, + * because then the thread may get cleaned up before + * bug-buddy can get a stack trace. So we block by + * trying to lock a mutex we know is already locked. + */ + g_static_mutex_lock (&segv_mutex); + } +} + + +static Bonobo_Unknown +make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_Environment *ev) +{ + struct sigaction sa, osa; + static int init = 0; + + if (!init) { + sigaction (SIGSEGV, NULL, &osa); + if (osa.sa_handler != SIG_DFL) { + sa.sa_flags = 0; + sigemptyset (&sa.sa_mask); + sa.sa_handler = segv_redirect; + sigaction (SIGSEGV, &sa, NULL); + sigaction (SIGBUS, &sa, NULL); + sigaction (SIGFPE, &sa, NULL); + + sa.sa_handler = SIG_IGN; + sigaction (SIGXFSZ, &sa, NULL); + gnome_segv_handler = osa.sa_handler; + g_static_mutex_lock (&segv_mutex); + } + + /* init ? */ + mail_config_init (); + mail_msg_init (); + init = 1; + } + + return bonobo_shlib_factory_std (FACTORY_ID, poa, impl_ptr, factory, NULL, ev); +} + +static BonoboActivationPluginObject plugin_list[] = { + {FACTORY_ID, make_factory}, + { NULL } +}; +const BonoboActivationPlugin Bonobo_Plugin_info = { + plugin_list, "Evolution Mail component factory" +}; + diff --git a/mail/folder-info.c b/mail/folder-info.c index 5dda928863..3e2d8eb785 100644 --- a/mail/folder-info.c +++ b/mail/folder-info.c @@ -10,8 +10,6 @@ #include <config.h> #endif -#include "folder-info.h" - #include "Mailer.h" #include <glib.h> @@ -22,6 +20,8 @@ #include <bonobo/bonobo-context.h> #include <bonobo/bonobo-exception.h> +#include "folder-info.h" + #include "mail.h" #include "mail-mt.h" #include "mail-tools.h" @@ -139,7 +139,7 @@ mail_get_info (const char *foldername, m = mail_msg_new (&get_info_op, NULL, sizeof (*m)); -/* g_print ("Folder: %s", foldername); */ + /*g_print ("Folder: %s", foldername);*/ m->foldername = g_strdup (foldername); CORBA_exception_init (&ev); @@ -225,10 +225,8 @@ get_prop (BonoboPropertyBag *bag, } } -static BonoboObject * -evolution_folder_info_factory_fn (BonoboGenericFactory *factory, - const char *id, - void *closure) +BonoboObject * +evolution_folder_info_new (void) { EvolutionFolderInfo *info; BonoboPropertyBag *pb; @@ -251,27 +249,6 @@ evolution_folder_info_factory_fn (BonoboGenericFactory *factory, return BONOBO_OBJECT (info); } -gboolean -evolution_folder_info_factory_init (void) -{ - BonoboGenericFactory *factory; - - folder_infos = NULL; - ready = FALSE; - - factory = bonobo_generic_factory_new (FOLDER_INFO_IID, - evolution_folder_info_factory_fn, - NULL); - - if (factory == NULL) { - g_warning ("Error starting FolderInfo"); - return FALSE; - } - - bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); - return TRUE; -} - void evolution_folder_info_notify_ready (void) { diff --git a/mail/folder-info.h b/mail/folder-info.h index 13266c5c04..3ce396a727 100644 --- a/mail/folder-info.h +++ b/mail/folder-info.h @@ -34,6 +34,7 @@ extern "C" { GtkType evolution_folder_info_get_type (void); gboolean evolution_folder_info_factory_init (void); +BonoboObject *evolution_folder_info_new (void); void evolution_folder_info_notify_ready (void); diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index a529b47220..c7e2f498f6 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -491,6 +491,7 @@ static const char *pages[] = { "transport_page", "management_page", "finish_page", + "druidpagestart1", NULL }; @@ -678,7 +679,7 @@ construct (MailConfigDruid *druid) g_signal_connect(page, "back", G_CALLBACK (back_func), druid); g_signal_connect(page, "finish", G_CALLBACK (finish_func), druid); - if (i != 5) { + if (i < 5) { Bonobo_Control control; GtkWidget *w; CORBA_Environment ev; @@ -695,8 +696,9 @@ construct (MailConfigDruid *druid) w = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL); gtk_box_pack_start (GTK_BOX (dpage->vbox), w, TRUE, TRUE, 0); - gtk_widget_show_all (w); } + gtk_widget_show_all (page); + } g_signal_connect(druid->druid, "cancel", G_CALLBACK(druid_cancel), druid); @@ -984,10 +986,8 @@ wizard_free (MailConfigWizard *wizard) g_free (wizard); } -static BonoboObject * -evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, - const char *id, - void *closure) +BonoboObject * +evolution_mail_config_wizard_new(void) { EvolutionWizard *wizard; MailConfigAccount *account; @@ -1017,19 +1017,3 @@ evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, return BONOBO_OBJECT (wizard); } - -void -evolution_mail_config_wizard_init (void) -{ - BonoboGenericFactory *factory; - - factory = bonobo_generic_factory_new (WIZARD_IID, - evolution_mail_config_wizard_factory_fn, NULL); - - if (factory == NULL) { - g_warning ("Error starting factory"); - return; - } - - bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); -} diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h index d739898077..a74073ae8c 100644 --- a/mail/mail-config-druid.h +++ b/mail/mail-config-druid.h @@ -81,7 +81,6 @@ gint mail_config_druid_get_auto_check_minutes (MailConfigDruid *druid); char *mail_config_druid_get_transport_url (MailConfigDruid *druid); gboolean mail_config_druid_get_save_transport_password (MailConfigDruid *druid); gboolean mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid); -void evolution_mail_config_wizard_init (void); #ifdef __cplusplus } diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index 641dced5d1..c16f70c3ee 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -62,7 +62,7 @@ config_control_apply_cb (EvolutionConfigControl *config_control, void *user_data data->apply (data->prefs); } -static BonoboObject * +BonoboObject * config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data) { GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data; @@ -120,20 +120,3 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_ return BONOBO_OBJECT (control); } - -gboolean -mail_config_register_factory (GNOME_Evolution_Shell shell) -{ - g_return_val_if_fail (shell != CORBA_OBJECT_NIL, FALSE); - - factory = bonobo_generic_factory_new (CONFIG_CONTROL_FACTORY_ID, - config_control_factory_cb, - shell); - - if (factory != NULL) { - return TRUE; - } else { - g_warning ("Cannot register factory %s", CONFIG_CONTROL_FACTORY_ID); - return FALSE; - } -} |