mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Merged from stable.
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org> Merged from stable. * 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:
parent
bdff7cdb1a
commit
c906acd086
@ -1,3 +1,12 @@
|
||||
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Merged from stable.
|
||||
|
||||
* 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>
|
||||
|
||||
Merged from stable.
|
||||
|
@ -1,3 +1,12 @@
|
||||
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Merged from stable.
|
||||
|
||||
* 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>
|
||||
|
||||
Merged from stable.
|
||||
|
@ -1,3 +1,12 @@
|
||||
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Merged from stable.
|
||||
|
||||
* 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>
|
||||
|
||||
Merged from stable.
|
||||
|
@ -1,3 +1,12 @@
|
||||
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Merged from stable.
|
||||
|
||||
* 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>
|
||||
|
||||
Merged from stable.
|
||||
|
@ -1,3 +1,12 @@
|
||||
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Merged from stable.
|
||||
|
||||
* 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>
|
||||
|
||||
Merged from stable.
|
||||
|
@ -5131,25 +5131,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:
|
||||
@ -5164,7 +5145,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
|
||||
|
Loading…
Reference in New Issue
Block a user