[Mailer][Widgets]Patches for bug 327035

jeff cai <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1141644386.3613.5.camel@commissionaire>
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.

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
patch327035 (text/x-patch, 1.2 KB)
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 <[email protected]>
+
+	** 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  <[email protected]>
 
 	** 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.