diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-28 12:50:02 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-28 12:50:02 +0800 |
commit | 268c7dbe4254f54f55d2bed8a9c740ee89dd9aed (patch) | |
tree | 8e0d46102300870ed29c743fa29cff4522044dba /shell/e-shell.c | |
parent | 764cfb5a6ba195958b1b3b814fdb584d6a5ff63b (diff) | |
download | gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar.gz gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar.bz2 gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar.lz gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar.xz gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.tar.zst gsoc2013-evolution-268c7dbe4254f54f55d2bed8a9c740ee89dd9aed.zip |
Make the shell to be able to display URIs that the user specified on
the command-line.
svn path=/trunk/; revision=10554
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 30d48430a3..167e718ed6 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -238,16 +238,17 @@ impl_Shell_handleURI (PortableServer_Servant servant, const CORBA_char *uri, CORBA_Environment *ev) { + EvolutionShellComponentClient *schema_handler; EShell *shell; EShellPrivate *priv; const char *colon_p; - const char *schema; + char *schema; shell = E_SHELL (bonobo_object_from_servant (servant)); priv = shell->priv; if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) { - GNOME_Evolution_Shell_createNewView (servant, uri, ev); + GNOME_Evolution_Shell_createNewView (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), uri, ev); return; } @@ -261,6 +262,21 @@ impl_Shell_handleURI (PortableServer_Servant servant, } schema = g_strndup (uri, colon_p - uri); + schema_handler = e_uri_schema_registry_get_handler_for_schema (priv->uri_schema_registry, schema); + g_free (schema); + + if (schema_handler == NULL) { + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_GNOME_Evolution_Shell_UnsupportedSchema, NULL); + return; + } + + if (! evolution_shell_component_client_handle_external_uri (schema_handler, uri)) { + /* FIXME: Just a wild guess here. */ + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_GNOME_Evolution_Shell_NotFound, NULL); + return; + } } static void @@ -697,6 +713,7 @@ class_init (EShellClass *klass) epv = & klass->epv; epv->getComponentByType = impl_Shell_getComponentByType; epv->createNewView = impl_Shell_createNewView; + epv->handleURI = impl_Shell_handleURI; epv->selectUserFolder = impl_Shell_selectUserFolder; epv->getLocalStorage = impl_Shell_getLocalStorage; epv->createStorageSetView = impl_Shell_createStorageSetView; @@ -717,6 +734,7 @@ init (EShell *shell) priv->shortcuts = NULL; priv->component_registry = NULL; priv->folder_type_registry = NULL; + priv->uri_schema_registry = NULL; priv->corba_storage_registry = NULL; priv->activity_handler = NULL; priv->offline_handler = NULL; |