diff options
author | Havoc Pennington <hp@pobox.com> | 2001-10-08 05:01:09 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-10-08 05:01:09 +0000 |
commit | d85ec9a0624b140b42dfb7740bfc155e6d633463 (patch) | |
tree | 333645bf487678eecefa7eb6f3b27f6b1d82c244 /gtk/gtktreeselection.c | |
parent | b6c2df953dc50f009c8e15a77c35414940a106cc (diff) | |
download | gtk+-d85ec9a0624b140b42dfb7740bfc155e6d633463.tar.gz |
remove unused enum
2001-10-08 Havoc Pennington <hp@pobox.com>
* demos/gtk-demo/stock_browser.c: remove unused enum
* gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
pass the current selection state of the node in to the user
selection func
Diffstat (limited to 'gtk/gtktreeselection.c')
-rw-r--r-- | gtk/gtktreeselection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index a524400068..cbf2c43a5b 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -245,6 +245,8 @@ gtk_tree_selection_get_mode (GtkTreeSelection *selection) * * Sets the selection function. If set, this function is called before any node * is selected or unselected, giving some control over which nodes are selected. + * The select function should return %TRUE if the state of the node may be toggled, + * and %FALSE if the state of the node should be left unchanged. **/ void gtk_tree_selection_set_select_function (GtkTreeSelection *selection, @@ -1010,7 +1012,9 @@ gtk_tree_selection_real_select_node (GtkTreeSelection *selection, path = _gtk_tree_view_find_path (selection->tree_view, tree, node); if (selection->user_func) { - if ((*selection->user_func) (selection, selection->tree_view->priv->model, path, selection->user_data)) + if ((*selection->user_func) (selection, selection->tree_view->priv->model, path, + GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED), + selection->user_data)) selected = TRUE; } else |