diff options
author | Larry Ewing <lewing@ximian.com> | 2004-04-13 22:20:54 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-04-13 22:20:54 +0800 |
commit | badc5897b07f1c9d6631aaa2f9857bdd2953c20b (patch) | |
tree | 07bb0d4634e24d976887d07c0593e14dfcf3a15f /composer | |
parent | 1e0c8d98513ae0a937c6bbca4090e66e7e9bcbd1 (diff) | |
download | gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar.gz gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar.bz2 gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar.lz gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar.xz gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.tar.zst gsoc2013-evolution-badc5897b07f1c9d6631aaa2f9857bdd2953c20b.zip |
accept text/calendar drops.
2004-04-13 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (drag_data_received): accept text/calendar
drops.
svn path=/trunk/; revision=25433
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 95dc50a7b0..06aa4ce83a 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2004-04-13 Larry Ewing <lewing@ximian.com> + + * e-msg-composer.c (drag_data_received): accept text/calendar + drops. + 2004-04-09 Chris Toshok <toshok@ximian.com> * e-msg-composer-hdrs.c (set_recipients_from_destv): diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 18d90cbf5e..e699615692 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -137,6 +137,7 @@ enum { DND_TYPE_TEXT_URI_LIST, DND_TYPE_NETSCAPE_URL, DND_TYPE_TEXT_VCARD, + DND_TYPE_TEXT_CALENDAR }; static GtkTargetEntry drop_types[] = { @@ -144,6 +145,7 @@ static GtkTargetEntry drop_types[] = { { "text/uri-list", 0, DND_TYPE_TEXT_URI_LIST }, { "_NETSCAPE_URL", 0, DND_TYPE_NETSCAPE_URL }, { "text/x-vcard", 0, DND_TYPE_TEXT_VCARD }, + { "text/calendar", 0, DND_TYPE_TEXT_CALENDAR } }; static int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]); @@ -2733,6 +2735,7 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context, CamelMimePart *mime_part; CamelStream *stream; CamelURL *url; + char *content_type; int i; switch (info) { @@ -2778,10 +2781,14 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context, g_free (urls); break; case DND_TYPE_TEXT_VCARD: - d(printf ("dropping a text/x-vcard\n")); + case DND_TYPE_TEXT_CALENDAR: + content_type = gdk_atom_name (selection->type); + printf ("dropping a %s\n", content_type); + mime_part = camel_mime_part_new (); camel_mime_part_set_content (mime_part, selection->data, - selection->length, "text/x-vcard"); + selection->length, content_type); + camel_mime_part_set_disposition (mime_part, "inline"); e_msg_composer_attachment_bar_attach_mime_part @@ -2789,6 +2796,9 @@ drag_data_received (EMsgComposer *composer, GdkDragContext *context, mime_part); camel_object_unref (mime_part); + g_free (content_type); + + break; default: d(printf ("dropping an unknown\n")); break; |