aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/Evolution-Shell.idl2
-rw-r--r--shell/e-shell.c15
3 files changed, 19 insertions, 5 deletions
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 <jpr@novell.com>
+
+ * 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 <jpr@novell.com>
* 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)