Commit 1e1b214a authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

finally get the right behavior.

Sun Mar 10 21:04:30 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
	right behavior.
parent 9521c723
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
right behavior.
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
......
......@@ -1773,55 +1773,57 @@ gtk_tree_view_button_press (GtkWidget *widget,
if (column == NULL)
return FALSE;
/* decide to edit */
/* decide if we edit */
if (event->type == GDK_BUTTON_PRESS &&
!(event->state & gtk_accelerator_get_default_mod_mask ()))
!(event->state & gtk_accelerator_get_default_mod_mask ()) &&
tree_view->priv->cursor)
{
GtkCellEditable *cell_editable = NULL;
/* FIXME: get the right flags */
guint flags = 0;
GtkTreeIter iter;
GtkTreePath *cursor = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
gtk_tree_model_get_iter (tree_view->priv->model, &iter, path);
gtk_tree_view_column_cell_set_cell_data (column,
tree_view->priv->model,
&iter,
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT),
node->children?TRUE:FALSE);
if (cursor && !gtk_tree_path_compare (cursor, path))
{
GtkCellEditable *cell_editable = NULL;
path_string = gtk_tree_path_to_string (path);
/* FIXME: get the right flags */
guint flags = 0;
GtkTreeIter iter;
if (_gtk_tree_view_column_cell_event (column,
&cell_editable,
(GdkEvent *)event,
path_string,
&background_area,
&cell_area, flags) &&
tree_view->priv->cursor)
{
GtkTreePath *cursor = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
gtk_tree_model_get_iter (tree_view->priv->model, &iter, path);
gtk_tree_view_column_cell_set_cell_data (column,
tree_view->priv->model,
&iter,
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT),
node->children?TRUE:FALSE);
if (cell_editable != NULL && cursor &&
!gtk_tree_path_compare (cursor, path))
{
gtk_tree_view_real_start_editing (tree_view,
column,
path,
cell_editable,
&cell_area,
path_string = gtk_tree_path_to_string (path);
if (_gtk_tree_view_column_cell_event (column,
&cell_editable,
(GdkEvent *)event,
flags);
gtk_tree_path_free (path);
gtk_tree_path_free (cursor);
return TRUE;
path_string,
&background_area,
&cell_area, flags))
{
if (cell_editable != NULL)
{
gtk_tree_view_real_start_editing (tree_view,
column,
path,
cell_editable,
&cell_area,
(GdkEvent *)event,
flags);
gtk_tree_path_free (path);
gtk_tree_path_free (cursor);
return TRUE;
}
column_handled_click = TRUE;
}
if (cursor)
gtk_tree_path_free (cursor);
column_handled_click = TRUE;
g_free (path_string);
}
g_free (path_string);
if (cursor)
gtk_tree_path_free (cursor);
}
/* select */
pre_val = tree_view->priv->vadjustment->value;
......
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