aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-10 05:56:34 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-10 05:56:34 +0800
commit2cc9ceb11f24a2cf6d127c1b6b9bd4a4f161a834 (patch)
tree744c60ae2f63132c634a7cf0a0ff7ebd1058bc1b /shell
parent733ac62d82bab03f3cc32e042cfa56a5e3138869 (diff)
downloadgsoc2013-evolution-2cc9ceb11f24a2cf6d127c1b6b9bd4a4f161a834.tar.gz
gsoc2013-evolution-2cc9ceb11f24a2cf6d127c1b6b9bd4a4f161a834.tar.zst
gsoc2013-evolution-2cc9ceb11f24a2cf6d127c1b6b9bd4a4f161a834.zip
Don't activate the components here. (e_shell_construct): Activate them all
2004-04-09 Jeffrey Stedfast <fejj@ximian.com> * e-shell.c (e_shell_attempt_upgrade): Don't activate the components here. (e_shell_construct): Activate them all here instead (before we attempt to upgrade). Fixes a bug where the shell would start up in online mode but never notify the components to go online. * main.c (idle_cb): s/Cannot access/Cannot register/ svn path=/trunk/; revision=25405
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog10
-rw-r--r--shell/e-shell.c38
-rw-r--r--shell/main.c2
3 files changed, 36 insertions, 14 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 66330ecf82..5c376977fd 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-09 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-shell.c (e_shell_attempt_upgrade): Don't activate the
+ components here.
+ (e_shell_construct): Activate them all here instead (before we
+ attempt to upgrade). Fixes a bug where the shell would start up in
+ online mode but never notify the components to go online.
+
+ * main.c (idle_cb): s/Cannot access/Cannot register/
+
2004-04-09 Chris Toshok <toshok@ximian.com>
* e-shell.c (e_shell_attempt_upgrade): make sure the component is
diff --git a/shell/e-shell.c b/shell/e-shell.c
index e4d60f32ae..7e92785553 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -561,8 +561,8 @@ e_shell_construct (EShell *shell,
EShellPrivate *priv;
CORBA_Object corba_object;
gboolean start_online;
-
- g_return_val_if_fail (shell != NULL, E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
+ GSList *component;
+
g_return_val_if_fail (E_IS_SHELL (shell), E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
g_return_val_if_fail (startup_line_mode == E_SHELL_STARTUP_LINE_MODE_CONFIG
|| startup_line_mode == E_SHELL_STARTUP_LINE_MODE_ONLINE
@@ -582,7 +582,22 @@ e_shell_construct (EShell *shell,
while (gtk_events_pending ())
gtk_main_iteration ();
-
+
+ /* activate all the components */
+ component = e_component_registry_peek_list (shell->priv->component_registry);
+ while (component != NULL) {
+ const EComponentInfo *info = component->data;
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+
+ e_component_registry_activate (shell->priv->component_registry, info->id, &ev);
+
+ CORBA_exception_free (&ev);
+
+ component = component->next;
+ }
+
attempt_upgrade(shell);
if (e_shell_startup_wizard_create () == FALSE) {
@@ -686,11 +701,8 @@ e_shell_attempt_upgrade (EShell *shell, int major, int minor, int revision)
gboolean component_upgraded;
CORBA_exception_init (&ev);
-
- e_component_registry_activate (shell->priv->component_registry, info->id, &ev);
-
- if (!BONOBO_EX (&ev))
- component_upgraded = GNOME_Evolution_Component_upgradeFromVersion (info->iface, major, minor, revision, &ev);
+
+ component_upgraded = GNOME_Evolution_Component_upgradeFromVersion (info->iface, major, minor, revision, &ev);
if (BONOBO_EX (&ev)) {
char *exception_text;
@@ -968,7 +980,7 @@ e_shell_go_online (EShell *shell,
EShellPrivate *priv;
GSList *component_infos;
GSList *p;
-
+
g_return_if_fail (shell != NULL);
g_return_if_fail (E_IS_SHELL (shell));
g_return_if_fail (action_window == NULL || E_IS_SHELL_WINDOW (action_window));
@@ -982,15 +994,15 @@ e_shell_go_online (EShell *shell,
GNOME_Evolution_Offline offline_interface;
CORBA_exception_init (&ev);
-
+
offline_interface = Bonobo_Unknown_queryInterface (info->iface, "IDL:GNOME/Evolution/Offline:1.0", &ev);
if (ev._major != CORBA_NO_EXCEPTION || offline_interface == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
+ CORBA_exception_free (&ev);
continue;
}
-
+
CORBA_exception_free (&ev);
-
+
GNOME_Evolution_Offline_goOnline (offline_interface, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
g_warning ("Error putting component `%s' online.", info->id);
diff --git a/shell/main.c b/shell/main.c
index 1fee5219bf..4b8c535b80 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -389,7 +389,7 @@ idle_cb (void *data)
corba_shell = bonobo_activation_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev);
if (ev._major != CORBA_NO_EXCEPTION || corba_shell == CORBA_OBJECT_NIL) {
e_notice (NULL, GTK_MESSAGE_ERROR,
- _("Cannot access the Ximian Evolution shell."));
+ _("Cannot register the Ximian Evolution shell."));
CORBA_exception_free (&ev);
bonobo_main_quit ();
return FALSE;