From 9521c7234421106551f8e8c5dd6320a08eceeab2 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Mon, 11 Mar 2002 00:28:47 +0000 Subject: [PATCH] compare path with cursor path and not with the selected iter in the Mon Mar 11 01:25:14 2002 Kristian Rietveld * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with cursor path and not with the selected iter in the 'decide to edit' check --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktreeview.c | 12 +++++++++--- 8 files changed, 51 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 30c63369a7..dcd76c5943 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Mon Mar 11 01:25:14 2002 Kristian Rietveld + + * gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with + cursor path and not with the selected iter in the 'decide to edit' + check + Fri Mar 8 14:45:00 2002 Owen Taylor * ======== Released GTK+-2.0 ======== diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 93a2148a26..94f02634cb 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1796,10 +1796,13 @@ gtk_tree_view_button_press (GtkWidget *widget, (GdkEvent *)event, path_string, &background_area, - &cell_area, flags)) + &cell_area, flags) && + tree_view->priv->cursor) { - if (cell_editable != NULL && - gtk_tree_selection_iter_is_selected (gtk_tree_view_get_selection (tree_view), &iter)) + GtkTreePath *cursor = gtk_tree_row_reference_get_path (tree_view->priv->cursor); + + if (cell_editable != NULL && cursor && + !gtk_tree_path_compare (cursor, path)) { gtk_tree_view_real_start_editing (tree_view, column, @@ -1809,8 +1812,11 @@ gtk_tree_view_button_press (GtkWidget *widget, (GdkEvent *)event, flags); gtk_tree_path_free (path); + gtk_tree_path_free (cursor); return TRUE; } + if (cursor) + gtk_tree_path_free (cursor); column_handled_click = TRUE; } g_free (path_string);