Skip to content

Commit

Permalink
Add UI to control org.mate.accessibility-keyboard.stickykeys-latch-to…
Browse files Browse the repository at this point in the history
…-lock
  • Loading branch information
cwendling authored and lukefromdc committed Sep 30, 2018
1 parent be9b514 commit 1034ff7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions capplets/keyboard/mate-keyboard-properties-a11y.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ stickykeys_enable_toggled_cb (GtkWidget *w, GtkBuilder *dialog)
{
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));

gtk_widget_set_sensitive (WID ("stickykeys_latch_to_lock"), active);
gtk_widget_set_sensitive (WID ("stickykeys_two_key_off"), active);
if (notifications_dialog)
gtk_widget_set_sensitive (NWID ("stickykeys_notifications_box"), active);
Expand Down Expand Up @@ -231,6 +232,12 @@ setup_a11y_tabs (GtkBuilder *dialog)
G_CALLBACK (stickykeys_enable_toggled_cb), dialog);
stickykeys_enable_toggled_cb (w, dialog);

g_settings_bind (a11y_settings,
"stickykeys-latch-to-lock",
WID ("stickykeys_latch_to_lock"),
"active",
G_SETTINGS_BIND_DEFAULT);

g_settings_bind (a11y_settings,
"stickykeys-two-key-off",
WID ("stickykeys_two_key_off"),
Expand Down
17 changes: 17 additions & 0 deletions capplets/keyboard/mate-keyboard-properties-dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,23 @@ default settings</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="stickykeys_latch_to_lock">
<property name="label" translatable="yes">_Latch modifiers when pressed twice</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
Expand Down

0 comments on commit 1034ff7

Please sign in to comment.