gtk+ r21789 - in branches/gtk-2-14: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21789 - in branches/gtk-2-14: . gtk
- Date: Sat, 15 Nov 2008 00:33:26 +0000 (UTC)
Author: matthiasc
Date: Sat Nov 15 00:33:26 2008
New Revision: 21789
URL: http://svn.gnome.org/viewvc/gtk+?rev=21789&view=rev
Log:
Bug 541391 â Unfocussable Treeview swallows focus
* gtk/gtktreeview.c (grab_focus_and_unset_draw_keyfocus),
(gtk_tree_view_focus): Honor GTK_WIDGET_CAN_FOCUS properly
Modified:
branches/gtk-2-14/ChangeLog
branches/gtk-2-14/gtk/gtktreeview.c
Modified: branches/gtk-2-14/gtk/gtktreeview.c
==============================================================================
--- branches/gtk-2-14/gtk/gtktreeview.c (original)
+++ branches/gtk-2-14/gtk/gtktreeview.c Sat Nov 15 00:33:26 2008
@@ -2461,7 +2461,7 @@
static void
grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view)
{
- if (!GTK_WIDGET_HAS_FOCUS (tree_view))
+ if (GTK_WIDGET_CAN_FOCUS (tree_view) && !GTK_WIDGET_HAS_FOCUS (tree_view))
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
}
@@ -7841,7 +7841,8 @@
GtkContainer *container = GTK_CONTAINER (widget);
GtkWidget *focus_child;
- if (!GTK_WIDGET_IS_SENSITIVE (container))
+ if (!GTK_WIDGET_IS_SENSITIVE (container) ||
+ !GTK_WIDGET_CAN_FOCUS (widget))
return FALSE;
focus_child = container->focus_child;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]