diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c index 7a3fb419b..dfca7c475 100644 --- a/panels/keyboard/cc-keyboard-panel.c +++ b/panels/keyboard/cc-keyboard-panel.c @@ -43,13 +43,13 @@ struct _CcKeyboardPanel GtkRadioButton *per_window_source; GtkRadioButton *same_source; - GtkLabel *value_input_switch; GSettings *keybindings_settings; /* "Type Special Characters" section */ CcXkbModifierDialog *alt_chars_dialog; CcXkbModifierDialog *compose_dialog; GSettings *input_source_settings; + GtkLabel *input_switch_description; GtkListBox *special_chars_list; GtkListBoxRow *alt_chars_row; GtkListBoxRow *compose_row; @@ -201,6 +201,7 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/keyboard/cc-keyboard-panel.ui"); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, input_source_list); + gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, input_switch_description); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, per_window_source); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, same_source); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, special_chars_list); @@ -208,7 +209,6 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass) gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, compose_row); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, value_alternate_chars); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, value_compose); - gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, value_input_switch); gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, common_shortcuts_row); gtk_widget_class_bind_template_callback (widget_class, special_chars_activated); @@ -221,13 +221,19 @@ translate_switch_input_source (GValue *value, gpointer user_data) { g_autofree const gchar **strv = NULL; + g_autofree gchar *accel_text = NULL; g_autofree gchar *label = NULL; CcKeyCombo combo = { 0 }; strv = g_variant_get_strv (variant, NULL); gtk_accelerator_parse (strv[0] ? strv[0] : "", &combo.keyval, &combo.mask); - label = convert_keysym_state_to_string (&combo); + accel_text = convert_keysym_state_to_string (&combo); + + label = g_strdup_printf (_("Input sources can be switched using the %s " + "keyboard shortcut.\nThis can be changed in " + "the keyboard shortcut settings."), + accel_text); g_value_set_string (value, label); @@ -265,10 +271,10 @@ cc_keyboard_panel_init (CcKeyboardPanel *self) G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN); self->keybindings_settings = g_settings_new ("org.gnome.desktop.wm.keybindings"); g_settings_bind_with_mapping (self->keybindings_settings, "switch-input-source", - self->value_input_switch, "label", - G_SETTINGS_BIND_GET, - translate_switch_input_source, - NULL, NULL, NULL); + self->input_switch_description, "label", + G_SETTINGS_BIND_GET, + translate_switch_input_source, + NULL, NULL, NULL); /* "Type Special Characters" section */ g_settings_bind_with_mapping (self->input_source_settings, diff --git a/panels/keyboard/cc-keyboard-panel.ui b/panels/keyboard/cc-keyboard-panel.ui index 532b53a01..9bc7f105d 100644 --- a/panels/keyboard/cc-keyboard-panel.ui +++ b/panels/keyboard/cc-keyboard-panel.ui @@ -36,14 +36,34 @@ 12 True - + True - False - 0 - Input Sources - - - + vertical + 6 + + + True + False + 0 + Input Sources + + + + + + + + True + False + 0 + Includes keyboard layouts and input methods. + True + 50 + + + @@ -59,14 +79,33 @@ - + True - False - 0 - Input Source Switching - - - + vertical + 6 + + + True + False + 0 + Input Source Switching + + + + + + + + True + False + 0 + True + 50 + + + @@ -130,34 +169,39 @@ - - - True - True - False - Keyboard Shortcut - This can be changed in Customize Shortcuts - - - True - True - - - - - + True - False - 0 - Type Special Characters - - - + vertical + 6 + + + True + False + 0 + Special Character Entry + + + + + + + + True + False + 0 + Methods for entering symbols and letter variants using the keyboard. + True + 50 + + + @@ -177,7 +221,6 @@ True True Alternate Characters Key - Hold down and type to enter different characters True @@ -250,7 +293,7 @@ True True - Customize Shortcuts + View and Customize Shortcuts True