[gnome-settings-daemon] mouse: Migrate scroll-method key to new edge-scrolling-enabled key



commit 1be6b1db115bcc3cfd91934334f69a30d41ce9ab
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 17 11:39:41 2015 +0100

    mouse: Migrate scroll-method key to new edge-scrolling-enabled key
    
    The scroll-method key was removed from the touchpad settings in
    gsettings-desktop-schemas, so migrate the old key to the correct new
    one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759559

 plugins/mouse/gsd-mouse-manager.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 70a8507..4ea3f21 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -1518,6 +1518,18 @@ map_send_events (GVariant *variant)
         }
 }
 
+static GVariant *
+map_edge_scrolling_enabled (GVariant *variant)
+{
+       GsdTouchpadScrollMethod  method;
+
+       method = g_variant_get_uint32 (variant);
+       if (method == GSD_TOUCHPAD_SCROLL_METHOD_EDGE_SCROLLING)
+               return g_variant_new_boolean (TRUE);
+       else
+               return g_variant_new_boolean (FALSE);
+}
+
 static void
 migrate_mouse_settings (void)
 {
@@ -1533,7 +1545,7 @@ migrate_mouse_settings (void)
         GsdSettingsMigrateEntry touchpad_entries[] = {
                 { "disable-while-typing", NULL,             NULL },
                 { "horiz-scroll-enabled", NULL,             NULL },
-                { "scroll-method",        "scroll-method",  NULL },
+                { "scroll-method",        "edge-scrolling-enabled", map_edge_scrolling_enabled },
                 { "tap-to-click",         "tap-to-click",   NULL },
                 { "touchpad-enabled",     "send-events",    map_send_events },
                 { "left-handed",          "left-handed",    NULL },


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