[evolution-patches] RESEND: Head gal patch for # 56578



Hi All,
	Thanks Chris for the comments.
	
	On another look, seemed like patch will be better if the unnecessary 
code is removed.

Regards,
Suresh
Index: e-table/ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.925
diff -u -r1.925 ChangeLog
--- e-table/ChangeLog	10 Mar 2004 06:28:46 -0000	1.925
+++ e-table/ChangeLog	9 Apr 2004 21:27:07 -0000
@@ -1,3 +1,12 @@
+2004-04-06  Suresh Chandrasekharan <suresh chandrasekharan sun com>
+
+	Fix for 56578: in preedit mode, 'Enter' causes cursor to reset to zero 
+	position.
+
+	* e-cell-text.c: (ect_event) Remove the unneeded 
+	e_table_item_leave_edit_ call when pressing Enter. In preedit mode
+	this is not needed and in commit mode, the codepath goes elsewhere.
+
 2004-03-10  Hao Sheng  <hao sheng sun com>
 
 	Fixes #55198
Index: e-table/e-cell-text.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-cell-text.c,v
retrieving revision 1.135
diff -u -r1.135 e-cell-text.c
--- e-table/e-cell-text.c	27 Jan 2004 15:18:08 -0000	1.135
+++ e-table/e-cell-text.c	9 Apr 2004 21:27:07 -0000
@@ -980,31 +980,27 @@
 		}		
 		if (edit_display) {
 			GdkEventKey key = event->key;
-			if (key.keyval == GDK_KP_Enter || key.keyval == GDK_Return){
-				e_table_item_leave_edit_ (text_view->cell_view.e_table_item_view);
-			} else {
-				e_tep_event.key.time = key.time;
-				e_tep_event.key.state = key.state;
-				e_tep_event.key.keyval = key.keyval;
+			e_tep_event.key.time = key.time;
+			e_tep_event.key.state = key.state;
+			e_tep_event.key.keyval = key.keyval;
 
-				/* This is probably ugly hack, but we have to handle UTF-8 input somehow */
+			/* This is probably ugly hack, but we have to handle UTF-8 input somehow */
 #if 0
-				e_tep_event.key.length = key.length;
-				e_tep_event.key.string = key.string;
+			e_tep_event.key.length = key.length;
+			e_tep_event.key.string = key.string;
 #else
-				e_tep_event.key.string = e_utf8_from_gtk_event_key (canvas, key.keyval, key.string);
-				if (e_tep_event.key.string != NULL) {
-					e_tep_event.key.length = strlen (e_tep_event.key.string);
-				} else {
-					e_tep_event.key.length = 0;
-				}
-#endif
-				_get_tep (edit);
-				return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
-				if (e_tep_event.key.string) 
-					g_free (e_tep_event.key.string);
-				break;
+			e_tep_event.key.string = e_utf8_from_gtk_event_key (canvas, key.keyval, key.string);
+			if (e_tep_event.key.string != NULL) {
+				e_tep_event.key.length = strlen (e_tep_event.key.string);
+			} else {
+				e_tep_event.key.length = 0;
 			}
+#endif
+			_get_tep (edit);
+			return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
+			if (e_tep_event.key.string) 
+				g_free (e_tep_event.key.string);
+			break;
 		}
 
 		break;


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