put the focus grab separate, the user might clear the tree in the focus-in
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus grab separate, the user might clear the tree in the focus-in callback. (Fixes #113086, testcase from Felipe Heidrich).
This commit is contained in:
committed by
Kristian Rietveld
parent
2ab81b8093
commit
d4a787f2e1
@@ -1,3 +1,9 @@
|
||||
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
|
||||
grab separate, the user might clear the tree in the focus-in
|
||||
callback. (Fixes #113086, testcase from Felipe Heidrich).
|
||||
|
||||
Thu May 29 18:06:26 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
|
||||
grab separate, the user might clear the tree in the focus-in
|
||||
callback. (Fixes #113086, testcase from Felipe Heidrich).
|
||||
|
||||
Thu May 29 18:06:26 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
|
||||
grab separate, the user might clear the tree in the focus-in
|
||||
callback. (Fixes #113086, testcase from Felipe Heidrich).
|
||||
|
||||
Thu May 29 18:06:26 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
|
||||
grab separate, the user might clear the tree in the focus-in
|
||||
callback. (Fixes #113086, testcase from Felipe Heidrich).
|
||||
|
||||
Thu May 29 18:06:26 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Thu May 29 18:23:01 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
|
||||
grab separate, the user might clear the tree in the focus-in
|
||||
callback. (Fixes #113086, testcase from Felipe Heidrich).
|
||||
|
||||
Thu May 29 18:06:26 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
|
||||
|
||||
@@ -1811,6 +1811,18 @@ gtk_tree_view_button_press (GtkWidget *widget,
|
||||
"horizontal_separator", &horizontal_separator,
|
||||
NULL);
|
||||
|
||||
/* put this separate, because the user might remove the latest
|
||||
* treeview node in the focus-in-event callback. If so, the code
|
||||
* flow won't enter the second if.
|
||||
*/
|
||||
if (event->window == tree_view->priv->bin_window &&
|
||||
tree_view->priv->tree != NULL)
|
||||
{
|
||||
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||
gtk_widget_grab_focus (widget);
|
||||
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
|
||||
}
|
||||
|
||||
if (event->window == tree_view->priv->bin_window &&
|
||||
tree_view->priv->tree != NULL)
|
||||
{
|
||||
@@ -1828,10 +1840,6 @@ gtk_tree_view_button_press (GtkWidget *widget,
|
||||
gint column_handled_click = FALSE;
|
||||
gboolean emit_row_activated = FALSE;
|
||||
|
||||
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||
gtk_widget_grab_focus (widget);
|
||||
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
|
||||
|
||||
/* are we in an arrow? */
|
||||
if (tree_view->priv->prelight_node &&
|
||||
GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_ARROW_PRELIT))
|
||||
|
||||
Reference in New Issue
Block a user