diff options
author | monsta <[email protected]> | 2015-10-28 17:19:40 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2015-10-28 17:19:40 +0300 |
commit | a2d76a4dac46aa6d4ceee00081910d7f6243d36b (patch) | |
tree | c64c2653aad4187296e062ab89643a297c7437d2 /capplets/mouse | |
parent | 26eca7cec46200886c966a697e390d4886590ecb (diff) | |
download | mate-control-center-a2d76a4dac46aa6d4ceee00081910d7f6243d36b.tar.bz2 mate-control-center-a2d76a4dac46aa6d4ceee00081910d7f6243d36b.tar.xz |
touchpad settings: add option to enable/disable touchpad
fixes https://github.com/mate-desktop/mate-desktop/issues/178
Diffstat (limited to 'capplets/mouse')
-rw-r--r-- | capplets/mouse/mate-mouse-properties.c | 9 | ||||
-rw-r--r-- | capplets/mouse/mate-mouse-properties.ui | 26 |
2 files changed, 30 insertions, 5 deletions
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c index 4db0e576..2896ca18 100644 --- a/capplets/mouse/mate-mouse-properties.c +++ b/capplets/mouse/mate-mouse-properties.c @@ -408,6 +408,15 @@ setup_dialog (GtkBuilder *dialog) if (find_synaptics () == FALSE) gtk_notebook_remove_page (GTK_NOTEBOOK (WID ("prefs_widget")), -1); else { + g_settings_bind (touchpad_settings, "touchpad-enabled", + WID ("touchpad_enable"), "active", + G_SETTINGS_BIND_DEFAULT); + g_settings_bind (touchpad_settings, "touchpad-enabled", + WID ("vbox_touchpad_general"), "sensitive", + G_SETTINGS_BIND_DEFAULT); + g_settings_bind (touchpad_settings, "touchpad-enabled", + WID ("vbox_touchpad_scrolling"), "sensitive", + G_SETTINGS_BIND_DEFAULT); g_settings_bind (touchpad_settings, "disable-while-typing", WID ("disable_w_typing_toggle"), "active", G_SETTINGS_BIND_DEFAULT); diff --git a/capplets/mouse/mate-mouse-properties.ui b/capplets/mouse/mate-mouse-properties.ui index 487961c5..d8779882 100644 --- a/capplets/mouse/mate-mouse-properties.ui +++ b/capplets/mouse/mate-mouse-properties.ui @@ -835,7 +835,23 @@ <property name="border_width">12</property> <property name="spacing">18</property> <child> - <object class="GtkVBox" id="vbox15"> + <object class="GtkCheckButton" id="touchpad_enable"> + <property name="label" translatable="yes">Enable _touchpad</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="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">0</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox_touchpad_general"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -880,7 +896,7 @@ </child> <child> <object class="GtkCheckButton" id="disable_w_typing_toggle"> - <property name="label" translatable="yes">Disable _touchpad while typing</property> + <property name="label" translatable="yes">Disable touchpad _while typing</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -1062,11 +1078,11 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> - <object class="GtkVBox" id="vbox19"> + <object class="GtkVBox" id="vbox_touchpad_scrolling"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1269,7 +1285,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </object> |