From fb023e8c096f00ef0887e437c5cd596d99a19dfa Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 11 Jun 2005 02:27:19 +0000 Subject: [PATCH] Don't modify strings returned from gettext(). 2005-06-10 Matthias Clasen * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): Don't modify strings returned from gettext(). --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkaccellabel.c | 9 +++++++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d51fc42033..91b7b97c2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-10 Matthias Clasen + + * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): + Don't modify strings returned from gettext(). + Fri Jun 10 19:06:03 2005 Manish Singh * gtk/gtktextdisplay.c (render_para): don't use deprecated diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d51fc42033..91b7b97c2d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-06-10 Matthias Clasen + + * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): + Don't modify strings returned from gettext(). + Fri Jun 10 19:06:03 2005 Manish Singh * gtk/gtktextdisplay.c (render_para): don't use deprecated diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d51fc42033..91b7b97c2d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-06-10 Matthias Clasen + + * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): + Don't modify strings returned from gettext(). + Fri Jun 10 19:06:03 2005 Manish Singh * gtk/gtktextdisplay.c (render_para): don't use deprecated diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 88f9dad49b..cca5d342f9 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -597,12 +597,17 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass, else { gchar msg[128]; + gchar *str; strcpy (msg, "keyboard label|"); g_strlcat (msg, tmp, 128); - tmp = g_strip_context (msg, dgettext (GETTEXT_PACKAGE, msg)); - substitute_underscores (tmp); + str = dgettext (GETTEXT_PACKAGE, msg); + if (str == msg) + substitute_underscores (tmp); + else + tmp = str; } + g_string_append (gstring, tmp); }