diff options
author | Sarfraaz Ahmed <asarfraaz@novell.com> | 2004-05-26 18:06:36 +0800 |
---|---|---|
committer | Ahmed Sarfraaz <sarfraaz@src.gnome.org> | 2004-05-26 18:06:36 +0800 |
commit | d45880ec8e75c015b7796bb9c8a4ee243677b738 (patch) | |
tree | 64df4c396cbf445ee32eb72d5cb8f1cdb89380f6 | |
parent | fd23815dd407a5988984da44a88ad0c41579c921 (diff) | |
download | gsoc2013-evolution-d45880ec8e75c015b7796bb9c8a4ee243677b738.tar.gz gsoc2013-evolution-d45880ec8e75c015b7796bb9c8a4ee243677b738.tar.zst gsoc2013-evolution-d45880ec8e75c015b7796bb9c8a4ee243677b738.zip |
Implemented. Sends the "interactive" message when the first window is
2004-05-26 Sarfraaz Ahmed <asarfraaz@novell.com>
* 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
-rw-r--r-- | shell/ChangeLog | 5 | ||||
-rw-r--r-- | shell/e-shell.c | 36 |
2 files changed, 40 insertions, 1 deletions
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 <asarfraaz@novell.com> + + * 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 <NotZed@Ximian.com> * 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); + } } |