[gimp] Bug 681709 - GimpContainer continuously scrolls on dnd failure on Windows.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 681709 - GimpContainer continuously scrolls on dnd failure on Windows.
- Date: Wed, 2 Oct 2013 08:19:52 +0000 (UTC)
commit 3e082b356c77d8560fc79f29c77cf7ac17bb745e
Author: Jehan <jehan girinstud io>
Date: Mon Sep 30 05:23:23 2013 +1300
Bug 681709 - GimpContainer continuously scrolls on dnd failure on Windows.
The scroll timeout is looping forever if the drag ends by a failure
event. For instance when hitting the Esc button during scrolling.
app/widgets/gimpcontainertreeview-dnd.c | 15 +++++++++++++++
app/widgets/gimpcontainertreeview-dnd.h | 4 ++++
app/widgets/gimpcontainertreeview.c | 3 +++
3 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview-dnd.c b/app/widgets/gimpcontainertreeview-dnd.c
index d6b0c61..d32507a 100644
--- a/app/widgets/gimpcontainertreeview-dnd.c
+++ b/app/widgets/gimpcontainertreeview-dnd.c
@@ -256,6 +256,21 @@ gimp_container_tree_view_scroll_timeout (gpointer data)
}
void
+gimp_container_tree_view_drag_failed (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkDragResult result,
+ GimpContainerTreeView *tree_view)
+{
+ if (tree_view->priv->scroll_timeout_id)
+ {
+ g_source_remove (tree_view->priv->scroll_timeout_id);
+ tree_view->priv->scroll_timeout_id = 0;
+ }
+
+ gtk_tree_view_set_drag_dest_row (tree_view->view, NULL, 0);
+}
+
+void
gimp_container_tree_view_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
diff --git a/app/widgets/gimpcontainertreeview-dnd.h b/app/widgets/gimpcontainertreeview-dnd.h
index 1778e28..3d696da 100644
--- a/app/widgets/gimpcontainertreeview-dnd.h
+++ b/app/widgets/gimpcontainertreeview-dnd.h
@@ -22,6 +22,10 @@
#define __GIMP_CONTAINER_TREE_VIEW_DND_H__
+void gimp_container_tree_view_drag_failed (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkDragResult result,
+ GimpContainerTreeView *tree_view);
void gimp_container_tree_view_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index 29ea4d2..8b40e47 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -294,6 +294,9 @@ gimp_container_tree_view_constructed (GObject *object)
G_CALLBACK (gimp_container_tree_view_selection_changed),
tree_view);
+ g_signal_connect (tree_view->view, "drag-failed",
+ G_CALLBACK (gimp_container_tree_view_drag_failed),
+ tree_view);
g_signal_connect (tree_view->view, "drag-leave",
G_CALLBACK (gimp_container_tree_view_drag_leave),
tree_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]