aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 12:59:42 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 12:59:42 +0800
commit46d8a6320ed9e0a7e7e74ef8a01def377c468010 (patch)
treec630003c4c16bd270a509c265e169b36cfd49077 /composer/e-msg-composer.c
parent7dc467803da18986cf1d1e6b0df9a1290bfee3a6 (diff)
downloadgsoc2013-evolution-46d8a6320ed9e0a7e7e74ef8a01def377c468010.tar.gz
gsoc2013-evolution-46d8a6320ed9e0a7e7e74ef8a01def377c468010.tar.zst
gsoc2013-evolution-46d8a6320ed9e0a7e7e74ef8a01def377c468010.zip
** Fix for bug #444107
svn path=/trunk/; revision=33691
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c11
1 files changed, 6 insertions, 5 deletions
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)
{