pressing CTRL while DND will copy the mail now
authorCarsten Schurig <Carsten.Schurig@web.de>
Fri, 21 Dec 2001 08:51:54 +0000 (08:51 +0000)
committerCarsten Schurig <Carsten.Schurig@web.de>
Fri, 21 Dec 2001 08:51:54 +0000 (08:51 +0000)
ChangeLog.claws
configure.in
src/folderview.c
src/summaryview.c

index b753471a584d6f6dcf30329267fe8298b62849c8..e801e3afee50d4983d27e14e43129f4cdece158a 100644 (file)
@@ -1,3 +1,10 @@
+2001-12-21 [carsten]   0.6.6claws5
+       * src/folderview.c
+       * src/summaryview.c
+               pressing CTRL while DND does now the expected thing and
+               copies the mail (moving is still the default, as this
+               seam more appropriate for handling mails by DND)
+
 2001-12-18 [paul]      0.6.6claws4
 
        * sync with sylpheed 0.6.6cvs3
index 29292ac9cc18e96f5f1cee49e0a3242c53b5f122..39cd65c8c3eea20f2697aae9be3ed04759c9f519 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws4
+EXTRA_VERSION=claws5
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 27c76f0cf3d3d709af55ab0ec626d175b9eed887..eaf930b2e0504a0831003a4f205578b98bfbc47b 100644 (file)
@@ -422,7 +422,7 @@ FolderView *folderview_create(void)
        gtk_drag_dest_set(ctree, GTK_DEST_DEFAULT_ALL &
                          ~GTK_DEST_DEFAULT_HIGHLIGHT,
                          summary_drag_types, 1,
-                         GDK_ACTION_MOVE);
+                         GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_DEFAULT);
        gtk_signal_connect(GTK_OBJECT(ctree), "drag_motion",
                           GTK_SIGNAL_FUNC(folderview_drag_motion_cb),
                           folderview);
@@ -2269,7 +2269,9 @@ static gboolean folderview_drag_motion_cb(GtkWidget      *widget,
                gtk_signal_handler_block_by_func(GTK_OBJECT(widget),GTK_SIGNAL_FUNC(folderview_selected), folderview);
                gtk_ctree_select(GTK_CTREE(widget), node);
                gtk_signal_handler_unblock_by_func(GTK_OBJECT(widget),GTK_SIGNAL_FUNC(folderview_selected), folderview);
-               gdk_drag_status(context, context->suggested_action, time);
+               gdk_drag_status(context, 
+                                       (context->actions == GDK_ACTION_COPY ?
+                                       GDK_ACTION_COPY : GDK_ACTION_MOVE) , time);
        } else {
                gtk_ctree_select(GTK_CTREE(widget), folderview->opened);
                gdk_drag_status(context, 0, time);
@@ -2306,8 +2308,18 @@ static void folderview_drag_received_cb(GtkWidget        *widget,
        node = gtk_ctree_node_nth(GTK_CTREE(widget), row);
        item = gtk_ctree_node_get_row_data(GTK_CTREE(widget), node);
        if (item != NULL) {
-               summary_move_selected_to(folderview->summaryview, item);
-               gtk_drag_finish(drag_context, TRUE, TRUE, time);
+               switch (drag_context->action) {
+                       case GDK_ACTION_COPY:
+                               summary_copy_selected_to(folderview->summaryview, item);
+                               gtk_drag_finish(drag_context, TRUE, FALSE, time);
+                               break;
+                       case GDK_ACTION_MOVE:
+                       case GDK_ACTION_DEFAULT:
+                       default:
+                               summary_move_selected_to(folderview->summaryview, item);
+                               gtk_drag_finish(drag_context, TRUE, TRUE, time);
+                               break;
+               }
        } else
                gtk_drag_finish(drag_context, FALSE, FALSE, time);
 }
index aac4d2146f6aa4556a9ef5cb3b9509c9d78a69eb..f6a6f6becd545134dcd83a7a864aeb770c1f3a37 100644 (file)
@@ -4596,7 +4596,7 @@ static void summary_start_drag(GtkWidget *widget, gint button, GdkEvent *event,
        list = gtk_target_list_new(summary_drag_types, 1);
 
        context = gtk_drag_begin(widget, list,
-                                GDK_ACTION_MOVE, button, event);
+                                GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_DEFAULT, button, event);
        gtk_drag_set_icon_default(context);
 }