[evolution/kill-bonobo: 27/54] Fix a problem with EShell initialization.



commit c4d1d29eaaae6c2668599de0c989f5fe2b189c1e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jul 12 08:59:41 2009 -0400

    Fix a problem with EShell initialization.

 shell/e-shell.c |    9 ++++-----
 shell/main.c    |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 35908e0..15aed43 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -505,6 +505,10 @@ shell_finalize (GObject *object)
 static void
 shell_constructed (GObject *object)
 {
+	/* The first EShell instance is the default. */
+	if (default_shell == NULL)
+		default_shell = g_object_ref (object);
+
 	/* UniqueApp will have by this point determined whether we're
 	 * the only Evolution process running.  If so, proceed normally.
 	 * Otherwise we just issue commands to the other process. */
@@ -516,11 +520,6 @@ shell_constructed (GObject *object)
 	shell_load_modules (E_SHELL (object));
 	shell_create_backends (E_SHELL (object));
 
-	/* e_shell_migrate_attempt() leads to code paths that rely on
-	 * e_shell_get_default(), so set the default shell first. */
-	if (default_shell == NULL)
-		default_shell = g_object_ref (object);
-
 	e_shell_migrate_attempt (E_SHELL (object));
 }
 
diff --git a/shell/main.c b/shell/main.c
index bbd9319..049ddce 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -329,7 +329,7 @@ idle_cb (gchar **uris)
 		gtk_main_quit ();
 
 	/* This must be done after EShell has loaded all the backends.
-	 * For example the mail backend makes the global variable `session`
+	 * For example the mail backend makes the global variable 'session'
 	 * which is being used by several EPlugins */
 	else if (uris == NULL && !disable_eplugin)
 		e_plugin_load_plugins_with_missing_symbols ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]