From 2e731573fba05a9848808a359d757734ad24a607 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 7 May 2008 02:17:18 +0000 Subject: ** Fixes part of bug #424744 2008-05-06 Matthew Barnes ** Fixes part of bug #424744 * configure.in: Bump eds_minimum_version to 2.23.2 for camel-iconv.h. * composer/e-composer-private.c: * composer/e-composer-private.h: * composer/e-msg-composer.c: * mail/em-composer-prefs.c: * mail/em-format-html.c: * mail/em-format-quote.c: * mail/em-mailer-prefs.c: * widgets/misc/e-attachment-bar.c: * widgets/misc/e-unicode.c: Use camel-iconv.c instead of e-iconv.h (now deprecated). svn path=/trunk/; revision=35474 --- ChangeLog | 5 +++++ composer/ChangeLog | 9 +++++++++ composer/e-composer-private.c | 2 +- composer/e-composer-private.h | 2 +- composer/e-msg-composer.c | 9 +++++---- configure.in | 2 +- mail/ChangeLog | 10 ++++++++++ mail/em-composer-prefs.c | 7 ++++--- mail/em-format-html.c | 4 ++-- mail/em-format-quote.c | 4 ++-- mail/em-mailer-prefs.c | 6 +++--- mail/em-migrate.c | 1 - mail/em-subscribe-editor.c | 1 + mail/mail-folder-cache.c | 1 + widgets/misc/ChangeLog | 8 ++++++++ widgets/misc/e-attachment-bar.c | 4 ++-- widgets/misc/e-unicode.c | 22 +++++++++++----------- 17 files changed, 66 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9fe65a572..f0346f1cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-06 Matthew Barnes + + * configure.in: + Bump eds_minimum_version to 2.23.2 for camel-iconv.h. + 2008-04-30 Rob Bradford * configure.in: diff --git a/composer/ChangeLog b/composer/ChangeLog index 66a86b07f0..6622aec517 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,12 @@ +2008-05-06 Matthew Barnes + + ** Fixes part of bug #424744 + + * e-composer-private.c: + * e-composer-private.h: + * e-msg-composer.c: + Use camel-iconv.c instead of e-iconv.h (now deprecated). + 2008-04-28 Matthew Barnes * e-composer-actions.c (action_send_options_cb): diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index 55c1a824e9..a7b29e51e2 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -314,7 +314,7 @@ e_composer_get_default_charset (void) g_object_unref (client); if (charset == NULL) - charset = g_strdup (e_iconv_locale_charset ()); + charset = g_strdup (camel_iconv_locale_charset ()); if (charset == NULL) charset = g_strdup ("us-ascii"); diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h index 5381dac80d..c5ff291cc6 100644 --- a/composer/e-composer-private.h +++ b/composer/e-composer-private.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include "e-attachment-bar.h" #include "e-composer-actions.h" diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 276db10ce8..2aaffba0d4 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -76,6 +76,7 @@ #include #include +#include #include #include #include @@ -255,7 +256,7 @@ best_encoding (GByteArray *buf, const gchar *charset) if (!charset) return -1; - cd = e_iconv_open (charset, "utf-8"); + cd = camel_iconv_open (charset, "utf-8"); if (cd == (iconv_t) -1) return -1; @@ -264,13 +265,13 @@ best_encoding (GByteArray *buf, const gchar *charset) do { out = outbuf; outlen = sizeof (outbuf); - status = e_iconv (cd, (const gchar **) &in, &inlen, &out, &outlen); + status = camel_iconv (cd, (const gchar **) &in, &inlen, &out, &outlen); for (ch = out - 1; ch >= outbuf; ch--) { if ((guchar) *ch > 127) count++; } } while (status == (gsize) -1 && errno == E2BIG); - e_iconv_close (cd); + camel_iconv_close (cd); if (status == (gsize) -1 || status > 0) return -1; @@ -619,7 +620,7 @@ build_message (EMsgComposer *composer, type = camel_content_type_new ("text", "plain"); if ((charset = best_charset (data, p->charset, &plain_encoding))) { camel_content_type_set_param (type, "charset", charset); - iconv_charset = e_iconv_charset_name (charset); + iconv_charset = camel_iconv_charset_name (charset); g_free (charset); } } diff --git a/configure.in b/configure.in index f31af39609..467154883b 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ GTKHTML_PACKAGE=3.14 # Required Packages m4_define([glib_minimum_version], [2.16.0]) m4_define([gtk_minimum_version], [2.12.0]) -m4_define([eds_minimum_version], [2.23.1]) +m4_define([eds_minimum_version], [2.23.2]) m4_define([gnome_icon_theme_minimum_version], [2.19.91]) m4_define([libbonobo_minimum_version], [2.20.3]) m4_define([libbonoboui_minimum_version], [2.4.2]) diff --git a/mail/ChangeLog b/mail/ChangeLog index a2a0b7e318..a46dbef5d2 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2008-05-06 Matthew Barnes + + ** Fixes part of bug #424744 + + * em-composer-prefs.c: + * em-format-html.c: + * em-format-quote.c: + * em-mailer-prefs.c: + Use camel-iconv.c instead of e-iconv.h (now deprecated). + 2008-05-06 Matthew Barnes * mail-component.c (mail_component_show_logger): diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 118bfb6a3c..dc7b3b9c4c 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -39,7 +39,8 @@ #include -#include +#include + #include #include @@ -760,7 +761,7 @@ charset_activate (GtkWidget *item, string = e_charset_picker_get_charset (menu); if (string == NULL) - string = g_strdup (e_iconv_locale_charset ()); + string = g_strdup (camel_iconv_locale_charset ()); gconf_client_set_string ( client, "/apps/evolution/mail/composer/charset", @@ -950,7 +951,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) buf = gconf_client_get_string ( client, "/apps/evolution/mail/composer/charset", NULL); menu = e_charset_picker_new ( - buf && *buf ? buf : e_iconv_locale_charset ()); + buf && *buf ? buf : camel_iconv_locale_charset ()); gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu)); option_menu_connect ( prefs, prefs->charset, diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 12fd050157..467d84c0e6 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -41,7 +41,6 @@ #undef interface #endif -#include #include /* for e_utf8_strftime, what about e_time_format_time? */ #include #include "e-util/e-icon-factory.h" @@ -54,6 +53,7 @@ #include +#include #include #include #include @@ -1847,7 +1847,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) ct = camel_mime_part_get_content_type((CamelMimePart *)part); charset = camel_content_type_param (ct, "charset"); - charset = e_iconv_charset_name(charset); + charset = camel_iconv_charset_name(charset); if (!efh->simple_headers) camel_stream_printf(stream, diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c index 401801b510..059c2c98dc 100644 --- a/mail/em-format-quote.c +++ b/mail/em-format-quote.c @@ -26,6 +26,7 @@ #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include -#include #include #include @@ -379,7 +379,7 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part ct = camel_mime_part_get_content_type ((CamelMimePart *) part); charset = camel_content_type_param (ct, "charset"); - charset = e_iconv_charset_name (charset); + charset = camel_iconv_charset_name (charset); /* dump selected headers */ h = (EMFormatHeader *) emf->header_list.head; diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 40b6188659..6616cfcc48 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -29,7 +29,7 @@ #include "em-mailer-prefs.h" #include "em-format.h" -#include +#include #include #include #include "misc/e-charset-picker.h" @@ -909,7 +909,7 @@ charset_activate (GtkWidget *item, EMMailerPrefs *prefs) menu = gtk_option_menu_get_menu (prefs->charset); if (!(string = e_charset_picker_get_charset (menu))) - string = g_strdup (e_iconv_locale_charset ()); + string = g_strdup (camel_iconv_locale_charset ()); gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/charset", string, NULL); g_free (string); @@ -923,7 +923,7 @@ charset_menu_init (EMMailerPrefs *prefs) char *buf; buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL); - menu = e_charset_picker_new (buf && *buf ? buf : e_iconv_locale_charset ()); + menu = e_charset_picker_new (buf && *buf ? buf : camel_iconv_locale_charset ()); gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu)); g_free (buf); diff --git a/mail/em-migrate.c b/mail/em-migrate.c index c0dc7797f0..cfb4a5f435 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -58,7 +58,6 @@ #include #include -#include #include #include "e-util/e-bconf-map.h" diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index 60e0a921b0..014c43c3f4 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -37,6 +37,7 @@ #include "camel/camel-store.h" #include "camel/camel-session.h" #include "libedataserver/e-account-list.h" +#include "libedataserver/e-msgport.h" #include "e-util/e-util-private.h" #include "em-subscribe-editor.h" diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 1c1ad89a89..bb1c36827c 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -47,6 +47,7 @@ #include #include +#include #include "e-util/e-util.h" #include "mail-mt.h" diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 4b91f93784..ce075694a7 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,11 @@ +2008-05-06 Matthew Barnes + + ** Fixes part of bug #424744 + + * e-attachment-bar.c: + * e-unicode.c: + Use camel-iconv.c instead of e-iconv.h (now deprecated). + 2008-04-30 Milan Crha ** Part of fix for bug #528288 diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index 81eae05193..3acfd0d23e 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -39,10 +39,10 @@ #include "e-attachment.h" #include "e-attachment-bar.h" -#include #include #include +#include #include #include #include @@ -1086,7 +1086,7 @@ get_default_charset (void) g_object_unref (gconf); - if (!charset && (locale = e_iconv_locale_charset ())) + if (!charset && (locale = camel_iconv_locale_charset ())) charset = g_strdup (locale); return charset ? charset : g_strdup ("us-ascii"); diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c index 5aec40a125..1731c0934e 100644 --- a/widgets/misc/e-unicode.c +++ b/widgets/misc/e-unicode.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include "e-unicode.h" @@ -260,7 +260,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) obl = ibl * 6; while (ibl > 0) { - e_iconv (ic, &ib, &ibl, &ob, &obl); + camel_iconv (ic, &ib, &ibl, &ob, &obl); if (ibl > 0) { gint len; if ((*ib & 0x80) == 0x00) len = 1; @@ -323,7 +323,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) obl = ibl * 4; while (ibl > 0) { - e_iconv (ic, &ib, &ibl, &ob, &obl); + camel_iconv (ic, &ib, &ibl, &ob, &obl); if (ibl > 0) { gint len; if ((*ib & 0x80) == 0x00) len = 1; @@ -365,9 +365,9 @@ e_utf8_from_charset_string_sized (const gchar *charset, const gchar *string, gin if (!string) return NULL; - ic = e_iconv_open("utf-8", charset); + ic = camel_iconv_open("utf-8", charset); ret = e_utf8_from_iconv_string_sized (ic, string, bytes); - e_iconv_close(ic); + camel_iconv_close(ic); return ret; } @@ -387,9 +387,9 @@ e_utf8_to_charset_string_sized (const gchar *charset, const gchar *string, gint if (!string) return NULL; - ic = e_iconv_open(charset, "utf-8"); + ic = camel_iconv_open(charset, "utf-8"); ret = e_utf8_to_iconv_string_sized (ic, string, bytes); - e_iconv_close(ic); + camel_iconv_close(ic); return ret; } @@ -409,9 +409,9 @@ e_utf8_from_locale_string_sized (const gchar *string, gint bytes) if (!string) return NULL; - ic = e_iconv_open("utf-8", e_iconv_locale_charset()); + ic = camel_iconv_open("utf-8", camel_iconv_locale_charset()); ret = e_utf8_from_iconv_string_sized (ic, string, bytes); - e_iconv_close(ic); + camel_iconv_close(ic); return ret; } @@ -431,9 +431,9 @@ e_utf8_to_locale_string_sized (const gchar *string, gint bytes) if (!string) return NULL; - ic = e_iconv_open(e_iconv_locale_charset(), "utf-8"); + ic = camel_iconv_open(camel_iconv_locale_charset(), "utf-8"); ret = e_utf8_to_iconv_string_sized (ic, string, bytes); - e_iconv_close(ic); + camel_iconv_close(ic); return ret; } -- cgit