diff options
author | JP Rosevear <jpr@novell.com> | 2005-01-10 10:35:12 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2005-01-10 10:35:12 +0800 |
commit | 4722208003c3c4307530a18ce07303134a20bd15 (patch) | |
tree | 7f5d00eedf1b251c392d150a82fdcc60a86d7436 | |
parent | fc2814312a2a3c035f606a5bff2584552fba76c4 (diff) | |
download | gsoc2013-evolution-4722208003c3c4307530a18ce07303134a20bd15.tar.gz gsoc2013-evolution-4722208003c3c4307530a18ce07303134a20bd15.tar.zst gsoc2013-evolution-4722208003c3c4307530a18ce07303134a20bd15.zip |
open a new window if we get a component id type url
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
svn path=/trunk/; revision=28302
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/Evolution-Shell.idl | 2 | ||||
-rw-r--r-- | shell/e-shell.c | 15 |
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) |