diff options
Diffstat (limited to 'capplets')
-rw-r--r-- | capplets/keybindings/eggcellrendererkeys.c | 35 | ||||
-rw-r--r-- | capplets/keybindings/mate-keybinding-properties.ui | 2 | ||||
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-dialog.ui | 20 | ||||
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkb.c | 24 | ||||
-rw-r--r-- | capplets/windows/window-properties.ui | 5 |
5 files changed, 75 insertions, 11 deletions
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c index aa4c8e8a..5183fb7c 100644 --- a/capplets/keybindings/eggcellrendererkeys.c +++ b/capplets/keybindings/eggcellrendererkeys.c @@ -11,6 +11,8 @@ #define TOOLTIP_TEXT _("New shortcut...") +static void update_text (EggCellRendererKeys *keys); + static void egg_cell_renderer_keys_finalize (GObject *object); static void egg_cell_renderer_keys_init (EggCellRendererKeys *cell_keys); static void egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class); @@ -76,6 +78,8 @@ GType egg_cell_renderer_keys_get_type(void) static void egg_cell_renderer_keys_init(EggCellRendererKeys* cell_keys) { + g_signal_connect (cell_keys, "notify::visible", G_CALLBACK (update_text), NULL); + cell_keys->accel_mode = EGG_CELL_RENDERER_KEYS_MODE_GTK; } @@ -225,6 +229,27 @@ static gchar* convert_keysym_state_to_string(guint keysym, guint keycode, EggVir } } +static void update_text (EggCellRendererKeys *keys) +{ + gboolean visible; + + g_object_get (keys, "visible", &visible, NULL); + + /* For screen reader's sake, make the text empty when hidden, otherwise a + * more or less random value is presented. This could also be fixed in the + * accessibility implementation side, but we rely on GTK's, so it's easier + * to clean it up here than modify GTK or subclass it further. */ + if (! visible) + g_object_set (keys, "text", "", NULL); + else + { + /* sync string to the key values */ + gchar *text = convert_keysym_state_to_string (keys->accel_key, keys->keycode, keys->accel_mask); + g_object_set (keys, "text", text, NULL); + g_free (text); + } +} + static void egg_cell_renderer_keys_get_property (GObject *object, guint param_id, @@ -627,6 +652,8 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell, keys); eventbox = g_object_new (pointless_eventbox_subclass_get_type (), + "tooltip-text", _("Press the keys for the new accelerator, Backspace to clear, or Escape to cancel edition"), + "can-focus", TRUE, NULL); keys->edit_widget = eventbox; g_object_add_weak_pointer (G_OBJECT (keys->edit_widget), @@ -670,7 +697,6 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell, void egg_cell_renderer_keys_set_accelerator(EggCellRendererKeys* keys, guint keyval, guint keycode, EggVirtualModifierType mask) { - char *text; gboolean changed; g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys)); @@ -705,12 +731,7 @@ void egg_cell_renderer_keys_set_accelerator(EggCellRendererKeys* keys, guint key g_object_thaw_notify (G_OBJECT (keys)); if (changed) - { - /* sync string to the key values */ - text = convert_keysym_state_to_string (keys->accel_key, keys->keycode, keys->accel_mask); - g_object_set (keys, "text", text, NULL); - g_free (text); - } + update_text (keys); } void egg_cell_renderer_keys_get_accelerator(EggCellRendererKeys* keys, guint* keyval, EggVirtualModifierType* mask) diff --git a/capplets/keybindings/mate-keybinding-properties.ui b/capplets/keybindings/mate-keybinding-properties.ui index 7a986588..eb3a5a2f 100644 --- a/capplets/keybindings/mate-keybinding-properties.ui +++ b/capplets/keybindings/mate-keybinding-properties.ui @@ -336,7 +336,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">To edit a shortcut key, double-click on the corresponding row and type a new key combination, or press backspace to clear.</property> + <property name="label" translatable="yes">To edit a shortcut key, double-click or press Space or Enter on the corresponding row and type a new key combination, or press backspace to clear.</property> <property name="wrap">True</property> </object> <packing> diff --git a/capplets/keyboard/mate-keyboard-properties-dialog.ui b/capplets/keyboard/mate-keyboard-properties-dialog.ui index bed5a44f..d59710ec 100644 --- a/capplets/keyboard/mate-keyboard-properties-dialog.ui +++ b/capplets/keyboard/mate-keyboard-properties-dialog.ui @@ -830,6 +830,22 @@ <property name="position">1</property> </packing> </child> + <child> + <object class="GtkCheckButton" id="chk_load_extra_items"> + <property name="label" translatable="yes">_Include less-common layouts in the selections list</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="use-underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> <child> <object class="GtkCheckButton" id="chk_separate_group_per_window"> <property name="label" translatable="yes">_Separate layout for each window</property> @@ -843,7 +859,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">2</property> + <property name="position">3</property> </packing> </child> <child> @@ -859,7 +875,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> </object> diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c index d1dd7925..831203f0 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkb.c +++ b/capplets/keyboard/mate-keyboard-properties-xkb.c @@ -150,6 +150,18 @@ chk_separate_group_per_window_toggled (GSettings * settings, } static void +chk_load_extra_items_toggled (GSettings * settings, + gchar * key, + GtkBuilder * dialog) +{ + matekbd_desktop_config_load_from_gsettings (&desktop_config); + + xkl_config_registry_load (config_registry, desktop_config.load_extra_items); + + xkb_layouts_fill_selected_tree (dialog); +} + +static void chk_new_windows_inherit_layout_toggled (GtkWidget * chk_new_windows_inherit_layout, GtkBuilder * dialog) @@ -193,6 +205,18 @@ setup_xkb_tabs (GtkBuilder * dialog) G_CALLBACK (chk_separate_group_per_window_toggled), dialog); + g_settings_bind (xkb_general_settings, + "load-extra-items", + WID ("chk_load_extra_items"), + "active", + G_SETTINGS_BIND_DEFAULT); + + g_signal_connect (xkb_general_settings, + "changed::load-extra-items", + G_CALLBACK (chk_load_extra_items_toggled), + dialog); + + #ifdef HAVE_X11_EXTENSIONS_XKB_H if (strcmp (xkl_engine_get_backend_name (engine), "XKB")) #endif diff --git a/capplets/windows/window-properties.ui b/capplets/windows/window-properties.ui index 140ab21b..d480f960 100644 --- a/capplets/windows/window-properties.ui +++ b/capplets/windows/window-properties.ui @@ -51,12 +51,15 @@ Author: Robert Buj <property name="modal">True</property> <property name="icon-name">preferences-system-windows</property> <property name="type-hint">normal</property> + <property name="border-width">5</property> <signal name="response" handler="on_dialog_win_response" swapped="no"/> <child internal-child="vbox"> <object class="GtkBox" id="main_vbox"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="orientation">vertical</property> + <property name="border-width">2</property> + <property name="spacing">2</property> <child internal-child="action_area"> <object class="GtkButtonBox"> <property name="visible">True</property> @@ -106,7 +109,7 @@ Author: Robert Buj <object class="GtkNotebook" id="nb"> <property name="visible">True</property> <property name="can-focus">True</property> - <property name="border-width">6</property> + <property name="border-width">5</property> <child> <object class="GtkBox" id="behaviour_vbox"> <property name="visible">True</property> |