[gsettings-desktop-schemas] schemas: Switch usb-protection-level from int to enum



commit 075d5f3baca2a605b52d82ff9c78693321443843
Author: Ludovico de Nittis <ludovico denittis collabora com>
Date:   Sun Jun 16 14:17:21 2019 +0200

    schemas: Switch usb-protection-level from int to enum

 headers/gdesktop-enums.h                         | 6 ++++++
 schemas/org.gnome.desktop.privacy.gschema.xml.in | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/headers/gdesktop-enums.h b/headers/gdesktop-enums.h
index 539a734..540c4c7 100644
--- a/headers/gdesktop-enums.h
+++ b/headers/gdesktop-enums.h
@@ -214,4 +214,10 @@ typedef enum
   G_DESKTOP_POINTER_ACCEL_PROFILE_ADAPTIVE
 } GDesktopPointerAccelProfile;
 
+typedef enum
+{
+  G_DESKTOP_USB_PROTECTION_LOCKSCREEN,
+  G_DESKTOP_USB_PROTECTION_ALWAYS
+} GDesktopUsbProtection;
+
 #endif /* __gdesktop_enums_h__ */
diff --git a/schemas/org.gnome.desktop.privacy.gschema.xml.in 
b/schemas/org.gnome.desktop.privacy.gschema.xml.in
index 3d2bea1..7f12267 100644
--- a/schemas/org.gnome.desktop.privacy.gschema.xml.in
+++ b/schemas/org.gnome.desktop.privacy.gschema.xml.in
@@ -81,12 +81,12 @@
         the key usb-protection-level.
       </description>
     </key>
-    <key name="usb-protection-level" type="u">
-      <default>1</default>
+    <key name="usb-protection-level" enum="org.gnome.desktop.GDesktopUsbProtection">
+      <default>'lockscreen'</default>
       <summary>When USB devices should be rejected</summary>
       <description>
-        If set to 1, only when the lock screen is present new USB devices will
-        be rejected; if set to 2, all new USB devices will always be rejected.
+        If set to "lockscreen", only when the lock screen is present new USB devices will
+        be rejected; if set to "always", all new USB devices will always be rejected.
       </description>
     </key>
   </schema>


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