[evolution-patches] [shell] Patch for #56484



Hi,

This patch fixes the evo-exchange bug #56484.

This patch includes the code for implementing the set_interactive call in e-shell.c. This function sends the "interactive" message to all the shell components.

Please review this and let me know if this is fine to commit.

            Thanks
                                        -- Sarfraaz Ahmed <asarfraaz novell com>
Index: e-shell.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.246
diff -u -r1.246 e-shell.c
--- e-shell.c	12 May 2004 03:33:51 -0000	1.246
+++ e-shell.c	19 May 2004 07:17:09 -0000
@@ -151,7 +151,41 @@
 set_interactive (EShell *shell,
 		 gboolean interactive)
 {
-	/* FIXME TODO */
+	GSList *component_list;
+	GSList *p;
+	GList *first_element;
+	int num_windows;
+	EShellWindow *window;
+
+	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);
+	window = E_SHELL_WINDOW (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 (BONOBO_WINDOW (window)), &ev);
+
+		/* Ignore errors, the components can decide to not implement
+		   this interface. */
+		
+		CORBA_exception_free (&ev);
+	}
 }
 
 
@@ -716,7 +750,6 @@
 	for (p = component_infos; success && p != NULL; p = p->next) {
 		const EComponentInfo *info = p->data;
 		CORBA_Environment ev;
-		gboolean component_upgraded;
 
 		CORBA_exception_init (&ev);
 		


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]