[gnome-settings-daemon/wip/carlosg/shuffle-font-mouse-settings: 3/3] xsettings: Adopt drag-threshold/double-click settings from gsettings-desktop-schemas




commit 6fdcc89cd0d22d151fb414ba0802ed69414f9be4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 27 00:13:13 2020 +0200

    xsettings: Adopt drag-threshold/double-click settings from gsettings-desktop-schemas
    
    These settings are more universal than gnome-settings-daemon.

 ...nome.settings-daemon.peripherals.gschema.xml.in | 22 ++++++++++------------
 plugins/xsettings/gsd-xsettings-manager.c          | 14 ++++++++++++--
 2 files changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.peripherals.gschema.xml.in 
b/data/org.gnome.settings-daemon.peripherals.gschema.xml.in
index a6705801..c2d716a7 100644
--- a/data/org.gnome.settings-daemon.peripherals.gschema.xml.in
+++ b/data/org.gnome.settings-daemon.peripherals.gschema.xml.in
@@ -36,18 +36,6 @@
       <description>File name of the bell sound to be played.</description>
     </key>
   </schema>
-  <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.peripherals.mouse" 
path="/org/gnome/settings-daemon/peripherals/mouse/">
-    <key name="double-click" type="i">
-      <default>400</default>
-      <summary>Double click time</summary>
-      <description> Length of a double click in milliseconds.</description>
-    </key>
-    <key name="drag-threshold" type="i">
-      <default>8</default>
-      <summary>Drag threshold</summary>
-      <description>Distance before a drag is started.</description>
-    </key>
-  </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.peripherals.touchscreen" 
path="/org/gnome/settings-daemon/peripherals/touchscreen/">
     <key name="orientation-lock" type="b">
       <default>false</default>
@@ -77,6 +65,16 @@
       <summary>Middle button emulation</summary>
       <description>Enables middle mouse button emulation through simultaneous left and right button 
click.</description>
     </key>
+    <key name="double-click" type="i">
+      <default>400</default>
+      <summary>Double click time</summary>
+      <description> Length of a double click in milliseconds.</description>
+    </key>
+    <key name="drag-threshold" type="i">
+      <default>8</default>
+      <summary>Drag threshold</summary>
+      <description>Distance before a drag is started.</description>
+    </key>
   </schema>
   <schema id="org.gnome.settings-daemon.peripherals.keyboard.deprecated">
     <key name="repeat" type="b">
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index adcdc440..07ec543e 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -467,8 +467,8 @@ static FixedEntry fixed_entries [] = {
 };
 
 static TranslationEntry translations [] = {
-        { "org.gnome.settings-daemon.peripherals.mouse", "double-click",   "Net/DoubleClickTime",  
translate_int_int },
-        { "org.gnome.settings-daemon.peripherals.mouse", "drag-threshold", "Net/DndDragThreshold", 
translate_int_int },
+        { "org.gnome.desktop.peripherals.mouse", "double-click",   "Net/DoubleClickTime",  translate_int_int 
},
+        { "org.gnome.desktop.peripherals.mouse", "drag-threshold", "Net/DndDragThreshold", translate_int_int 
},
 
         { "org.gnome.desktop.background", "show-desktop-icons",    "Gtk/ShellShowsDesktop",   
translate_bool_int },
 
@@ -1272,12 +1272,22 @@ migrate_settings (void)
                 { "hinting", "font-hinting", NULL },
                 { "rgba-order", "font-rgba-order", NULL },
         };
+        GsdSettingsMigrateEntry mouse_entries[] = {
+                { "double-click", "double-click", NULL },
+                { "drag-threshold", "drag-threshold", NULL },
+        };
 
         gsd_settings_migrate_check ("org.gnome.settings-daemon.plugins.xsettings.deprecated",
                                     "/org/gnome/settings-daemon/plugins/xsettings/",
                                     "org.gnome.desktop.interface",
                                     "/org/gnome/desktop/interface/",
                                     xsettings_entries, G_N_ELEMENTS (xsettings_entries));
+
+        gsd_settings_migrate_check ("org.gnome.settings-daemon.peripherals.mouse.deprecated",
+                                    "/org/gnome/settings-daemon/peripherals/mouse/",
+                                    "org.gnome.desktop.peripherals.mouse",
+                                    "/org/gnome/desktop/peripherals/mouse/",
+                                    mouse_entries, G_N_ELEMENTS (mouse_entries));
 }
 
 gboolean


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