aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-01 12:16:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-01 12:16:26 +0800
commite0862e69a791b6eae6b35e6d93c28fdd2c92eee1 (patch)
tree9c14527b5d17ccc489a9edbd22b0cae2807d05b4 /shell/e-shell.c
parentb90fd7e8a1ed8939be514ce998f2e95b0f42bd9f (diff)
downloadgsoc2013-evolution-e0862e69a791b6eae6b35e6d93c28fdd2c92eee1.tar.gz
gsoc2013-evolution-e0862e69a791b6eae6b35e6d93c28fdd2c92eee1.tar.zst
gsoc2013-evolution-e0862e69a791b6eae6b35e6d93c28fdd2c92eee1.zip
** See #58827.
2004-05-27 Not Zed <NotZed@Ximian.com> ** See #58827. * e-shell-window.c (switch_view): api change * e-shell.c (impl_Shell_handleURI): Fixed for api change. (impl_Shell_handleURI): check the component alias for an alternate uri schema path. 'quick hack' for activating components from command line. This may, or may not, continue to function. * e-component-registry.c (e_component_registry_peek_info): added an id for search type. (e_component_registry_peek_info_for_uri_schema): ^ makes this redundant, removed. (e_component_registry_activate): fixed for api change. svn path=/trunk/; revision=26137
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 6c608a24ab..825224f996 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -241,24 +241,33 @@ impl_Shell_handleURI (PortableServer_Servant servant,
{
EShell *shell = E_SHELL (bonobo_object_from_servant (servant));
EComponentInfo *component_info;
- const char *colon_p;
- char *schema;
+ char *schema, *p;
+ int show = FALSE;
- colon_p = strchr (uri, ':');
- if (colon_p == NULL)
- schema = g_strdup (uri);
- else
- schema = g_strndup (uri, colon_p - uri);
+ schema = g_alloca(strlen(uri)+1);
+ strcpy(schema, uri);
+ p = strchr(schema, ':');
+ if (p)
+ *p = 0;
- component_info = e_component_registry_peek_info_for_uri_schema (shell->priv->component_registry, schema);
- g_free (schema);
+ component_info = e_component_registry_peek_info(shell->priv->component_registry, ECR_FIELD_SCHEMA, schema);
+ if (component_info == NULL) {
+ show = TRUE;
+ 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 && shell->priv->windows)
+ e_shell_window_switch_to_component((EShellWindow *)shell->priv->windows->data, component_info->id);
+
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)
+ memset(ev, 0, sizeof(*ev));
}
static void