rename gtk_selection_data_set_tree_row, #60218

Wed Oct 31 16:53:48 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
	gtk_selection_data_set_tree_row, #60218
	(gtk_tree_get_row_drag_data): rename
	gtk_selection_data_get_tree_row, #60218

	* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
	get this right, after the third try, #63122.
This commit is contained in:
Jonathan Blandford 2001-10-31 21:55:55 +00:00 committed by Jonathan Blandford
parent f2f7090a62
commit d7a97b9728
13 changed files with 127 additions and 45 deletions

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1,3 +1,13 @@
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-31 jacob berkman <jacob@ximian.com>
* gdk/gdkselection.h (GDK_TARGET_STRING):

View File

@ -1278,7 +1278,7 @@ gtk_list_store_drag_data_get (GtkTreeDragSource *drag_source,
* default handler.
*/
if (gtk_selection_data_set_tree_row (selection_data,
if (gtk_tree_set_row_drag_data (selection_data,
GTK_TREE_MODEL (drag_source),
path))
{
@ -1308,7 +1308,7 @@ gtk_list_store_drag_data_received (GtkTreeDragDest *drag_dest,
tree_model = GTK_TREE_MODEL (drag_dest);
list_store = GTK_LIST_STORE (drag_dest);
if (gtk_selection_data_get_tree_row (selection_data,
if (gtk_tree_get_row_drag_data (selection_data,
&src_model,
&src_path) &&
src_model == tree_model)

View File

@ -196,7 +196,7 @@ struct _TreeRowData
};
/**
* gtk_selection_data_set_tree_row:
* gtk_tree_set_row_drag_data:
* @selection_data: some #GtkSelectionData
* @tree_model: a #GtkTreeModel
* @path: a row in @tree_model
@ -207,7 +207,7 @@ struct _TreeRowData
* Return value: %TRUE if the #GtkSelectionData had the proper target type to allow us to set a tree row
**/
gboolean
gtk_selection_data_set_tree_row (GtkSelectionData *selection_data,
gtk_tree_set_row_drag_data (GtkSelectionData *selection_data,
GtkTreeModel *tree_model,
GtkTreePath *path)
{
@ -249,7 +249,7 @@ gtk_selection_data_set_tree_row (GtkSelectionData *selection_data,
}
/**
* gtk_selection_data_get_tree_row:
* gtk_tree_get_row_drag_data:
* @selection_data: a #GtkSelectionData
* @tree_model: a #GtkTreeModel
* @path: row in @tree_model
@ -268,7 +268,7 @@ gtk_selection_data_set_tree_row (GtkSelectionData *selection_data,
* is otherwise valid
**/
gboolean
gtk_selection_data_get_tree_row (GtkSelectionData *selection_data,
gtk_tree_get_row_drag_data (GtkSelectionData *selection_data,
GtkTreeModel **tree_model,
GtkTreePath **path)
{

View File

@ -95,22 +95,25 @@ 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.
*/
gboolean gtk_selection_data_set_tree_row (GtkSelectionData *selection_data,
gboolean gtk_tree_set_row_drag_data (GtkSelectionData *selection_data,
GtkTreeModel *tree_model,
GtkTreePath *path);
gboolean gtk_selection_data_get_tree_row (GtkSelectionData *selection_data,
gboolean gtk_tree_get_row_drag_data (GtkSelectionData *selection_data,
GtkTreeModel **tree_model,
GtkTreePath **path);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -397,7 +397,7 @@ gtk_tree_path_compare (const GtkTreePath *a,
* @path: a #GtkTreePath
* @descendant: another #GtkTreePath
*
*
* Returns %TRUE is @descendant is a descendant of @path.
*
* Return value: %TRUE if @descendant is contained inside @path
**/
@ -1303,16 +1303,25 @@ gtk_tree_row_ref_deleted_callback (GObject *object,
if (reference->path)
{
if (gtk_tree_path_is_ancestor (path, reference->path))
{
reference->path->indices[path->depth-1]-=1;
}
else if (gtk_tree_path_compare (path, reference->path) == 0)
gint i;
if (path->depth > reference->path->depth)
continue;
for (i = 0; i < path->depth - 1; i++)
if (path->indices[i] != reference->path->indices[i])
continue;
/* We know it affects us. */
if (path->indices[i] == reference->path->indices[i])
{
gtk_tree_row_reference_unref_path (reference->path, reference->model, FALSE);
gtk_tree_path_free (reference->path);
reference->path = NULL;
}
else if (path->indices[i] < reference->path->indices[i])
{
reference->path->indices[path->depth-1]-=1;
}
}
tmp_list = g_slist_next (tmp_list);
}

View File

@ -1390,7 +1390,7 @@ gtk_tree_store_drag_data_get (GtkTreeDragSource *drag_source,
* default handler.
*/
if (gtk_selection_data_set_tree_row (selection_data,
if (gtk_tree_set_row_drag_data (selection_data,
GTK_TREE_MODEL (drag_source),
path))
{
@ -1492,7 +1492,7 @@ gtk_tree_store_drag_data_received (GtkTreeDragDest *drag_dest,
validate_tree (tree_store);
if (gtk_selection_data_get_tree_row (selection_data,
if (gtk_tree_get_row_drag_data (selection_data,
&src_model,
&src_path) &&
src_model == tree_model)

View File

@ -3581,7 +3581,7 @@ gtk_tree_view_drag_data_get (GtkWidget *widget,
/* If drag_data_get does nothing, try providing row data. */
if (selection_data->target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE))
{
gtk_selection_data_set_tree_row (selection_data,
gtk_tree_set_row_drag_data (selection_data,
model,
source_row);
}
@ -3809,7 +3809,7 @@ gtk_tree_view_drag_data_received (GtkWidget *widget,
GtkTreeModel *src_model = NULL;
GtkTreePath *src_path = NULL;
if (!gtk_selection_data_get_tree_row (selection_data,
if (!gtk_tree_get_row_drag_data (selection_data,
&src_model,
&src_path))
suggested_action = 0;