aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-druid.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-29 08:18:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-29 08:18:43 +0800
commit8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33 (patch)
tree870e8ba249aa39be9b91bca48dec2db0277328e2 /mail/mail-config-druid.c
parent5393a574bf5971a698475d6a637a31c7f0fef03b (diff)
downloadgsoc2013-evolution-8e1a4026c9c7a37e8c8fa17af647fb99ebaa1f33.tar.gz
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-config-druid.c')
-rw-r--r--mail/mail-config-druid.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 954dafe4be..908eb01498 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -24,6 +24,7 @@
#include <glade/glade.h>
#include <gtkhtml/gtkhtml.h>
+#include <gal/widgets/e-unicode.h>
#include "mail-config-druid.h"
#include "mail-config.h"
#include "mail-ops.h"
@@ -727,11 +728,13 @@ static void
management_prepare (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
{
MailConfigDruid *config = data;
- const char *name;
+ char *name;
- name = gtk_entry_get_text (config->email_address);
- if (name)
- gtk_entry_set_text (config->account_name, name);
+ name = e_utf8_gtk_entry_get_text (config->email_address);
+ if (name) {
+ e_utf8_gtk_entry_set_text (config->account_name, name);
+ g_free (name);
+ }
management_check (config);
}
@@ -780,8 +783,10 @@ set_defaults (MailConfigDruid *druid)
/* set the default Name field */
realname = g_get_real_name ();
- if (realname)
- gtk_entry_set_text (druid->full_name, realname);
+ if (realname) {
+ e_utf8_gtk_entry_set_text (druid->full_name, realname);
+ g_free (realname);
+ }
/* set the default E-Mail Address field */
user = getenv ("USER");
@@ -1079,7 +1084,7 @@ mail_config_druid_get_account_name (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), NULL);
- return g_strdup (gtk_entry_get_text (druid->account_name));
+ return e_utf8_gtk_entry_get_text (druid->account_name);
}
@@ -1097,7 +1102,7 @@ mail_config_druid_get_full_name (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), NULL);
- return g_strdup (gtk_entry_get_text (druid->full_name));
+ return e_utf8_gtk_entry_get_text (druid->full_name);
}
@@ -1106,7 +1111,7 @@ mail_config_druid_get_email_address (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), NULL);
- return g_strdup (gtk_entry_get_text (druid->email_address));
+ return e_utf8_gtk_entry_get_text (druid->email_address);
}
@@ -1115,7 +1120,7 @@ mail_config_druid_get_organization (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), NULL);
- return g_strdup (gtk_entry_get_text (druid->organization));
+ return e_utf8_gtk_entry_get_text (druid->organization);
}