From 4722208003c3c4307530a18ce07303134a20bd15 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 10 Jan 2005 02:35:12 +0000 Subject: open a new window if we get a component id type url 2005-01-09 JP Rosevear * e-shell.c (impl_Shell_handleURI): open a new window if we get a component id type url * Evolution-Shell.idl: add ComponentNotFound exception svn path=/trunk/; revision=28302 --- shell/ChangeLog | 7 +++++++ shell/Evolution-Shell.idl | 2 +- shell/e-shell.c | 15 +++++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index e92e190c2b..7f72aa0f65 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2005-01-09 JP Rosevear + + * e-shell.c (impl_Shell_handleURI): open a new window if we get a + component id type url + + * Evolution-Shell.idl: add ComponentNotFound exception + 2005-01-06 JP Rosevear * Makefile.am: install schemas properly and add some uninstall diff --git a/shell/Evolution-Shell.idl b/shell/Evolution-Shell.idl index 5f2690afe4..ebd3f69719 100644 --- a/shell/Evolution-Shell.idl +++ b/shell/Evolution-Shell.idl @@ -39,7 +39,7 @@ module Evolution { * the message composer.) */ void handleURI (in string uri) - raises (NotReady, NotFound, UnsupportedSchema, InvalidURI, InternalError); + raises (NotReady, ComponentNotFound, NotFound, UnsupportedSchema, InvalidURI, InternalError); /** * setLineStatus: diff --git a/shell/e-shell.c b/shell/e-shell.c index 9ce18b1422..0b77ebcf9f 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -255,7 +255,7 @@ impl_Shell_handleURI (PortableServer_Servant servant, if (p) *p = 0; - component_info = e_component_registry_peek_info(shell->priv->component_registry, ECR_FIELD_SCHEMA, 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); @@ -266,9 +266,16 @@ impl_Shell_handleURI (PortableServer_Servant servant, return; } - if (show && shell->priv->windows) - e_shell_window_switch_to_component((EShellWindow *)shell->priv->windows->data, component_info->id); - + if (show) { + GtkWidget *shell_window; + + shell_window = 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