aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-06-02 12:28:11 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-06-02 12:28:11 +0800
commitdf95abe3008bfdf1385ec04485d796514f15cfd2 (patch)
tree912fd0a33e4f300c87c89cc8177030b9988ae26b /shell/e-shell.c
parent91c107fa85ea3bcba01109a5e2bee5c737beea02 (diff)
downloadgsoc2013-evolution-df95abe3008bfdf1385ec04485d796514f15cfd2.tar.gz
gsoc2013-evolution-df95abe3008bfdf1385ec04485d796514f15cfd2.tar.zst
gsoc2013-evolution-df95abe3008bfdf1385ec04485d796514f15cfd2.zip
BonoboObject wrapper for Evolution::Component interface. Abstract, doesn't
2005-06-02 Not Zed <NotZed@Ximian.com> * evolution-component.c: BonoboObject wrapper for Evolution::Component interface. Abstract, doesn't implement methods. * Evolution-Shell.idl: add a method to find a component by component alias. * e-shell.c (impl_Shell_findComponent): & implement it svn path=/trunk/; revision=29443
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 44b05d0a2a..3c229f9e11 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -305,6 +305,30 @@ impl_Shell_setLineStatus (PortableServer_Servant servant,
e_shell_go_offline (shell, NULL);
}
+static GNOME_Evolution_Component
+impl_Shell_findComponent(PortableServer_Servant servant,
+ const CORBA_string id,
+ CORBA_Environment *ev)
+{
+ EShell *shell;
+ EComponentInfo *ci;
+
+ if (raise_exception_if_not_ready (servant, ev))
+ return CORBA_OBJECT_NIL;
+
+ shell = (EShell *)bonobo_object_from_servant (servant);
+ ci = e_component_registry_peek_info(shell->priv->component_registry, ECR_FIELD_ALIAS, id);
+ if (ci == NULL) {
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_ComponentNotFound, NULL);
+ return CORBA_OBJECT_NIL;
+ } else if (ci->iface == NULL) {
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_NotReady, NULL);
+ return CORBA_OBJECT_NIL;
+ } else {
+ return ci->iface;
+ }
+}
+
/* EShellWindow handling and bookkeeping. */
@@ -491,6 +515,7 @@ e_shell_class_init (EShellClass *klass)
epv->createNewWindow = impl_Shell_createNewWindow;
epv->handleURI = impl_Shell_handleURI;
epv->setLineStatus = impl_Shell_setLineStatus;
+ epv->findComponent = impl_Shell_findComponent;
}
static void