mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Convert underscores in keyval names to spaces. (#131480)
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert underscores in keyval names to spaces. (#131480)
This commit is contained in:
parent
89a877800a
commit
b435c31d75
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert
|
||||
underscores in keyval names to spaces. (#131480)
|
||||
|
||||
Tue Feb 24 17:35:59 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/gtk-2.0.m4: Add some quotes around ***. (#130073,
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert
|
||||
underscores in keyval names to spaces. (#131480)
|
||||
|
||||
Tue Feb 24 17:35:59 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/gtk-2.0.m4: Add some quotes around ***. (#130073,
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert
|
||||
underscores in keyval names to spaces. (#131480)
|
||||
|
||||
Tue Feb 24 17:35:59 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/gtk-2.0.m4: Add some quotes around ***. (#130073,
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert
|
||||
underscores in keyval names to spaces. (#131480)
|
||||
|
||||
Tue Feb 24 17:35:59 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/gtk-2.0.m4: Add some quotes around ***. (#130073,
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert
|
||||
underscores in keyval names to spaces. (#131480)
|
||||
|
||||
Tue Feb 24 17:35:59 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* m4macros/gtk-2.0.m4: Add some quotes around ***. (#130073,
|
||||
|
@ -503,6 +503,19 @@ gtk_accel_label_get_string (GtkAccelLabel *accel_label)
|
||||
return accel_label->accel_string;
|
||||
}
|
||||
|
||||
/* Underscores in key names are better displayed as spaces
|
||||
* E.g., Page_Up should be "Page Up"
|
||||
*/
|
||||
static void
|
||||
substitute_underscores (char *str)
|
||||
{
|
||||
char *p;
|
||||
|
||||
for (p = str; *p; p++)
|
||||
if (*p == '_')
|
||||
*p = ' ';
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_accel_label_refetch (GtkAccelLabel *accel_label)
|
||||
{
|
||||
@ -577,6 +590,7 @@ gtk_accel_label_refetch (GtkAccelLabel *accel_label)
|
||||
tmp = gtk_accelerator_name (key->accel_key, 0);
|
||||
if (tmp[0] != 0 && tmp[1] == 0)
|
||||
tmp[0] = g_ascii_toupper (tmp[0]);
|
||||
substitute_underscores (tmp);
|
||||
g_string_append (gstring, tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user