[totem] Bug 588937 – Drag and drop on itself with Alt appends instead of asking



commit f53e438e0e530e5cbbd7ed607df498310645013d
Author: Robin Stocker <robin nibor org>
Date:   Sat Jul 18 11:15:42 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 dd95e93..0787a84 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-17  Bastien Nocera  <hadess hadess net>
 
 	* data/totem.schemas.in:
diff --git a/src/totem-object.c b/src/totem-object.c
index a1ce2fa..3f19541 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2210,7 +2210,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);
 	}
 
@@ -2220,13 +2227,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);
@@ -2265,7 +2265,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]