[evolution-patches] Pl. discard the earlier patch: evolution/mail patch for 40917



Hi All,
	Sorry I sent the wrong one. This is the modified one.
Thanks,
Suresh
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2761.2.26
diff -u -r1.2761.2.26 ChangeLog
--- ChangeLog	25 Sep 2003 16:09:12 -0000	1.2761.2.26
+++ ChangeLog	27 Sep 2003 16:32:46 -0000
@@ -1,3 +1,24 @@
+2003-09-27  Suresh Chandrasekharan <suresh chandrasekharan sun com>
+
+	* mail-config-druid.c: Fix for 40917 "Backspace shouldn't highlight 
+	the whole remaining string in Setup Assistant". 
+
+	Removed repeated focussing per keystroke for the following functions
+
+	(identity_changed)
+	(source_changed)
+	(transport_changed)
+	(management_changed)
+
+	(identity_prepare): Removed the initial highlighting for Full Name
+
+	(config_wizard_new): Added g_signal_connect_after "grab_focus" 
+	callbacks for all the editable fields of the config wizard to
+	undo the undesirable highlighting happening in gtk_entry_grab_focus.
+
+	(grab_focus_cb): Added this callback which gets activated after
+	gtk_entry_grab_focus for unhighlighting the text.
+
 2003-09-25  Rodney Dawes  <dobey ximian com>
 
 	* mail-send-recv.c: Make the dialog more HIG-compliant by fixing
Index: mail-config-druid.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config-druid.c,v
retrieving revision 1.100
diff -u -r1.100 mail-config-druid.c
--- mail-config-druid.c	16 Apr 2003 17:03:11 -0000	1.100
+++ mail-config-druid.c	27 Sep 2003 16:32:47 -0000
@@ -125,9 +125,6 @@
 	next_sensitive = mail_account_gui_identity_complete (mcw->gui, &incomplete);
 	
 	config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-	
-	if (!next_sensitive)
-		gtk_widget_grab_focus (incomplete);
 }
 
 static void
@@ -141,7 +138,6 @@
 	if (!name) {
 		name = g_get_real_name ();
 		gtk_entry_set_text (mcw->gui->full_name, name ? name : "");
-		gtk_editable_select_region (GTK_EDITABLE (mcw->gui->full_name), 0, -1);
 	}
 	gtk_widget_grab_focus (GTK_WIDGET (mcw->gui->full_name));
 	identity_changed (NULL, mcw);
@@ -193,9 +189,6 @@
 	next_sensitive = mail_account_gui_source_complete (mcw->gui, &incomplete);
 	
 	config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-	
-	if (!next_sensitive)
-		gtk_widget_grab_focus (incomplete);
 }
 
 static void
@@ -271,9 +264,6 @@
 	next_sensitive = mail_account_gui_transport_complete (mcw->gui, &incomplete);
 	
 	config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-	
-	if (!next_sensitive)
-		gtk_widget_grab_focus (incomplete);
 }
 
 static void
@@ -346,6 +336,16 @@
 }
 
 static void
+grab_focus_cb (GtkWidget *widget, gpointer data)
+{
+	GtkEntry *entry = GTK_ENTRY (widget);
+	g_return_if_fail (GTK_IS_ENTRY (entry));
+
+	gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);
+	
+}
+
+static void
 management_changed (GtkWidget *widget, gpointer data)
 {
 	MailConfigWizard *mcw = data;
@@ -354,8 +354,6 @@
 		return;
 	
 	management_check (mcw);
-	
-	gtk_widget_grab_focus (GTK_WIDGET (mcw->gui->account_name));
 }
 
 static void
@@ -504,6 +502,27 @@
 	g_object_unref (account);
 	
 	/* Set up gui */
+	g_signal_connect_after (mcw->gui->account_name, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->full_name, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->email_address, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->reply_to, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->organization, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->source.username, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->source.hostname, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->source.path, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->transport.hostname, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+	g_signal_connect_after (mcw->gui->transport.username, "grab_focus",
+			  G_CALLBACK (grab_focus_cb), mcw);
+
 	g_signal_connect (mcw->gui->account_name, "changed",
 			  G_CALLBACK (management_changed), mcw);
 	g_signal_connect (mcw->gui->full_name, "changed",


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