aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c20
2 files changed, 16 insertions, 10 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index a64df7ec9a..8c9cc42df4 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-31 Antonio Xu <antonio.xu@sun.com>
+
+ * e-msg-composer.c (drag_data_received): add the drop type of
+ mozilla browser link to make composer support to handle mozilla
+ DnD data. [#47131]
+
2003-07-28 Antonio Xu <antonio.xu@sun.com>
* e-msg-composer-attachment-bar.c (update): add
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 101ffde01a..ce29cf35f1 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -122,12 +122,14 @@ static guint signals[LAST_SIGNAL] = { 0 };
enum {
DND_TYPE_MESSAGE_RFC822,
DND_TYPE_TEXT_URI_LIST,
+ DND_TYPE_NETSCAPE_URL,
DND_TYPE_TEXT_VCARD,
};
static GtkTargetEntry drop_types[] = {
{ "message/rfc822", 0, DND_TYPE_MESSAGE_RFC822 },
{ "text/uri-list", 0, DND_TYPE_TEXT_URI_LIST },
+ { "_NETSCAPE_URL", 0, DND_TYPE_NETSCAPE_URL },
{ "text/x-vcard", 0, DND_TYPE_TEXT_VCARD },
};
@@ -2554,7 +2556,7 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context,
int x, int y, GtkSelectionData *selection,
guint info, guint time)
{
- char *tmp, *str, *filename, **urls;
+ char *tmp, *str, **urls;
CamelMimePart *mime_part;
CamelStream *stream;
CamelURL *url;
@@ -2572,6 +2574,7 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context,
camel_object_unref (stream);
break;
case DND_TYPE_TEXT_URI_LIST:
+ case DND_TYPE_NETSCAPE_URL:
d(printf ("dropping a text/uri-list\n"));
tmp = g_strndup (selection->data, selection->length);
urls = g_strsplit (tmp, "\n", 0);
@@ -2589,16 +2592,13 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context,
if (url == NULL)
continue;
-
- filename = url->path;
- url->path = NULL;
+
+ if (!strcasecmp (url->protocol, "file"))
+ e_msg_composer_attachment_bar_attach
+ (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
+ url->path);
+
camel_url_free (url);
-
- e_msg_composer_attachment_bar_attach
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- filename);
-
- g_free (filename);
}
}