[evolution-patches] patch for review of bug 42128



Hi all,

The bug lead to ctrl+c/v on composer  suject do not work.
see  http://bugzilla.ximian.com/show_bug.cgi?id=42128


Regards
York
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.391
diff -u -r1.391 e-msg-composer.c
--- e-msg-composer.c	29 Apr 2003 16:55:52 -0000	1.391
+++ e-msg-composer.c	9 May 2003 07:27:57 -0000
@@ -2808,12 +2808,25 @@
 static int
 composer_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 {
+        EMsgComposer *composer = user_data;
+        gboolean result;
+
 	if (event->keyval == GDK_Escape) {
 		do_exit (E_MSG_COMPOSER (widget));
 		
 		g_signal_stop_emission_by_name (widget, "key-press-event");
 		return TRUE; /* Handled.  */
 	}
+
+        if (GTK_IS_ENTRY (composer->focused_entry)) {
+                                                                                
+                g_signal_emit_by_name(composer->focused_entry,
+                                      "key_press_event", event, &result);
+                if (result) {
+                    g_signal_stop_emission_by_name (widget, "key_press_event");
+                    return TRUE; /* Handled.  */
+                }
+        }
 	
 	return FALSE; /* Not handled. */
 }
@@ -2875,7 +2888,7 @@
 	
 	g_signal_connect (composer, "key-press-event",
 			  G_CALLBACK (composer_key_pressed),
-			  NULL);
+			  composer);
 	g_signal_connect (composer, "destroy",
 			  G_CALLBACK (msg_composer_destroy_notify),
 			  NULL);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.535
diff -u -r1.535 ChangeLog
--- ChangeLog	29 Apr 2003 16:55:52 -0000	1.535
+++ ChangeLog	9 May 2003 12:15:29 -0000
@@ -1,3 +1,9 @@
+2003-05-09  Yuedong Du <yuedong du sun com>
+
+	* e-msg-composer.c(composer_key_pressed): if focus in subject,
+	let the gtk widget handle key_pressed event first.
+	fix bug #42128
+
 2003-04-28  Jeffrey Stedfast  <fejj ximian com>
 
 	* e-msg-composer.c (autosave_manager_query_load_orphans): Change


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