Commit 3cec6416 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

do like GtkAccelLabel does and turn underscores in accels into spaces so

2004-06-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimptoolbox.c (gimp_toolbox_button_accel_changed):
	do like GtkAccelLabel does and turn underscores in accels into
	spaces so e.g. "Page_Up" becomes "Page Up".
parent 4685112c
2004-06-30 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptoolbox.c (gimp_toolbox_button_accel_changed):
do like GtkAccelLabel does and turn underscores in accels into
spaces so e.g. "Page_Up" becomes "Page Up".
2004-06-29 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c: reordered drop destinations
......
......@@ -569,6 +569,16 @@ gimp_toolbox_button_accel_find_func (GtkAccelKey *key,
return (GClosure *) data == closure;
}
static void
gimp_toolbox_substitute_underscores (gchar *str)
{
gchar *p;
for (p = str; *p; p++)
if (*p == '_')
*p = ' ';
}
static void
gimp_toolbox_button_accel_changed (GtkAccelGroup *accel_group,
guint unused1,
......@@ -655,6 +665,7 @@ gimp_toolbox_button_accel_changed (GtkAccelGroup *accel_group,
tmp = gtk_accelerator_name (accel_key->accel_key, 0);
if (tmp[0] != 0 && tmp[1] == 0)
tmp[0] = g_ascii_toupper (tmp[0]);
gimp_toolbox_substitute_underscores (tmp);
g_string_append (gstring, tmp);
g_free (tmp);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment