mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
2005-06-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
This commit is contained in:
parent
7c885b9057
commit
9962a15cba
@ -1,5 +1,8 @@
|
||||
2005-06-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
|
||||
Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (model_update_current_folder):
|
||||
Free the data of the row before overwriting it. (#307490,
|
||||
Kjartan Maraas)
|
||||
|
@ -1,5 +1,8 @@
|
||||
2005-06-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
|
||||
Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (model_update_current_folder):
|
||||
Free the data of the row before overwriting it. (#307490,
|
||||
Kjartan Maraas)
|
||||
|
@ -1,5 +1,8 @@
|
||||
2005-06-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
|
||||
Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (model_update_current_folder):
|
||||
Free the data of the row before overwriting it. (#307490,
|
||||
Kjartan Maraas)
|
||||
|
@ -590,25 +590,27 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
|
||||
gchar *tmp;
|
||||
|
||||
tmp = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
|
||||
if (tmp == NULL)
|
||||
tmp = "";
|
||||
else if (tmp[0] != 0 && tmp[1] == 0)
|
||||
tmp[0] = g_ascii_toupper (tmp[0]);
|
||||
else
|
||||
if (tmp != NULL)
|
||||
{
|
||||
gchar msg[128];
|
||||
gchar *str;
|
||||
|
||||
strcpy (msg, "keyboard label|");
|
||||
g_strlcat (msg, tmp, 128);
|
||||
str = dgettext (GETTEXT_PACKAGE, msg);
|
||||
if (str == msg)
|
||||
substitute_underscores (tmp);
|
||||
if (tmp[0] != 0 && tmp[1] == 0)
|
||||
g_string_append_c (gstring, g_ascii_toupper (tmp[0]));
|
||||
else
|
||||
tmp = str;
|
||||
{
|
||||
gchar msg[128];
|
||||
gchar *str;
|
||||
|
||||
strcpy (msg, "keyboard label|");
|
||||
g_strlcat (msg, tmp, 128);
|
||||
str = dgettext (GETTEXT_PACKAGE, msg);
|
||||
if (str == msg)
|
||||
{
|
||||
g_string_append (gstring, tmp);
|
||||
substitute_underscores (gstring->str);
|
||||
}
|
||||
else
|
||||
g_string_append (gstring, str);
|
||||
}
|
||||
}
|
||||
|
||||
g_string_append (gstring, tmp);
|
||||
}
|
||||
|
||||
return g_string_free (gstring, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user