Commit c49351c8 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

Added a "cursor_changed" signal, #62850.

Wed Oct 31 14:05:17 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
	"cursor_changed" signal, #62850.
parent 67a1d073
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
Wed Oct 31 14:05:17 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_class_init): Added a
"cursor_changed" signal, #62850.
2001-10-31 Matt Wilson <msw@redhat.com>
* gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after
......
......@@ -96,6 +96,7 @@ enum
ROW_EXPANDED,
ROW_COLLAPSED,
COLUMNS_CHANGED,
CURSOR_CHANGED,
MOVE_CURSOR,
SELECT_ALL,
SELECT_CURSOR_ROW,
......@@ -691,6 +692,15 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
gtk_marshal_NONE__NONE,
G_TYPE_NONE, 0);
tree_view_signals[CURSOR_CHANGED] =
g_signal_new ("cursor_changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeViewClass, cursor_changed),
NULL, NULL,
gtk_marshal_NONE__NONE,
G_TYPE_NONE, 0);
tree_view_signals[MOVE_CURSOR] =
g_signal_new ("move_cursor",
G_TYPE_FROM_CLASS (object_class),
......@@ -7989,23 +7999,25 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
gtk_tree_path_free (cursor_path);
}
gtk_tree_row_reference_free (tree_view->priv->cursor);
gtk_tree_row_reference_free (tree_view->priv->cursor);
gtk_get_current_event_state (&state);
tree_view->priv->cursor = gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view),
tree_view->priv->model,
path);
_gtk_tree_view_find_node (tree_view, path, &tree, &node);
if (tree == NULL)
return;
if (tree != NULL)
{
if (clear_and_select && !((state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK))
_gtk_tree_selection_internal_select_node (tree_view->priv->selection,
node, tree, path,
state);
gtk_tree_view_clamp_node_visible (tree_view, tree, node);
gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
}
if (clear_and_select && !((state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK))
_gtk_tree_selection_internal_select_node (tree_view->priv->selection,
node, tree, path,
state);
gtk_tree_view_clamp_node_visible (tree_view, tree, node);
gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
g_signal_emit (G_OBJECT (tree_view), tree_view_signals[CURSOR_CHANGED], 0);
}
/**
......
......@@ -84,6 +84,7 @@ struct _GtkTreeViewClass
GtkTreeIter *iter,
GtkTreePath *path);
void (* columns_changed) (GtkTreeView *tree_view);
void (* cursor_changed) (GtkTreeView *tree_view);
/* Key Binding signals */
void (* move_cursor) (GtkTreeView *tree_view,
......
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