diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-19 08:50:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-19 08:50:49 +0000 |
commit | 49eb8a1600558e71a5f1cdbc04d8f2c18a90076c (patch) | |
tree | 4472affc547e408e470a9c216c2113b43561c234 /src | |
parent | ec370ab724dc9d6dc11550c29323d039dc8fe2e0 (diff) |
modification for DnD.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@435 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/compose.c | 14 | ||||
-rw-r--r-- | src/folderview.c | 2 | ||||
-rw-r--r-- | src/summaryview.c | 2 |
3 files changed, 16 insertions, 2 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) diff --git a/src/folderview.c b/src/folderview.c index 17272c3b..382ca84c 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -221,7 +221,7 @@ static void folderview_drag_received_cb (GtkWidget *widget, guint time, FolderView *folderview); -GtkTargetEntry folderview_drag_types[] = +static GtkTargetEntry folderview_drag_types[] = { {"text/plain", GTK_TARGET_SAME_APP, 0} }; diff --git a/src/summaryview.c b/src/summaryview.c index e0661ea3..5332ce92 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -358,7 +358,7 @@ enum N_DRAG_TYPES }; -GtkTargetEntry summary_drag_types[] = +static GtkTargetEntry summary_drag_types[] = { {"text/plain", GTK_TARGET_SAME_APP, DRAG_TYPE_TEXT}, {"message/rfc822", GTK_TARGET_SAME_APP, DRAG_TYPE_RFC822}, |