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



Thanks NotZed ... I have attached an updated patch now. There was a bug in the previous patch as Dan pointed out [ i was not retriving the X Id of the window properly ]. Please let me know if this is fine.

On Tue, 2004-05-25 at 18:36 +0800, Not Zed wrote:
On Tue, 2004-05-25 at 15:13 +0530, Sarfraaz Ahmed wrote:
Hi NotZed,

I tried implementing the CreateControls to hookup the control window, but I didnt anticipate one particular scenario.Since, the CreateControls gets called only when the exchange button is clicked on, i am not able to prompt for password, in the instance when the user clicks on his mail account in the mailer view, before clicking the exchange button. The user is now supposed to click on exchange button, then the exchange account name, enter the password and then go back to the mailer component to read the mails. This behaviour doesnt look good, since its the mailer component that would usually be active and not the exchange view. I tried adding my patch for set_interactive, and it solves this issue.

Please let me know your thoughts on this.

setInteractive sounds good, go for it.  I don't know why I bothered arguing about this in the end, it just seemed a good idea at the time.  I guess I wanted to avoid having to do any more work in all of the other components.  At least the mail component should implement set interactive (although for the mailer its a whole one line of code).

There is also a bug related to the password dialogue coming up ontop of the "this is a test release" dialogue, and hopefully setInteracive will fix that issue too.

Michael

Michael Zucchi <notzed ximian com>

Ximian Evolution and Free Software Developer


Novell, Inc.
            Thanks
                                        -- Sarfraaz Ahmed <asarfraaz novell com>
Index: e-shell.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.247
diff -u -r1.247 e-shell.c
--- e-shell.c	21 May 2004 09:12:44 -0000	1.247
+++ e-shell.c	26 May 2004 09:31:06 -0000
@@ -151,7 +151,41 @@
 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);
+	}
 }
 
 


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