diff options
author | Not Zed <NotZed@Ximian.com> | 2004-06-17 11:32:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-06-17 11:32:04 +0800 |
commit | 16c9d26176e7db3c7aab99d44b35ea39d9f74951 (patch) | |
tree | d9eb82839d942289f34de7e4a3660c1658f39a22 /mail | |
parent | fa5f2ab56e524d761b90547424681d7350184591 (diff) | |
download | gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar.gz gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar.bz2 gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar.lz gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar.xz gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.tar.zst gsoc2013-evolution-16c9d26176e7db3c7aab99d44b35ea39d9f74951.zip |
** See #59885.
2004-06-17 Not Zed <NotZed@Ximian.com>
** See #59885.
* em-format-html-quote.[ch]: remove and remove from build, not
used.
* Makefile.am (libevolution_mail_la_LIBADD): add libeabutil and
evolution-smime.
* mail-component-factory.c (factory): there is no mail_config
anymore.
2004-06-16 Not Zed <NotZed@Ximian.com>
* em-utils.c (em_utils_selection_get_urilist): handle comments in
the urilist. Can't remember the rfc for it.
svn path=/trunk/; revision=26374
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 16 | ||||
-rw-r--r-- | mail/Makefile.am | 8 | ||||
-rw-r--r-- | mail/em-format-html-quote.c | 282 | ||||
-rw-r--r-- | mail/em-format-html-quote.h | 49 | ||||
-rw-r--r-- | mail/em-utils.c | 2 | ||||
-rw-r--r-- | mail/mail-component-factory.c | 3 | ||||
-rw-r--r-- | mail/message-list.c | 2 |
7 files changed, 25 insertions, 337 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a0e240d7ff..f0631393ba 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,16 @@ +2004-06-17 Not Zed <NotZed@Ximian.com> + + ** See #59885. + + * em-format-html-quote.[ch]: remove and remove from build, not + used. + + * Makefile.am (libevolution_mail_la_LIBADD): add libeabutil and + evolutionsmime. + + * mail-component-factory.c (factory): there is no mail_config + anymore. + 2004-06-16 Rodney Dawes <dobey@novell.com> * em-folder-properties.c: Include gtk[hv]box.h so we can use them @@ -20,6 +33,9 @@ 2004-06-16 Not Zed <NotZed@Ximian.com> + * em-utils.c (em_utils_selection_get_urilist): handle comments in + the urilist. Can't remember the rfc for it. + ** See #56479. * em-utils.c (em_utils_in_addressbook): use the main thread to diff --git a/mail/Makefile.am b/mail/Makefile.am index 71af260b47..8e31f7a068 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -90,8 +90,6 @@ libevolution_mail_la_SOURCES = \ em-format-html-display.h \ em-format-html-print.c \ em-format-html-print.h \ - em-format-html-quote.c \ - em-format-html-quote.h \ em-stripsig-filter.c \ em-stripsig-filter.h \ em-format-quote.c \ @@ -161,6 +159,10 @@ libevolution_mail_la_SOURCES = \ message-tag-followup.c \ message-tag-followup.h +if ENABLE_SMIME +SMIME_LIB=$(top_builddir)/smime/gui/libevolution-smime.la +endif + libevolution_mail_la_LIBADD = \ $(top_builddir)/shell/importer/libevolution-importer.la \ $(top_builddir)/mail/importers/libevolution-mail-importers.la\ @@ -172,6 +174,8 @@ libevolution_mail_la_LIBADD = \ $(top_builddir)/widgets/misc/libefilterbar.la \ $(top_builddir)/filter/libfilter.la \ $(top_builddir)/widgets/menus/libmenus.la \ + $(top_builddir)/addressbook/util/libeabutil.la \ + $(SMIME_LIB) \ $(EVOLUTION_MAIL_LIBS) libevolution_mail_la_LDFLAGS = \ diff --git a/mail/em-format-html-quote.c b/mail/em-format-html-quote.c deleted file mode 100644 index 49749969d8..0000000000 --- a/mail/em-format-html-quote.c +++ /dev/null @@ -1,282 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Jeffrey Stedfast <fejj@ximian.com> - * - * Copyright 2003 Ximian, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <string.h> - -#include <camel/camel-stream.h> -#include <camel/camel-mime-filter-tohtml.h> -#include "em-format-html-quote.h" - -struct _EMFormatHTMLQuotePrivate { - char *credits; -}; - -static void efhq_format_clone (EMFormat *, CamelFolder *, const char *, CamelMimeMessage *, EMFormat *); -static void efhq_format_error (EMFormat *emf, CamelStream *stream, const char *txt); -static void efhq_format_message (EMFormat *, CamelStream *, CamelMedium *); -static void efhq_format_source (EMFormat *, CamelStream *, CamelMimePart *); -static void efhq_format_attachment (EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *); - -static void efhq_builtin_init (EMFormatHTMLQuoteClass *efhc); - -static EMFormatHTMLClass *efhq_parent; - -static void -efhq_init (GObject *o) -{ - EMFormatHTMLQuote *efhq = (EMFormatHTMLQuote *) o; - - efhq->priv = g_malloc0 (sizeof (*efhq->priv)); - - /* we want to convert url's etc */ - ((EMFormatHTML *) efhq)->text_html_flags |= CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES; - /* we want simple header format */ - ((EMFormatHTML *) efhq)->simple_headers = TRUE; -} - -static void -efhq_finalise (GObject *o) -{ - EMFormatHTMLQuote *efhq = (EMFormatHTMLQuote *) o; - - g_free (efhq->priv->credits); - g_free (efhq->priv); - - ((GObjectClass *) efhq_parent)->finalize (o); -} - -static void -efhq_base_init(EMFormatHTMLQuoteClass *efhqklass) -{ - efhq_builtin_init(efhqklass); -} - -static void -efhq_class_init (GObjectClass *klass) -{ - ((EMFormatClass *) klass)->format_clone = efhq_format_clone; - ((EMFormatClass *) klass)->format_error = efhq_format_error; - ((EMFormatClass *) klass)->format_message = efhq_format_message; - ((EMFormatClass *) klass)->format_source = efhq_format_source; - ((EMFormatClass *) klass)->format_attachment = efhq_format_attachment; - - klass->finalize = efhq_finalise; -} - -GType -em_format_html_quote_get_type (void) -{ - static GType type = 0; - - if (type == 0) { - static const GTypeInfo info = { - sizeof (EMFormatHTMLQuoteClass), - (GBaseInitFunc)efhq_base_init, NULL, - (GClassInitFunc)efhq_class_init, - NULL, NULL, - sizeof (EMFormatHTMLQuote), 0, - (GInstanceInitFunc) efhq_init - }; - - efhq_parent = g_type_class_ref (em_format_html_get_type ()); - type = g_type_register_static (em_format_html_get_type (), "EMFormatHTMLQuote", &info, 0); - } - - return type; -} - -EMFormatHTMLQuote * -em_format_html_quote_new (void) -{ - return (EMFormatHTMLQuote *) g_object_new (em_format_html_quote_get_type (), NULL); -} - -EMFormatHTMLQuote * -em_format_html_quote_new_with_credits (const char *credits) -{ - EMFormatHTMLQuote *emfq; - - emfq = (EMFormatHTMLQuote *) g_object_new (em_format_html_quote_get_type (), NULL); - emfq->priv->credits = g_strdup (credits); - - return emfq; -} - -static void -efhq_format_clone (EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src) -{ - ((EMFormatClass *) efhq_parent)->format_clone (emf, folder, uid, msg, src); -} - -static void -efhq_format_error (EMFormat *emf, CamelStream *stream, const char *txt) -{ - /* FIXME: should we even bother writign error text for quoting? probably not... */ - ((EMFormatClass *) efhq_parent)->format_error (emf, stream, txt); -} - -static void -efhq_format_message (EMFormat *emf, CamelStream *stream, CamelMedium *part) -{ - EMFormatHTMLQuote *emfq = (EMFormatHTMLQuote *) emf; - - camel_stream_printf (stream, "%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n" - "<font color=\"#%06x\">\n" - "<blockquote type=cite>\n", - emfq->priv->credits ? emfq->priv->credits : "", - emfq->formathtml.citation_colour); - - if (!((EMFormatHTML *)emf)->hide_headers) - em_format_html_format_headers((EMFormatHTML *)emf, stream, part); - - em_format_part(emf, stream, (CamelMimePart *)part); - - camel_stream_write_string (stream, "</blockquote></font><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->"); -} - -static void -efhq_format_source (EMFormat *emf, CamelStream *stream, CamelMimePart *part) -{ - /* FIXME: should we just format_message? */ - ((EMFormatClass *) efhq_parent)->format_source (emf, stream, part); -} - -static void -efhq_format_attachment (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle) -{ - ; -} - -#include <camel/camel-medium.h> -#include <camel/camel-mime-part.h> -#include <camel/camel-multipart.h> -#include <camel/camel-url.h> - -static void -efhq_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) -{ - CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); - CamelMimePart *body_part, *display_part = NULL; - CamelContentType *content_type; - const char *location, *start; - int i, nparts, partidlen, displayid = 0; - CamelURL *base_save = NULL; - - if (!CAMEL_IS_MULTIPART(mp)) { - em_format_format_source(emf, stream, part); - return; - } - - /* sigh, so much for oo code reuse ... */ - /* FIXME: put in a function */ - nparts = camel_multipart_get_number(mp); - content_type = camel_mime_part_get_content_type(part); - start = camel_content_type_param (content_type, "start"); - if (start && strlen(start)>2) { - int len; - const char *cid; - - /* strip <>'s */ - len = strlen (start) - 2; - start++; - - for (i=0; i<nparts; i++) { - body_part = camel_multipart_get_part(mp, i); - cid = camel_mime_part_get_content_id(body_part); - - if (cid && !strncmp(cid, start, len) && strlen(cid) == len) { - display_part = body_part; - displayid = i; - break; - } - } - } else { - display_part = camel_multipart_get_part(mp, 0); - } - - if (display_part == NULL) { - em_format_part_as(emf, stream, part, "multipart/mixed"); - return; - } - - /* stack of present location and pending uri's */ - location = camel_mime_part_get_content_location(part); - if (location) { - base_save = emf->base; - emf->base = camel_url_new(location, NULL); - } - em_format_push_level(emf); - - partidlen = emf->part_id->len; - g_string_append_printf(emf->part_id, "related.%d", displayid); - em_format_part(emf, stream, display_part); - g_string_truncate(emf->part_id, partidlen); - - em_format_pull_level(emf); - - if (location) { - camel_url_free(emf->base); - emf->base = base_save; - } -} - -static const char *type_remove_table[] = { - "image/gif", - "image/jpeg", - "image/png", - "image/x-png", - "image/tiff", - "image/x-bmp", - "image/bmp", - "image/x-cmu-raster", - "image/x-portable-anymap", - "image/x-portable-bitmap", - "image/x-portable-graymap", - "image/x-portable-pixmap", - "image/x-xpixmap", - "message/external-body", - "multipart/appledouble", - "multipart/signed", - - "image/jpg", - "image/pjpeg", -}; - -static EMFormatHandler type_builtin_table[] = { - { "multipart/related", (EMFormatFunc)efhq_multipart_related }, -}; - -static void -efhq_builtin_init (EMFormatHTMLQuoteClass *efhc) -{ - int i; - - for (i = 0; i < sizeof (type_remove_table) / sizeof (type_remove_table[0]); i++) - em_format_class_remove_handler ((EMFormatClass *) efhc, type_remove_table[i]); - - for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) - em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]); -} diff --git a/mail/em-format-html-quote.h b/mail/em-format-html-quote.h deleted file mode 100644 index 1422b04093..0000000000 --- a/mail/em-format-html-quote.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Jeffrey Stedfast <fejj@ximian.com> - * - * Copyright 2003 Ximian, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - - -#ifndef _EM_FORMAT_HTML_QUOTE_H -#define _EM_FORMAT_HTML_QUOTE_H - -#include "em-format-html.h" - -typedef struct _EMFormatHTMLQuote EMFormatHTMLQuote; -typedef struct _EMFormatHTMLQuoteClass EMFormatHTMLQuoteClass; - -struct _EMFormatHTMLQuote { - EMFormatHTML formathtml; - - struct _EMFormatHTMLQuotePrivate *priv; -}; - -struct _EMFormatHTMLQuoteClass { - EMFormatHTMLClass formathtml_class; - -}; - -GType em_format_html_quote_get_type (void); - -EMFormatHTMLQuote *em_format_html_quote_new (void); - -EMFormatHTMLQuote *em_format_html_quote_new_with_credits (const char *cedits); - -#endif /* !_EM_FORMAT_HTML_QUOTE_H */ diff --git a/mail/em-utils.c b/mail/em-utils.c index 82a5d73f4f..fe7b30e7c5 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1063,6 +1063,8 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder) g_free(tmp); for (i=0;res == 0 && uris[i];i++) { g_strstrip(uris[i]); + if (uris[i][0] == '#') + continue; url = camel_url_new(uris[i], NULL); if (url == NULL) diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c index 293c5bc3d9..87620e7ecd 100644 --- a/mail/mail-component-factory.c +++ b/mail/mail-component-factory.c @@ -49,7 +49,6 @@ #define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION #define COMPOSER_ID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION #define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION -#define MAIL_CONFIG_ID "OAFIID:GNOME_Evolution_MailConfig:" BASE_VERSION #define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard:" BASE_VERSION static BonoboObject * @@ -62,8 +61,6 @@ factory(BonoboGenericFactory *factory, const char *component_id, void *closure) bonobo_object_ref (BONOBO_OBJECT (component)); return BONOBO_OBJECT (component); - } else if (strcmp(component_id, MAIL_CONFIG_ID) == 0) { - return (BonoboObject *)g_object_new (evolution_mail_config_get_type (), NULL); } else if (strcmp(component_id, WIZARD_ID) == 0) { return evolution_mail_config_wizard_new(); } else if (strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID) == 0 diff --git a/mail/message-list.c b/mail/message-list.c index c332b23f1b..8dee97030b 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -107,7 +107,7 @@ static struct { enum { DND_X_UID_LIST, /* x-uid-list */ DND_MESSAGE_RFC822, /* message/rfc822 */ - DND_TEXT_URI_LIST /* text/uri-list */ + DND_TEXT_URI_LIST, /* text/uri-list */ }; /* What we send */ |