summaryrefslogtreecommitdiff
path: root/tests/testtreeview.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-11-06 19:10:03 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-11-06 19:10:03 +0000
commit57479a86be71dfac361633838c8129267a278233 (patch)
treebea7db92dfed63a68122f5ad4a390b21bb68d3ad /tests/testtreeview.c
parent9bb17278c47fe892962494ab6e942c7a103c598f (diff)
downloadgtk+-57479a86be71dfac361633838c8129267a278233.tar.gz
Add row_draggable() vfunc, and wrapper function.
Mon Nov 5 22:34:29 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtktreednd.[ch] (struct _GtkTreeDragSourceIface): Add row_draggable() vfunc, and wrapper function. * gtk/gtktreednd.[ch] (struct _GtkTreeDragDestIface): Make row_drop_possible take a GtkSelectionData, rather than model/row pair. * gtk/gtktreestore.c gtk/gtkliststore.c: Update for new DND interfaces. * gtk/gtktreeview.[ch]: Remove the row_draggable_func location_dropable_func from gtk_tree_view_set_rows_drag_source/dest. and rename them to enable_model_drag_source/dest. * gtk/treeviewcolumn.c: Add DND of columns between rows. Still can't drop _to_ the left tree, but other places work. * gtk/gtktreeview.c (unset_reorderable): Unset the reorderable property if unset/enable_model_drag_source/dest are called manually. * gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): Correct for change in depth count handling. * gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon): Pass in a expose area to gtk_tree_view_column_cell_render()
Diffstat (limited to 'tests/testtreeview.c')
-rw-r--r--tests/testtreeview.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/testtreeview.c b/tests/testtreeview.c
index 6367a5f320..43bedfcfbb 100644
--- a/tests/testtreeview.c
+++ b/tests/testtreeview.c
@@ -656,18 +656,16 @@ main (int argc,
tv = gtk_tree_view_new_with_model (models[0]);
- gtk_tree_view_set_rows_drag_source (GTK_TREE_VIEW (tv),
- GDK_BUTTON1_MASK,
- row_targets,
- G_N_ELEMENTS (row_targets),
- GDK_ACTION_MOVE | GDK_ACTION_COPY,
- NULL, NULL);
-
- gtk_tree_view_set_rows_drag_dest (GTK_TREE_VIEW (tv),
- row_targets,
- G_N_ELEMENTS (row_targets),
- GDK_ACTION_MOVE | GDK_ACTION_COPY,
- NULL, NULL);
+ gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tv),
+ GDK_BUTTON1_MASK,
+ row_targets,
+ G_N_ELEMENTS (row_targets),
+ GDK_ACTION_MOVE | GDK_ACTION_COPY);
+
+ gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (tv),
+ row_targets,
+ G_N_ELEMENTS (row_targets),
+ GDK_ACTION_MOVE | GDK_ACTION_COPY);
/* Model menu */