diff options
-rw-r--r-- | shell/ChangeLog | 8 | ||||
-rw-r--r-- | shell/e-shell.c | 19 | ||||
-rw-r--r-- | shell/e-splash.c | 6 |
3 files changed, 20 insertions, 13 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index b850372e89..ee33bb39e8 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,13 @@ 2003-04-02 Not Zed <NotZed@Ximian.com> + [#39467] + + * e-shell.c (e_shell_construct): Change the splash logic slightly, + so that if we can't create the splash, we dont try and cast/use + it. + * e-splash.c (e_splash_new): dont use a g_return* for what could + be a valid (tho incorrect) runtime condition. + [#40590] * e-config-upgrade.c (identity_map[]): Move the signature stuff to diff --git a/shell/e-shell.c b/shell/e-shell.c index 687d34e708..826178413f 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1252,7 +1252,7 @@ e_shell_construct (EShell *shell, gboolean show_splash, EShellStartupLineMode startup_line_mode) { - GtkWidget *splash; + GtkWidget *splash = NULL; EShellPrivate *priv; CORBA_Object corba_object; gchar *shortcut_path; @@ -1303,24 +1303,19 @@ e_shell_construct (EShell *shell, if (bonobo_activation_active_server_register (iid, corba_object) != Bonobo_ACTIVATION_REG_SUCCESS) return E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER; - if (! show_splash) { - splash = NULL; - } else { - splash = e_splash_new (); + if (show_splash + && (splash = e_splash_new ())) { g_signal_connect (splash, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); gtk_widget_show (splash); } - + while (gtk_events_pending ()) gtk_main_iteration (); priv->user_creatable_items_handler = e_shell_user_creatable_items_handler_new (); - if (show_splash) - setup_components (shell, E_SPLASH (splash)); - else - setup_components (shell, NULL); + setup_components (shell, (ESplash *)splash); /* Set up the shortcuts. */ @@ -1347,9 +1342,9 @@ e_shell_construct (EShell *shell, /* Now that we have a local storage and all the interfaces set up, we can tell the components we are here. */ - set_owner_on_components (shell, E_SPLASH (splash)); + set_owner_on_components (shell, (ESplash *)splash); - if (show_splash) + if (splash) gtk_widget_destroy (splash); if (e_shell_startup_wizard_create () == FALSE) { diff --git a/shell/e-splash.c b/shell/e-splash.c index a8a234fd75..a6bb79e98c 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -370,7 +370,11 @@ e_splash_new (void) GdkPixbuf *splash_image_pixbuf; splash_image_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/splash.png", NULL); - g_return_val_if_fail (splash_image_pixbuf != NULL, NULL); + + if (splash_image_pixbuf == NULL) { + g_warning("Cannot find splash image: %s", EVOLUTION_IMAGES "/splash.png"); + return NULL; + } new = g_object_new (e_splash_get_type (), NULL); e_splash_construct (new, splash_image_pixbuf); |