diff options
author | Havoc Pennington <hp@redhat.com> | 2001-01-31 00:57:49 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-01-31 00:57:49 +0000 |
commit | 5cd2993201f1d9d4866928cf2ffa2abbbf2a30ab (patch) | |
tree | 185b848c7285523e6f6e4ca6f242d9f480bb834f /gtk/gtktreednd.h | |
parent | a8e3c2058da86049ab3778f6494f6bdf99f18e44 (diff) | |
download | gtk+-5cd2993201f1d9d4866928cf2ffa2abbbf2a30ab.tar.gz |
fix bug in here where prev pointer was set to the wrong thing
2001-01-30 Havoc Pennington <hp@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_insert_before): fix bug in
here where prev pointer was set to the wrong thing
* gtk/gtktreemodel.c (gtk_tree_path_is_ancestor): new function
(gtk_tree_path_is_descendant): new function
* gtk/gtkliststore.c (gtk_list_store_iter_n_children): return
cached length
(gtk_list_store_get_iter): don't modify iter if we can't get the
path.
* gtk/gtkliststore.h (struct _GtkListStore): cache the length
* gtk/gtktreednd.h: add virtual function row_drop_possible() to
GtkTreeDragDest
* gtk/gtktreestore.c (copy_node_data): fix varargs type error that
was causing segfault
* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_copy): set next
pointer to NULL
* gtk/gtktreestore.c (gtk_tree_store_append): fix memleak
* gtk/gtkliststore.c (gtk_list_store_iter_next): don't modify iter
on returning FALSE
(gtk_list_store_iter_children): ditto
(gtk_list_store_iter_nth_child): ditto
(gtk_list_store_iter_nth_child): ditto
(gtk_list_store_iter_parent): ditto
* gtk/gtktreestore.c (gtk_tree_store_get_path): g_return_if_fail
on iter->user_data != NULL instead of silently accepting it.
(gtk_tree_store_iter_next): ditto. Also, don't modify iter unless
we are returning TRUE.
(gtk_tree_store_iter_children): ditto
(gtk_tree_store_iter_nth_child): ditto
(gtk_tree_store_iter_parent): ditto
(gtk_tree_store_insert): remove handling of parent->user_data ==
NULL, replace with parent == NULL
* gtk/gtktreemodel.c (inserted_callback): put some fixes in here,
and a comment explaining things
* gtk/gtktreestore.c: add GtkTreeDragSource/GtkTreeDragDest
interface support to GtkTreeStore.
* gtk/gtktreemodel.c (gtk_tree_path_prev): didn't properly return
FALSE if no prev, fix
* gtk/gtktreeview.c (set_source_row): use a row reference
(set_dest_row): use a row reference
Diffstat (limited to 'gtk/gtktreednd.h')
-rw-r--r-- | gtk/gtktreednd.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk/gtktreednd.h b/gtk/gtktreednd.h index 1257ed25f6..8e9513ec24 100644 --- a/gtk/gtktreednd.h +++ b/gtk/gtktreednd.h @@ -41,11 +41,11 @@ struct _GtkTreeDragSourceIface /* VTable - not signals */ - gboolean (* drag_data_get) (GtkTreeDragSource *dragsource, + gboolean (* drag_data_get) (GtkTreeDragSource *drag_source, GtkTreePath *path, GtkSelectionData *selection_data); - gboolean (* drag_data_delete) (GtkTreeDragSource *dragsource, + gboolean (* drag_data_delete) (GtkTreeDragSource *drag_source, GtkTreePath *path); }; @@ -76,10 +76,14 @@ struct _GtkTreeDragDestIface /* VTable - not signals */ - gboolean (* drag_data_received) (GtkTreeDragDest *dragdest, + gboolean (* drag_data_received) (GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data); + gboolean (* row_drop_possible) (GtkTreeDragDest *drag_dest, + GtkTreeModel *src_model, + GtkTreePath *src_path, + GtkTreePath *dest_path); }; GType gtk_tree_drag_dest_get_type (void) G_GNUC_CONST; @@ -91,6 +95,12 @@ gboolean gtk_tree_drag_dest_drag_data_received (GtkTreeDragDest *drag_dest, GtkTreePath *dest, GtkSelectionData *selection_data); +/* Returns TRUE if we can drop before path; path may not exist. */ +gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest, + GtkTreeModel *src_model, + GtkTreePath *src_path, + GtkTreePath *dest_path); + /* The selection data would normally have target type GTK_TREE_MODEL_ROW in this * case. If the target is wrong these functions return FALSE. */ |