aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-03 22:27:44 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-03 22:27:44 +0800
commit0039ef5422e980484c47d2fe97c3edbf63edd5b8 (patch)
treebdc0ba031ab17a176fe758f43c7a12f508fdced5 /shell/main.c
parentb5c3ca3079407391e099eea277f37ad45e5866d7 (diff)
downloadgsoc2013-evolution-0039ef5422e980484c47d2fe97c3edbf63edd5b8.tar.gz
gsoc2013-evolution-0039ef5422e980484c47d2fe97c3edbf63edd5b8.tar.zst
gsoc2013-evolution-0039ef5422e980484c47d2fe97c3edbf63edd5b8.zip
[Fix #6232, the thirty-four-splash-screens-at-startup bug.]
* e-shell.c (setup_local_storage): Add an E_STORAGE() cast to prevent a warning. * main.c (idle_cb): Only try to activate from the shell ID if the result is `E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER'; if there is a different error, spit out a dialog box with a description of it and exit instead. * e-shell.c (e_shell_construct): Return an `EShellConstructResult' describing what kind of result we had. Show the splash after the DB has been reached, not before. (e_shell_construct_result_to_string): New function to get a descriptive string out of an `EShellConstructResult'. (e_shell_new): New arg @construct_result_return to return a description of the result of the operation. * e-shell.h: New enum `EShellConstructResult'. * e-shell.c (impl_Shell_createNewView): Raise `InternalError' instead of crashing if the shell_view returns a CORBA_OBJECT_NIL. * Evolution-Shell.idl: New exception `InternalError'. `createNewView' and `handleURI' can raise it. svn path=/trunk/; revision=11611
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/shell/main.c b/shell/main.c
index 45add1d1f9..5520007a3e 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -87,7 +87,6 @@ static void
development_warning (void)
{
GtkWidget *label, *warning_dialog;
- int ret;
warning_dialog = gnome_dialog_new ("Evolution " VERSION, GNOME_STOCK_BUTTON_OK, NULL);
@@ -138,18 +137,18 @@ idle_cb (void *data)
GSList *uri_list;
GNOME_Evolution_Shell corba_shell;
CORBA_Environment ev;
+ EShellConstructResult result;
gboolean restored;
CORBA_exception_init (&ev);
uri_list = (GSList *) data;
- shell = e_shell_new (evolution_directory, ! no_splash);
+ shell = e_shell_new (evolution_directory, ! no_splash, &result);
g_free (evolution_directory);
- if (shell == NULL) {
+ if (result == E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER) {
corba_shell = oaf_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev);
-
if (ev._major != CORBA_NO_EXCEPTION || corba_shell == CORBA_OBJECT_NIL) {
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Cannot access the Evolution shell."));
@@ -159,6 +158,13 @@ idle_cb (void *data)
}
restored = FALSE;
+ } else if (result != E_SHELL_CONSTRUCT_RESULT_OK) {
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("Cannot initialize the Evolution shell: %s"),
+ e_shell_construct_result_to_string (result));
+ CORBA_exception_free (&ev);
+ gtk_main_quit ();
+ return FALSE;
} else {
gtk_signal_connect (GTK_OBJECT (shell), "no_views_left",
GTK_SIGNAL_FUNC (no_views_left_cb), NULL);