GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 3263de0e authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

move edit ifs above _set_cursor code, don't collapse/expand row on double

Sat Mar  2 03:49:31 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
        ifs above _set_cursor code, don't collapse/expand row on double
        click, only activate (#63269)
        (validate_visible_area): add two missing lines (#73161, #73162)
parent d69b02ec
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
Sat Mar 2 03:49:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): move edit
ifs above _set_cursor code, don't collapse/expand row on double
click, only activate (#63269)
(validate_visible_area): add two missing lines (#73161, #73162)
Sun Mar 3 12:13:56 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix typo where pangoxft was being
......
......@@ -1789,34 +1789,7 @@ gtk_tree_view_button_press (GtkWidget *widget,
if (column == NULL)
return FALSE;
pre_val = tree_view->priv->vadjustment->value;
tree_view->priv->focus_column = column;
if (event->state & GDK_CONTROL_MASK)
{
gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
gtk_tree_view_real_toggle_cursor_row (tree_view);
}
else if (event->state & GDK_SHIFT_MASK)
{
gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
gtk_tree_view_real_select_cursor_row (tree_view, FALSE);
}
else
{
gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
}
/* the treeview may have been scrolled because of _set_cursor,
* correct here
*/
aft_val = tree_view->priv->vadjustment->value;
dval = pre_val - aft_val;
cell_area.y += dval;
background_area.y += dval;
/* decide to edit */
if (event->type == GDK_BUTTON_PRESS &&
!(event->state & gtk_accelerator_get_default_mod_mask ()))
{
......@@ -1841,7 +1814,8 @@ gtk_tree_view_button_press (GtkWidget *widget,
&background_area,
&cell_area, flags))
{
if (cell_editable != NULL)
if (cell_editable != NULL &&
gtk_tree_selection_iter_is_selected (gtk_tree_view_get_selection (tree_view), &iter))
{
gtk_tree_view_real_start_editing (tree_view,
column,
......@@ -1850,13 +1824,43 @@ gtk_tree_view_button_press (GtkWidget *widget,
&cell_area,
(GdkEvent *)event,
flags);
gtk_tree_path_free (path);
return TRUE;
}
column_handled_click = TRUE;
}
g_free (path_string);
}
/* select */
pre_val = tree_view->priv->vadjustment->value;
tree_view->priv->focus_column = column;
if (event->state & GDK_CONTROL_MASK)
{
gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
gtk_tree_view_real_toggle_cursor_row (tree_view);
}
else if (event->state & GDK_SHIFT_MASK)
{
gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
gtk_tree_view_real_select_cursor_row (tree_view, FALSE);
}
else
{
gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
}
/* the treeview may have been scrolled because of _set_cursor,
* correct here
*/
aft_val = tree_view->priv->vadjustment->value;
dval = pre_val - aft_val;
cell_area.y += dval;
background_area.y += dval;
/* Save press to possibly begin a drag
*/
if (!column_handled_click &&
......@@ -1875,20 +1879,7 @@ gtk_tree_view_button_press (GtkWidget *widget,
if (lsc)
{
if (!gtk_tree_path_compare (lsc, path))
{
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT))
{
if (node->children == NULL)
gtk_tree_view_real_expand_row (tree_view, path,
tree, node, FALSE,
TRUE);
else
gtk_tree_view_real_collapse_row (tree_view, path,
tree, node, TRUE);
}
gtk_tree_view_row_activated (tree_view, path, column);
}
gtk_tree_view_row_activated (tree_view, path, column);
gtk_tree_path_free (lsc);
}
......@@ -3790,6 +3781,7 @@ validate_visible_area (GtkTreeView *tree_view)
{
gboolean has_next = gtk_tree_model_iter_next (tree_view->priv->model, &iter);
done = TRUE;
gtk_tree_path_next (path);
/* Sanity Check! */
TREE_VIEW_INTERNAL_ASSERT_VOID (has_next);
......@@ -3806,6 +3798,7 @@ validate_visible_area (GtkTreeView *tree_view)
has_parent = gtk_tree_model_iter_parent (tree_view->priv->model,
&iter,
&parent_iter);
gtk_tree_path_up (path);
/* Sanity check */
TREE_VIEW_INTERNAL_ASSERT_VOID (has_parent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment