mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
backends: Add action label to mode switch buttons
https://bugzilla.gnome.org/show_bug.cgi?id=771098
This commit is contained in:
parent
07ce981cb0
commit
efd9d467f2
@ -1715,12 +1715,23 @@ meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_setti
|
||||
guint button)
|
||||
{
|
||||
GDesktopPadButtonAction action;
|
||||
gint group;
|
||||
|
||||
g_return_val_if_fail (META_IS_INPUT_SETTINGS (input_settings), NULL);
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad), NULL);
|
||||
g_return_val_if_fail (clutter_input_device_get_device_type (pad) ==
|
||||
CLUTTER_PAD_DEVICE, NULL);
|
||||
|
||||
group = clutter_input_device_get_mode_switch_button_group (pad, button);
|
||||
|
||||
if (group >= 0)
|
||||
{
|
||||
/* TRANSLATORS: This string refers to a button that switches between
|
||||
* different modes.
|
||||
*/
|
||||
return g_strdup_printf (_("Mode Switch (Group %d)"), group);
|
||||
}
|
||||
|
||||
action = meta_input_settings_get_pad_button_action (input_settings, pad, button);
|
||||
|
||||
switch (action)
|
||||
|
Loading…
Reference in New Issue
Block a user