Skip to content

Commit 1034ff7

Browse files
cwendlinglukefromdc
authored andcommitted
Add UI to control org.mate.accessibility-keyboard.stickykeys-latch-to-lock
1 parent be9b514 commit 1034ff7

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

capplets/keyboard/mate-keyboard-properties-a11y.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ stickykeys_enable_toggled_cb (GtkWidget *w, GtkBuilder *dialog)
4848
{
4949
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
5050

51+
gtk_widget_set_sensitive (WID ("stickykeys_latch_to_lock"), active);
5152
gtk_widget_set_sensitive (WID ("stickykeys_two_key_off"), active);
5253
if (notifications_dialog)
5354
gtk_widget_set_sensitive (NWID ("stickykeys_notifications_box"), active);
@@ -231,6 +232,12 @@ setup_a11y_tabs (GtkBuilder *dialog)
231232
G_CALLBACK (stickykeys_enable_toggled_cb), dialog);
232233
stickykeys_enable_toggled_cb (w, dialog);
233234

235+
g_settings_bind (a11y_settings,
236+
"stickykeys-latch-to-lock",
237+
WID ("stickykeys_latch_to_lock"),
238+
"active",
239+
G_SETTINGS_BIND_DEFAULT);
240+
234241
g_settings_bind (a11y_settings,
235242
"stickykeys-two-key-off",
236243
WID ("stickykeys_two_key_off"),

capplets/keyboard/mate-keyboard-properties-dialog.ui

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,23 @@ default settings</property>
10861086
<property name="position">1</property>
10871087
</packing>
10881088
</child>
1089+
<child>
1090+
<object class="GtkCheckButton" id="stickykeys_latch_to_lock">
1091+
<property name="label" translatable="yes">_Latch modifiers when pressed twice</property>
1092+
<property name="visible">True</property>
1093+
<property name="can_focus">True</property>
1094+
<property name="receives_default">False</property>
1095+
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
1096+
<property name="halign">start</property>
1097+
<property name="use_underline">True</property>
1098+
<property name="draw_indicator">True</property>
1099+
</object>
1100+
<packing>
1101+
<property name="expand">True</property>
1102+
<property name="fill">True</property>
1103+
<property name="position">2</property>
1104+
</packing>
1105+
</child>
10891106
</object>
10901107
<packing>
10911108
<property name="expand">True</property>

0 commit comments

Comments
 (0)