[gnome-control-center] mouse: handle better the visibility of scroll-method entries



commit beb8e9a9456a3c740a6e1e868bf8947ca070bc40
Author: Felipe Borges <feborges redhat com>
Date:   Tue Oct 27 15:45:23 2015 +0100

    mouse: handle better the visibility of scroll-method entries
    
    Fixes the situation where you unplug a touchpad device which
    supports two-finger-scrolling and plug in another one with
    edge-scrolling only, we would have two switches. These entries
    are mutually exclusive.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756863

 panels/mouse/gnome-mouse-properties.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/panels/mouse/gnome-mouse-properties.c b/panels/mouse/gnome-mouse-properties.c
index edf030b..1b3a4fb 100644
--- a/panels/mouse/gnome-mouse-properties.c
+++ b/panels/mouse/gnome-mouse-properties.c
@@ -101,12 +101,9 @@ setup_touchpad_options (CcMousePropertiesPrivate *d)
 
        gtk_widget_show_all (WID ("touchpad-frame"));
 
-       if (have_two_finger_scrolling)
-               gtk_widget_show (WID ("two-finger-scrolling-row"));
-       else if (have_edge_scrolling)
-               gtk_widget_show (WID ("edge-scrolling-row"));
-       if (have_tap_to_click)
-               gtk_widget_show (WID ("tap-to-click-row"));
+       gtk_widget_set_visible (WID ("two-finger-scrolling-row"), have_two_finger_scrolling);
+       gtk_widget_set_visible (WID ("edge-scrolling-row"), have_edge_scrolling && 
!have_two_finger_scrolling);
+       gtk_widget_set_visible (WID ("tap-to-click-row"), have_tap_to_click);
 
        method = g_settings_get_enum (d->touchpad_settings, "scroll-method");
        gtk_switch_set_active (GTK_SWITCH (WID ("two-finger-scrolling-switch")),


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