From 7b887ab330e6e00b46d260ebdfe512cdf9e9494f Mon Sep 17 00:00:00 2001 From: Harry Lu Date: Wed, 2 Jul 2003 21:24:03 +0000 Subject: Fixes #44485 2003-07-02 Harry Lu Fixes #44485 * gui/e-timezone-entry.c (e_timezone_entry_set_entry): pass a new allocated string to gtk_entry_set_text instead of the one that might come from gettext. svn path=/trunk/; revision=21728 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/e-timezone-entry.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index bc7aee4d24..89c8ab8329 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2003-07-02 Harry Lu + + Fixes #44485 + + * gui/e-timezone-entry.c (e_timezone_entry_set_entry): pass a + new allocated string to gtk_entry_set_text instead of the one + that might come from gettext. + 2003-07-02 Dan Winship * cal-client/cal-client.c (real_open_calendar): Don't leak diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 6d514ccc93..c23cc3e03b 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -269,6 +269,7 @@ e_timezone_entry_set_entry (ETimezoneEntry *tentry) { ETimezoneEntryPrivate *priv; const char *display_name; + char *name_buffer; priv = tentry->priv; @@ -284,11 +285,15 @@ e_timezone_entry_set_entry (ETimezoneEntry *tentry) } else display_name = ""; - gtk_entry_set_text (GTK_ENTRY (priv->entry), display_name); + name_buffer = g_strdup (display_name); + + gtk_entry_set_text (GTK_ENTRY (priv->entry), name_buffer); if (!priv->default_zone || (priv->zone != priv->default_zone)) gtk_widget_show (priv->entry); else gtk_widget_hide (priv->entry); + + g_free (name_buffer); } -- cgit v1.2.3