From d45880ec8e75c015b7796bb9c8a4ee243677b738 Mon Sep 17 00:00:00 2001 From: Sarfraaz Ahmed Date: Wed, 26 May 2004 10:06:36 +0000 Subject: Implemented. Sends the "interactive" message when the first window is 2004-05-26 Sarfraaz Ahmed * e-shell.c (set_interactive): Implemented. Sends the "interactive" message when the first window is created to all the components. svn path=/trunk/; revision=26098 --- shell/ChangeLog | 5 +++++ shell/e-shell.c | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 50bce39db2..78b201c1a6 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2004-05-26 Sarfraaz Ahmed + + * e-shell.c (set_interactive): Implemented. Sends the "interactive" + message when the first window is created to all the components. + 2004-05-26 Not Zed * importer/evolution-importer.c diff --git a/shell/e-shell.c b/shell/e-shell.c index ecd780fe8a..6c608a24ab 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -151,7 +151,41 @@ static void set_interactive (EShell *shell, gboolean interactive) { - /* FIXME TODO */ + GSList *component_list; + GSList *p; + GList *first_element; + int num_windows; + GtkWidget *view; + + g_return_if_fail (E_IS_SHELL (shell)); + + shell->priv->is_interactive = interactive; + + num_windows = g_list_length (shell->priv->windows); + + /* We want to send the "interactive" message only when the first + window is created */ + if (num_windows != 1) + return; + + first_element = g_list_first (shell->priv->windows); + view = GTK_WIDGET (first_element->data); + + component_list = e_component_registry_peek_list (shell->priv->component_registry); + + for (p = component_list; p != NULL; p = p->next) { + EComponentInfo *info = p->data; + CORBA_Environment ev; + + CORBA_exception_init (&ev); + + GNOME_Evolution_Component_interactive (info->iface, interactive,GPOINTER_TO_INT (GDK_WINDOW_XWINDOW (view->window)), &ev); + + /* Ignore errors, the components can decide to not implement + this interface. */ + + CORBA_exception_free (&ev); + } } -- cgit