diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-01-29 08:18:43 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-29 08:18:43 +0800 |
commit | 8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33 (patch) | |
tree | 870e8ba249aa39be9b91bca48dec2db0277328e2 /mail/mail-account-editor.c | |
parent | 5393a574bf5971a698475d6a637a31c7f0fef03b (diff) | |
download | gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.gz gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.bz2 gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.lz gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.xz gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.zst gsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.zip |
Use UTF-8. (set_defaults): Use UTF-8 and also fixed a memory leak by
2001-01-28 Jeffrey Stedfast <fejj@ximian.com>
* mail-config-druid.c (management_prepare): Use UTF-8.
(set_defaults): Use UTF-8 and also fixed a memory leak by freeing
the string returned by g_get_real_name().
(mail_config_druid_get_account_name): Use UTF-8.
(mail_config_druid_get_full_name): Same.
(mail_config_druid_get_email_address): Same.
(mail_config_druid_get_organization): Same.
* mail-account-editor.c (apply_changes): Save UTF-8 strings rather
than gtk strings.
(construct): Use the UTF-8 convenience functions to set the gtk
entries for the ID fields.
svn path=/trunk/; revision=7881
Diffstat (limited to 'mail/mail-account-editor.c')
-rw-r--r-- | mail/mail-account-editor.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c index 86ebe95d2d..339d6cc737 100644 --- a/mail/mail-account-editor.c +++ b/mail/mail-account-editor.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <string.h> #include <camel/camel-url.h> +#include <gal/widgets/e-unicode.h> static void mail_account_editor_class_init (MailAccountEditorClass *class); static void mail_account_editor_init (MailAccountEditor *editor); @@ -117,24 +118,24 @@ apply_changes (MailAccountEditor *editor) /* account name */ if (editor->account_name) { g_free (account->name); - account->name = g_strdup (gtk_entry_get_text (editor->account_name)); + account->name = e_utf8_gtk_entry_get_text (editor->account_name); } /* identity info */ g_free (account->id->name); - account->id->name = g_strdup (gtk_entry_get_text (editor->name)); + account->id->name = e_utf8_gtk_entry_get_text (editor->name); g_free (account->id->address); - account->id->address = g_strdup (gtk_entry_get_text (editor->email)); + account->id->address = e_utf8_gtk_entry_get_text (editor->email); if (editor->reply_to) { g_free (account->id->reply_to); - account->id->reply_to = g_strdup (gtk_entry_get_text (editor->reply_to)); + account->id->reply_to = e_utf8_gtk_entry_get_text (editor->reply_to); } if (editor->organization) { g_free (account->id->organization); - account->id->organization = g_strdup (gtk_entry_get_text (editor->organization)); + account->id->organization = e_utf8_gtk_entry_get_text (editor->organization); } if (editor->signature) { @@ -643,20 +644,20 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account) /* General */ editor->account_name = GTK_ENTRY (glade_xml_get_widget (gui, "txtAccountName")); - gtk_entry_set_text (editor->account_name, account->name); + e_utf8_gtk_entry_set_text (editor->account_name, account->name); gtk_signal_connect (GTK_OBJECT (editor->account_name), "changed", entry_changed, editor); editor->name = GTK_ENTRY (glade_xml_get_widget (gui, "txtName")); - gtk_entry_set_text (editor->name, account->id->name); + e_utf8_gtk_entry_set_text (editor->name, account->id->name); gtk_signal_connect (GTK_OBJECT (editor->name), "changed", entry_changed, editor); editor->email = GTK_ENTRY (glade_xml_get_widget (gui, "txtAddress")); - gtk_entry_set_text (editor->email, account->id->address); + e_utf8_gtk_entry_set_text (editor->email, account->id->address); gtk_signal_connect (GTK_OBJECT (editor->email), "changed", entry_changed, editor); editor->reply_to = GTK_ENTRY (glade_xml_get_widget (gui, "txtReplyTo")); if (editor->reply_to) - gtk_entry_set_text (editor->reply_to, account->id->reply_to ? account->id->reply_to : ""); + e_utf8_gtk_entry_set_text (editor->reply_to, account->id->reply_to ? account->id->reply_to : ""); editor->organization = GTK_ENTRY (glade_xml_get_widget (gui, "txtOrganization")); if (editor->organization) - gtk_entry_set_text (editor->organization, account->id->organization); + e_utf8_gtk_entry_set_text (editor->organization, account->id->organization); editor->signature = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileSignature")); if (editor->signature) { entry = gnome_file_entry_gtk_entry (editor->signature); |