From 46d8a6320ed9e0a7e7e74ef8a01def377c468010 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 18 Jun 2007 04:59:42 +0000 Subject: ** Fix for bug #444107 svn path=/trunk/; revision=33691 --- composer/ChangeLog | 7 +++++++ composer/e-msg-composer.c | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 47ec4e8bc5..b5d50def62 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,10 @@ +2007-06-18 Srinivasa Ragavan + + ** Fix for bug #444107 + + * e-msg-composer.c: (drop_action), (drop_popup_copy), + (drop_popup_move), (drag_data_received): + 2007-06-13 Bastien Nocera * e-msg-composer.c: (composer_key_pressed): Use the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 25ea3b10ec..63052a3ff2 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2972,7 +2972,7 @@ attachment_guess_mime_type (const char *file_name) } static void -drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, GtkSelectionData *selection, guint info, guint time) +drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, GtkSelectionData *selection, guint info, guint time, gboolean html_dnd) { char *tmp, *str, **urls, *type; CamelMimePart *mime_part; @@ -3025,7 +3025,7 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk if (!g_ascii_strcasecmp (url->protocol, "file")) { type = attachment_guess_mime_type (str); - if (strncmp (type, "image", 5) || (!p->send_html && !strncmp (type, "image", 5))) + if (strncmp (type, "image", 5) || !html_dnd || (!p->send_html && !strncmp (type, "image", 5))) e_attachment_bar_attach (E_ATTACHMENT_BAR (p->attachment_bar), url->path, "attachment"); } else { @@ -3159,14 +3159,14 @@ static void drop_popup_copy(EPopup *ep, EPopupItem *item, void *data) { struct _drop_data *m = data; - drop_action(m->composer, m->context, GDK_ACTION_COPY, m->selection, m->info, m->time); + drop_action(m->composer, m->context, GDK_ACTION_COPY, m->selection, m->info, m->time, FALSE); } static void drop_popup_move(EPopup *ep, EPopupItem *item, void *data) { struct _drop_data *m = data; - drop_action(m->composer, m->context, GDK_ACTION_MOVE, m->selection, m->info, m->time); + drop_action(m->composer, m->context, GDK_ACTION_MOVE, m->selection, m->info, m->time, FALSE); } static void @@ -3234,10 +3234,11 @@ drag_data_received (GtkWidget *w, GdkDragContext *context, menu = e_popup_create_menu_once((EPopup *)emp, NULL, 0); gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0, time); } else { - drop_action(composer, context, context->action, selection, info, time); + drop_action(composer, context, context->action, selection, info, time, w != composer); } } + static gboolean drag_motion(GObject *o, GdkDragContext *context, gint x, gint y, guint time, EMsgComposer *composer) { -- cgit v1.2.3