set the DnD icon in _drag_begin instead of _maybe_begin_dragging_row, so

Thu May 29 16:31:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
	(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
	instead of _maybe_begin_dragging_row, so the icon can be
	overridden by apps. (Fixes #104374, patch from Daniel Elstner).
This commit is contained in:
Kristian Rietveld
2003-05-29 14:34:19 +00:00
committed by Kristian Rietveld
parent 0ed62104fe
commit 8d97bc30c9
6 changed files with 67 additions and 20 deletions

View File

@@ -1,3 +1,10 @@
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
instead of _maybe_begin_dragging_row, so the icon can be
overridden by apps. (Fixes #104374, patch from Daniel Elstner).
Thu May 29 16:14:04 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct

View File

@@ -1,3 +1,10 @@
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
instead of _maybe_begin_dragging_row, so the icon can be
overridden by apps. (Fixes #104374, patch from Daniel Elstner).
Thu May 29 16:14:04 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct

View File

@@ -1,3 +1,10 @@
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
instead of _maybe_begin_dragging_row, so the icon can be
overridden by apps. (Fixes #104374, patch from Daniel Elstner).
Thu May 29 16:14:04 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct

View File

@@ -1,3 +1,10 @@
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
instead of _maybe_begin_dragging_row, so the icon can be
overridden by apps. (Fixes #104374, patch from Daniel Elstner).
Thu May 29 16:14:04 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct

View File

@@ -1,3 +1,10 @@
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
instead of _maybe_begin_dragging_row, so the icon can be
overridden by apps. (Fixes #104374, patch from Daniel Elstner).
Thu May 29 16:14:04 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct

View File

@@ -5025,25 +5025,6 @@ gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view,
button,
(GdkEvent*)event);
gtk_drag_set_icon_default (context);
{
GdkPixmap *row_pix;
row_pix = gtk_tree_view_create_row_drag_icon (tree_view,
path);
gtk_drag_set_icon_pixmap (context,
gdk_drawable_get_colormap (row_pix),
row_pix,
NULL,
/* the + 1 is for the black border in the icon */
tree_view->priv->press_start_x + 1,
cell_y + 1);
g_object_unref (row_pix);
}
set_source_row (context, model, path);
out:
@@ -5058,7 +5039,38 @@ static void
gtk_tree_view_drag_begin (GtkWidget *widget,
GdkDragContext *context)
{
/* do nothing */
GtkTreeView *tree_view;
GtkTreePath *path = NULL;
gint cell_x, cell_y;
GdkPixmap *row_pix;
tree_view = GTK_TREE_VIEW (widget);
g_return_if_fail (get_info (tree_view) != NULL);
gtk_tree_view_get_path_at_pos (tree_view,
tree_view->priv->press_start_x,
tree_view->priv->press_start_y,
&path,
NULL,
&cell_x,
&cell_y);
g_return_if_fail (path != NULL);
row_pix = gtk_tree_view_create_row_drag_icon (tree_view,
path);
gtk_drag_set_icon_pixmap (context,
gdk_drawable_get_colormap (row_pix),
row_pix,
NULL,
/* the + 1 is for the black border in the icon */
tree_view->priv->press_start_x + 1,
cell_y + 1);
g_object_unref (row_pix);
gtk_tree_path_free (path);
}
static void