diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-10-02 07:43:29 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-10-02 07:43:29 +0800 |
commit | f41afabb336730bb1259c7a95b55c31416c1a38f (patch) | |
tree | a95c2d254a3b51618341cdf7141926ba8b8459e1 /mail | |
parent | 797efb77af574d71f523cc3324570db4f1f773c6 (diff) | |
download | gsoc2013-evolution-f41afabb336730bb1259c7a95b55c31416c1a38f.tar.gz gsoc2013-evolution-f41afabb336730bb1259c7a95b55c31416c1a38f.tar.zst gsoc2013-evolution-f41afabb336730bb1259c7a95b55c31416c1a38f.zip |
Check for errors
svn path=/trunk/; revision=13292
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 14 | ||||
-rw-r--r-- | mail/component-factory.c | 13 | ||||
-rw-r--r-- | mail/folder-info.c | 5 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 5 | ||||
-rw-r--r-- | mail/mail-config.c | 5 | ||||
-rw-r--r-- | mail/mail-config.h | 2 | ||||
-rw-r--r-- | mail/mail.h | 3 |
7 files changed, 34 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index b00ce73157..a5bcf0062d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,17 @@ +2001-10-01 Iain Holmes <iain@ximian.com> + + * component-factory.c (component_factory_init): Check for errors. + + * mail.h: Change prototype for evolution_folder_info_factory_init. + + * folder-info.c (evolution_folder_info_factory_init): Return TRUE + or FALSE. + + * mail-config.c (evolution_mail_config_factory_init): Return TRUE or + FALSE. + + * mail-config.h: Change prototype for above. + 2001-10-01 Jeffrey Stedfast <fejj@ximian.com> * mail-vfolder.c (mail_vfolder_remove_uri): replace my_list_find() diff --git a/mail/component-factory.c b/mail/component-factory.c index 9cf5cf47e2..804829a491 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -847,10 +847,17 @@ component_factory_init (void) exit (1); } - /* FIXME these don't check for errors. */ + if (evolution_mail_config_factory_init () == FALSE) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("Cannot initialize Evolution's mail config component.")); + exit (1); + } - evolution_mail_config_factory_init (); - evolution_folder_info_factory_init (); + if (evolution_folder_info_factory_init () == FALSE) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("Cannot initialize Evolution's folder info component.")); + exit (1); + } } static void diff --git a/mail/folder-info.c b/mail/folder-info.c index 386a34787d..268efe5e77 100644 --- a/mail/folder-info.c +++ b/mail/folder-info.c @@ -227,7 +227,7 @@ evolution_folder_info_factory_fn (BonoboGenericFactory *factory, return BONOBO_OBJECT (info); } -void +gboolean evolution_folder_info_factory_init (void) { BonoboGenericFactory *factory; @@ -238,8 +238,9 @@ evolution_folder_info_factory_init (void) if (factory == NULL) { g_warning ("Error starting FolderInfo"); - return; + return FALSE; } bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); + return TRUE; } diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index 34f62c54b2..d86cfae3d4 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -52,6 +52,7 @@ #include <bonobo/bonobo-context.h> #include <evolution-wizard.h> + static void mail_config_druid_class_init (MailConfigDruidClass *class); static void mail_config_druid_finalize (GtkObject *obj); @@ -508,9 +509,7 @@ finish_func (GnomeDruidPage *page, CORBA_exception_init (&ev); pagenum = page_to_num (page); - g_print ("Hello\n"); GNOME_Evolution_Wizard_notifyAction (wiz, 0, GNOME_Evolution_Wizard_FINISH, &ev); - g_print ("Goodbye\n"); CORBA_exception_free (&ev); druid_finish (page, druid, data); @@ -878,7 +877,7 @@ evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, wizard = evolution_wizard_new (get_fn, 5, gui); account_wizard = wizard; - + gtk_object_set_data_full (GTK_OBJECT (account_wizard), "account-data", gui, (GtkDestroyNotify) wizard_free); diff --git a/mail/mail-config.c b/mail/mail-config.c index e3240e8aac..17a3a25550 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -2071,12 +2071,11 @@ evolution_mail_config_factory_fn (BonoboGenericFactory *factory, { EvolutionMailConfig *config; - g_warning ("Made"); config = gtk_type_new (evolution_mail_config_get_type ()); return BONOBO_OBJECT (config); } -void +gboolean evolution_mail_config_factory_init (void) { BonoboGenericFactory *factory; @@ -2086,7 +2085,9 @@ evolution_mail_config_factory_init (void) NULL); if (factory == NULL) { g_warning ("Error starting MailConfig"); + return FALSE; } bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); + return TRUE; } diff --git a/mail/mail-config.h b/mail/mail-config.h index 6de85b5049..1264a8cbc3 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -206,7 +206,7 @@ gboolean mail_config_check_service (const char *url, CamelProviderType type, GL -void evolution_mail_config_factory_init (void); +gboolean evolution_mail_config_factory_init (void); #ifdef __cplusplus } diff --git a/mail/mail.h b/mail/mail.h index 6e13d84f66..81f0d7174f 100644 --- a/mail/mail.h +++ b/mail/mail.h @@ -78,6 +78,5 @@ void mail_remove_storage (CamelStore *store); void mail_storages_foreach (GHFunc func, gpointer data); int mail_storages_count (void); - -void evolution_folder_info_factory_init (void); +gboolean evolution_folder_info_factory_init (void); |