From 728505319e43258b4cd81b6010f7d3cbfe8606b3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 19 Sep 2001 22:27:26 +0000 Subject: Convert the names to the locale charset. 2001-09-19 Jeffrey Stedfast * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Convert the names to the locale charset. svn path=/trunk/; revision=12994 --- mail/mail-callbacks.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index f2ff840711..70e06df2f8 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -206,39 +206,44 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip GString *str; GtkWidget *mbox; gint i, button; - - if (! mail_config_get_confirm_unwanted_html ()) { + + if (!mail_config_get_confirm_unwanted_html ()) { g_message ("doesn't want to see confirm html messages!"); return TRUE; } - + /* FIXME: this wording sucks */ - str = g_string_new (_("You are sending an HTML-formatted mail, but the following recipients' " - "contact records do not indicate that they want to receive such messages:\n")); + str = g_string_new (_("You are sending an HTML-formatted message, but the following recipients " + "do not want HTML-formatted mail:\n")); for (i = 0; recipients[i] != NULL; ++i) { - if (! e_destination_get_html_mail_pref (recipients[i])) { - gchar *name = g_strdup_printf (" %s\n", e_destination_get_textrep (recipients[i])); - g_string_append (str, name); + if (!e_destination_get_html_mail_pref (recipients[i])) { + char *buf, *name; + + name = e_destination_get_textrep (recipients[i]); + buf = e_utf8_to_locale_string (name); g_free (name); + + g_string_sprintfa (str, " %s\n", buf); + g_free (buf); } } - + g_string_append (str, _("Send anyway?")); - + mbox = e_message_box_new (str->str, E_MESSAGE_BOX_QUESTION, GNOME_STOCK_BUTTON_YES, GNOME_STOCK_BUTTON_NO, NULL); - - g_string_free (str, 0); - + + g_string_free (str, TRUE); + gtk_signal_connect (GTK_OBJECT (mbox), "destroy", msgbox_destroyed, &show_again); button = gnome_dialog_run_and_close (GNOME_DIALOG (mbox)); - if (! show_again) { + if (!show_again) { mail_config_set_confirm_unwanted_html (show_again); g_message ("don't show HTML warning again"); } -- cgit v1.2.3