[gnome-control-center/arnaudb/429-master-Disable-touchpad-only-if-mouse] Always allow touchpad if no other pointer device.



commit 47aab3c275128acdc49970ae96a77007de09944a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Mar 26 18:14:26 2019 +0100

    Always allow touchpad if no other pointer device.
    
    It was possible to completely disable
    touchpad even when there was no other
    pointer device. And worse, this panel
    being no keyboard-browsable, the only
    practical solution was then to find a
    mouse and connect it to the computer.
    
    Closes #429.

 panels/mouse/gnome-mouse-properties.c  | 32 +-------------------------------
 panels/mouse/gnome-mouse-properties.ui |  2 +-
 2 files changed, 2 insertions(+), 32 deletions(-)
---
diff --git a/panels/mouse/gnome-mouse-properties.c b/panels/mouse/gnome-mouse-properties.c
index 102778f42..665da845c 100644
--- a/panels/mouse/gnome-mouse-properties.c
+++ b/panels/mouse/gnome-mouse-properties.c
@@ -213,7 +213,7 @@ touchpad_enabled_set_mapping (const GValue              *value,
 
         enabled = g_value_get_boolean (value);
 
-        return g_variant_new_string (enabled ? "enabled" : "disabled");
+        return g_variant_new_string (enabled ? "enabled" : "disabled-on-external-mouse");
 }
 
 static void
@@ -280,36 +280,6 @@ setup_dialog (CcMouseProperties *self)
                                      touchpad_enabled_get_mapping,
                                      touchpad_enabled_set_mapping,
                                      NULL, NULL);
-       g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
-                                     self->touchpad_natural_scrolling_row, "sensitive",
-                                     G_SETTINGS_BIND_GET,
-                                     touchpad_enabled_get_mapping,
-                                     touchpad_enabled_set_mapping,
-                                     NULL, NULL);
-       g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
-                                     self->touchpad_speed_row, "sensitive",
-                                     G_SETTINGS_BIND_GET,
-                                     touchpad_enabled_get_mapping,
-                                     touchpad_enabled_set_mapping,
-                                     NULL, NULL);
-       g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
-                                     self->tap_to_click_row, "sensitive",
-                                     G_SETTINGS_BIND_GET,
-                                     touchpad_enabled_get_mapping,
-                                     touchpad_enabled_set_mapping,
-                                     NULL, NULL);
-       g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
-                                     self->two_finger_scrolling_row, "sensitive",
-                                     G_SETTINGS_BIND_GET,
-                                     touchpad_enabled_get_mapping,
-                                     touchpad_enabled_set_mapping,
-                                     NULL, NULL);
-       g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
-                                     self->edge_scrolling_row, "sensitive",
-                                     G_SETTINGS_BIND_GET,
-                                     touchpad_enabled_get_mapping,
-                                     touchpad_enabled_set_mapping,
-                                     NULL, NULL);
 
        g_settings_bind (self->touchpad_settings, "natural-scroll",
                          self->touchpad_natural_scrolling_switch, "active",
diff --git a/panels/mouse/gnome-mouse-properties.ui b/panels/mouse/gnome-mouse-properties.ui
index 1932b91b1..a38a979ef 100644
--- a/panels/mouse/gnome-mouse-properties.ui
+++ b/panels/mouse/gnome-mouse-properties.ui
@@ -388,7 +388,7 @@
                                         <property name="hexpand">True</property>
                                         <property name="xalign">0</property>
                                         <property name="valign">end</property>
-                                        <property name="label" translatable="yes">Touchpad</property>
+                                        <property name="label" translatable="yes">Allow touchpad with 
mouse</property>
                                         <property name="use_underline">True</property>
                                         <property name="mnemonic_widget">touchpad_toggle_switch</property>
                                       </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]