[evolution-patches] [Mailer][Widgets]Patches for bug 327035



Hi,

In e_tree.c:e_tree_setup_header, the header canvas is not allowed to
foucs on. But in file e-table-header-item.c, it call
"e_canvas_item_grab_focus" to grab focus. This leads to evolution crash.

The patch checks the widget before this grabbing operation.

Please review it.


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/table/ChangeLog,v
retrieving revision 1.22
diff -u -r1.22 ChangeLog
--- ChangeLog	2 Mar 2006 05:39:57 -0000	1.22
+++ ChangeLog	6 Mar 2006 11:17:26 -0000
@@ -1,3 +1,9 @@
+2006-03-06  Jeff Cai <jeff cai sun com>
+
+	** Fixes bug #327035
+	* e-table-header-item.c: (ethi_event):
+	Grab focus only from widgets which can have focus on.
+
 2006-03-02  Srinivasa Ragavan  <sragavan novell com>
 
 	** Fixes bug #328283
Index: e-table-header-item.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/table/e-table-header-item.c,v
retrieving revision 1.133
diff -u -r1.133 e-table-header-item.c
--- e-table-header-item.c	30 Jan 2006 12:28:20 -0000	1.133
+++ e-table-header-item.c	6 Mar 2006 11:17:26 -0000
@@ -1678,7 +1678,8 @@
 				ethi->maybe_drag = TRUE;
 				is_pointer_on_division (ethi, x, &start, &col);
 				ethi->selected_col = col;
-				e_canvas_item_grab_focus (item, TRUE);
+				if (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas)))
+					e_canvas_item_grab_focus (item, TRUE);
 			} else if (e->button.button == 3){
 				ethi_header_context_menu (ethi, &e->button);
 			} else


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