From b6b0c36a3bba3056ee69a9d3eb7a7dc746dacd8a Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 3 Aug 2001 03:17:14 +0000 Subject: Spit out a warning if we cannot resolve "Bonobo/ConfigDatabase" on * e-shell.c (e_shell_construct): Spit out a warning if we cannot resolve "Bonobo/ConfigDatabase" on "wombat:". Also, register on OAF only after we are sure we are not going to return FALSE. svn path=/trunk/; revision=11603 --- shell/ChangeLog | 6 ++++++ shell/e-shell.c | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 8f78ac8936..78562a3b96 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2001-08-02 Ettore Perazzoli + + * e-shell.c (e_shell_construct): Spit out a warning if we cannot + resolve "Bonobo/ConfigDatabase" on "wombat:". Also, register on + OAF only after we are sure we are not going to return FALSE. + 2001-08-01 Ettore Perazzoli * e-shell-view.c (switch_on_folder_tree_click): Set the diff --git a/shell/e-shell.c b/shell/e-shell.c index 62c891e2f8..1b3dcbbde8 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -793,12 +793,6 @@ e_shell_construct (EShell *shell, g_return_val_if_fail (local_directory != NULL, FALSE); g_return_val_if_fail (g_path_is_absolute (local_directory), FALSE); - /* FIXME: Multi-display stuff. */ - - corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); - if (oaf_active_server_register (iid, corba_object) != OAF_REG_SUCCESS) - return FALSE; - if (! show_splash) { splash = NULL; } else { @@ -827,12 +821,24 @@ e_shell_construct (EShell *shell, priv->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); if (BONOBO_EX (&ev) || priv->db == CORBA_OBJECT_NIL) { + g_warning ("Cannot access Bonobo/ConfigDatabase on wombat:"); CORBA_exception_free (&ev); return FALSE; } CORBA_exception_free (&ev); + + /* Now we can register into OAF. Notice that we shouldn't be + registering into OAF until we are sure we can complete the + process. */ + /* FIXME: Multi-display stuff. */ + corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); + if (oaf_active_server_register (iid, corba_object) != OAF_REG_SUCCESS) { + CORBA_exception_free (&ev); + return FALSE; + } + if (show_splash) setup_components (shell, E_SPLASH (splash)); else -- cgit v1.2.3