aboutsummaryrefslogtreecommitdiff
path: root/src/compose.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-07-19 08:50:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-07-19 08:50:49 +0000
commit49eb8a1600558e71a5f1cdbc04d8f2c18a90076c (patch)
tree4472affc547e408e470a9c216c2113b43561c234 /src/compose.c
parentec370ab724dc9d6dc11550c29323d039dc8fe2e0 (diff)
modification for DnD.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@435 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r--src/compose.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compose.c b/src/compose.c
index 31827999..20ed6ef8 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -6239,6 +6239,9 @@ static void compose_attach_drag_received_cb (GtkWidget *widget,
if (info == DRAG_TYPE_RFC822)
content_type = "message/rfc822";
+ debug_print("compose_attach_drag_received_cb(): received %s\n",
+ (const gchar *)data->data);
+
list = uri_list_extract_filenames((const gchar *)data->data);
for (cur = list; cur != NULL; cur = cur->next) {
path = (gchar *)cur->data;
@@ -6249,6 +6252,10 @@ static void compose_attach_drag_received_cb (GtkWidget *widget,
}
if (list) compose_changed_cb(NULL, compose);
g_list_free(list);
+
+ if ((drag_context->actions & GDK_ACTION_MOVE) != 0)
+ drag_context->action = 0;
+ gtk_drag_finish(drag_context, TRUE, FALSE, time);
}
static void compose_insert_drag_received_cb (GtkWidget *widget,
@@ -6263,11 +6270,18 @@ static void compose_insert_drag_received_cb (GtkWidget *widget,
Compose *compose = (Compose *)user_data;
GList *list, *cur;
+ debug_print("compose_insert_drag_received_cb(): received %s\n",
+ (const gchar *)data->data);
+
list = uri_list_extract_filenames((const gchar *)data->data);
for (cur = list; cur != NULL; cur = cur->next)
compose_insert_file(compose, (const gchar *)cur->data, TRUE);
list_free_strings(list);
g_list_free(list);
+
+ if ((drag_context->actions & GDK_ACTION_MOVE) != 0)
+ drag_context->action = 0;
+ gtk_drag_finish(drag_context, TRUE, FALSE, time);
}
static void to_activated(GtkWidget *widget, Compose *compose)