[totem/gnome-2-26] Bug 588937 – Drag and drop on itself with Alt appends instead of asking



commit eb399ced7a1415ee2e1e8924b533840a024b7266
Author: Robin Stocker <robin nibor org>
Date:   Sat Jul 18 20:09:40 2009 +0200

    Bug 588937 â?? Drag and drop on itself with Alt appends instead of asking
    
    2009-07-18  Robin Stocker  <robin nibor org>
    
    	* src/totem-object.c (drop_video_cb, drop_playlist_cb):
    	When drag and dropping a video on itself with Alt pressed, ask
    	what to do instead of appending.

 ChangeLog          |    6 ++++++
 src/totem-object.c |   18 +++++++++---------
 2 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d3fc846..053501a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-18  Robin Stocker  <robin nibor org>
+
+	* src/totem-object.c (drop_video_cb, drop_playlist_cb):
+	When drag and dropping a video on itself with Alt pressed, ask
+	what to do instead of appending.
+
 2009-07-16  Robin Stocker  <robin nibor org>
 
 	* src/totem-object.c (drop_video_cb, drag_video_cb):
diff --git a/src/totem-object.c b/src/totem-object.c
index 551bae8..87b1598 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2162,7 +2162,14 @@ drop_video_cb (GtkWidget     *widget,
 {
 	gboolean empty_pl;
 
-	if (context->suggested_action == GDK_ACTION_ASK) {
+	/* Drop of video on itself */
+	if (context->source_window == totem->video_drag_source_window &&
+	    context->action == GDK_ACTION_MOVE) {
+		gtk_drag_finish (context, FALSE, FALSE, time);
+		return;
+	}
+
+	if (context->action == GDK_ACTION_ASK) {
 		context->action = totem_drag_ask (totem_get_playlist_length (totem) > 0);
 	}
 
@@ -2172,13 +2179,6 @@ drop_video_cb (GtkWidget     *widget,
 		return;
 	}
 
-	/* Drop of video on itself */
-	if (context->source_window == totem->video_drag_source_window &&
-	    context->action == GDK_ACTION_MOVE) {
-		gtk_drag_finish (context, FALSE, FALSE, time);
-		return;
-	}
-
 	empty_pl = (context->action == GDK_ACTION_MOVE);
 	totem_action_drop_files (totem, data, info, empty_pl);
 	gtk_drag_finish (context, TRUE, FALSE, time);
@@ -2217,7 +2217,7 @@ drop_playlist_cb (GtkWidget     *widget,
 {
 	gboolean empty_pl;
 
-	if (context->suggested_action == GDK_ACTION_ASK)
+	if (context->action == GDK_ACTION_ASK)
 		context->action = totem_drag_ask (totem_get_playlist_length (totem) > 0);
 
 	if (context->action == GDK_ACTION_DEFAULT) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]