mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Display invalid accelerators as "Invalid" in GTK mode.
When in GTK_CELL_RENDERER_ACCEL_MODE_GTK, display accelerator key combinations that don't pass gtk_accelerator_valid() as "Invalid". Bug #572799.
This commit is contained in:
parent
0e99a5849e
commit
45d076fcc2
@ -244,7 +244,16 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel,
|
||||
else
|
||||
{
|
||||
if (accel->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK)
|
||||
return gtk_accelerator_get_label (keysym, mask);
|
||||
{
|
||||
if (!gtk_accelerator_valid (keysym, mask))
|
||||
/* This label is displayed in a treeview cell displaying
|
||||
* an accelerator key combination that is not valid according
|
||||
* to gtk_accelerator_valid().
|
||||
*/
|
||||
return g_strdup (C_("Accelerator", "Invalid"));
|
||||
|
||||
return gtk_accelerator_get_label (keysym, mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *name;
|
||||
|
Loading…
Reference in New Issue
Block a user