[evolution-patches] A gal patch to fix a evolution crash bug



Hi, JP

When we click some e-table's "click to add" button such as task's in evolution, if the focus wasn't
in the e-table before, the evolution may crash in our JDS.
I think we forgot to check whether the "click to add" has the focus in function table_canvas_focus_event_cb.
The attachment is a patch for this. Please help to review it.

regards,
Li
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.942
diff -u -r1.942 ChangeLog
--- ChangeLog	24 Nov 2004 10:34:55 -0000	1.942
+++ ChangeLog	24 Nov 2004 10:43:08 -0000
@@ -1,3 +1,8 @@
+2004-11-24  Harry Lu  <harry lu sun com>
+
+	* e-table.c: (table_canvas_focus_event_cb):
+	we need check whether the click_to_add should get the focus.
+
 2004-11-24  Li Yuan  <li yuan sun com>
 
 	* e-table.c: (e_table_get_cell_geometry):
Index: e-table.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-table.c,v
retrieving revision 1.232
diff -u -r1.232 e-table.c
--- e-table.c	24 Nov 2004 10:34:55 -0000	1.232
+++ e-table.c	24 Nov 2004 10:43:11 -0000
@@ -1126,6 +1126,14 @@
         	focus_first_etable_item (etable->group);
 	} else if (canvas->focused_item) {
 		ESelectionModel *selection = (ESelectionModel *)etable->selection;
+
+		/* check whether click_to_add already got the focus */
+		if (etable->click_to_add) {
+			GnomeCanvasItem *row = E_TABLE_CLICK_TO_ADD(etable->click_to_add)->row;
+			if (canvas->focused_item == row)
+				return TRUE;
+		}
+
 		if (e_selection_model_cursor_row (selection) == -1)
 			focus_first_etable_item (etable->group);
 	}


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