From 70a6a65a5607ab0003c25bd64a4338baa47d1dd5 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 25 Sep 2001 20:16:14 +0000 Subject: Throw up a warning dialog if we suspect the config database is corrupt. 2001-09-25 Jeffrey Stedfast * component-factory.c (owner_set_cb): Throw up a warning dialog if we suspect the config database is corrupt. * mail-config.c (config_read): If the account name is NULL, then we have a corrupt config database most likely - so generate a fake account name and set the corrupt but to TRUE. (mail_config_is_corrupt): New function to find out if the config is suspected of being corrupted. svn path=/trunk/; revision=13116 --- mail/component-factory.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 87f4fadbc2..cddf142891 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -635,6 +635,12 @@ shell_client_destroy (GtkObject *object) global_shell_client = NULL; } +static void +warning_clicked (GtkWidget *dialog, gpointer user_data) +{ + gtk_widget_destroy (dialog); +} + static void owner_set_cb (EvolutionShellComponent *shell_component, EvolutionShellClient *shell_client, @@ -679,10 +685,20 @@ owner_set_cb (EvolutionShellComponent *shell_component, } mail_session_enable_interaction (TRUE); - + vfolder_load_storage(corba_shell); mail_autoreceive_setup (); + + if (mail_config_is_corrupt ()) { + GtkWidget *dialog; + + dialog = gnome_warning_dialog (_("Some of your mail settings seem corrupt, " + "please check that everything is in order.")); + gtk_signal_connect (GTK_OBJECT (dialog), "clicked", warning_clicked, NULL); + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gtk_widget_show (dialog); + } } static void -- cgit v1.2.3