Commit 5c466a9f authored by Murray Cumming's avatar Murray Cumming Committed by Kristian Rietveld

Fixes #102168.

2002-12-29  Murray Cumming  <murrayc@usa.net>

	Fixes #102168.

	* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
	Actually implement the GtkTreeDragSource::row_draggable virtual
	function in GtkListStore and GtkTreeStore instead of just checking
	whether it's implemented at all. This means that DnD isn't broken by
	gtkmm's virtual function wrappers. The alternative would be to
	hard-code the TRUE return value into gtkmm's wrappers, but that's
	part of GTK+'s implementation, not it's API.
parent f35b13f6
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes #102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
Tue Jan 14 23:42:29 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c: fix compiler warning.
......
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes #102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
Tue Jan 14 23:42:29 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c: fix compiler warning.
......
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes #102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
Tue Jan 14 23:42:29 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c: fix compiler warning.
......
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes #102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
Tue Jan 14 23:42:29 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c: fix compiler warning.
......
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes #102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
Tue Jan 14 23:42:29 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c: fix compiler warning.
......
......@@ -74,6 +74,8 @@ static void gtk_list_store_set_column_type (GtkListStore *list_store,
/* Drag and Drop */
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
GtkTreePath *path);
static gboolean gtk_list_store_drag_data_delete (GtkTreeDragSource *drag_source,
GtkTreePath *path);
static gboolean gtk_list_store_drag_data_get (GtkTreeDragSource *drag_source,
......@@ -228,6 +230,7 @@ gtk_list_store_tree_model_init (GtkTreeModelIface *iface)
static void
gtk_list_store_drag_source_init (GtkTreeDragSourceIface *iface)
{
iface->row_draggable = real_gtk_list_store_row_draggable;
iface->drag_data_delete = gtk_list_store_drag_data_delete;
iface->drag_data_get = gtk_list_store_drag_data_get;
}
......@@ -1400,6 +1403,12 @@ gtk_list_store_iter_is_valid (GtkListStore *list_store,
return FALSE;
}
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
GtkTreePath *path)
{
return TRUE;
}
static gboolean
gtk_list_store_drag_data_delete (GtkTreeDragSource *drag_source,
GtkTreePath *path)
......
......@@ -97,6 +97,9 @@ gtk_tree_drag_source_row_draggable (GtkTreeDragSource *drag_source,
return (* iface->row_draggable) (drag_source, path);
else
return TRUE;
/* Returning TRUE if row_draggable is not implemented is a fallback.
Interface implementations such as GtkTreeStore and GtkListStore really should
implement row_draggable. */
}
......
......@@ -74,6 +74,8 @@ static void gtk_tree_store_set_column_type (GtkTreeStore *tree_store,
/* DND interfaces */
static gboolean real_gtk_tree_store_row_draggable (GtkTreeDragSource *drag_source,
GtkTreePath *path);
static gboolean gtk_tree_store_drag_data_delete (GtkTreeDragSource *drag_source,
GtkTreePath *path);
static gboolean gtk_tree_store_drag_data_get (GtkTreeDragSource *drag_source,
......@@ -231,6 +233,7 @@ gtk_tree_store_tree_model_init (GtkTreeModelIface *iface)
static void
gtk_tree_store_drag_source_init (GtkTreeDragSourceIface *iface)
{
iface->row_draggable = real_gtk_tree_store_row_draggable;
iface->drag_data_delete = gtk_tree_store_drag_data_delete;
iface->drag_data_get = gtk_tree_store_drag_data_get;
}
......@@ -1561,6 +1564,12 @@ gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store,
/* DND */
static gboolean real_gtk_tree_store_row_draggable (GtkTreeDragSource *drag_source,
GtkTreePath *path)
{
return TRUE;
}
static gboolean
gtk_tree_store_drag_data_delete (GtkTreeDragSource *drag_source,
GtkTreePath *path)
......
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