From 1dd540e02b505af0fa2662c090c92aa8ca8e37a6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 12 May 2007 01:14:55 +0000 Subject: Create a shell window if the schema or an alias was found. Previously this 2007-05-11 Matthew Barnes * e-shell.c (impl_Shell_handleURI): Create a shell window if the schema or an alias was found. Previously this only opened a window if an alias was found but not the schema. Makes the GNOME Clock applet able to correctly start Evolution once again. (#407104) svn path=/trunk/; revision=33514 --- shell/ChangeLog | 8 ++++++++ shell/e-shell.c | 20 +++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 2fe0fec9ec..388a5ef150 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2007-05-11 Matthew Barnes + + * e-shell.c (impl_Shell_handleURI): + Create a shell window if the schema or an alias was found. + Previously this only opened a window if an alias was found + but not the schema. Makes the GNOME Clock applet able to + correctly start Evolution once again. (#407104) + 2007-05-01 Matthew Barnes * main.c (show_development_warning): diff --git a/shell/e-shell.c b/shell/e-shell.c index c6b380a1ec..159dea6834 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -257,8 +257,8 @@ impl_Shell_handleURI (PortableServer_Servant servant, { EShell *shell = E_SHELL (bonobo_object_from_servant (servant)); EComponentInfo *component_info; + GtkWidget *shell_window; char *schema, *p; - int show = FALSE; schema = g_alloca(strlen(uri)+1); strcpy(schema, uri); @@ -267,26 +267,20 @@ impl_Shell_handleURI (PortableServer_Servant servant, *p = 0; component_info = e_component_registry_peek_info(shell->priv->component_registry, ECR_FIELD_SCHEMA, schema); - if (component_info == NULL) { - show = TRUE; + if (component_info == NULL) component_info = e_component_registry_peek_info(shell->priv->component_registry, ECR_FIELD_ALIAS, schema); - } if (component_info == NULL) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_UnsupportedSchema, NULL); return; } - if (show) { - GtkWidget *shell_window; - - shell_window = (GtkWidget *)e_shell_create_window (shell, component_info->id, NULL); - if (shell_window == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_ComponentNotFound, NULL); - return; - } + shell_window = (GtkWidget *)e_shell_create_window (shell, component_info->id, NULL); + if (shell_window == NULL) { + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_ComponentNotFound, NULL); + return; } - + GNOME_Evolution_Component_handleURI (component_info->iface, uri, ev); /* not an error not to implement it */ if (ev->_id != NULL && strcmp(ev->_id, ex_CORBA_NO_IMPLEMENT) == 0) -- cgit v1.2.3