[dconf-editor] Warn on startup mapping requested but disabled.



commit 986fd2c5d89fef6a20b87cf276c7f97c517eea03
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Jan 13 05:15:03 2018 +0100

    Warn on startup mapping requested but disabled.

 editor/dconf-window.vala |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index d1eb9a7..61cc97c 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -102,7 +102,14 @@ class DConfWindow : ApplicationWindow
             {
                 strict = true;
                 model.add_mapping ((!) schema, (!) first_path);
-                if (key_name != null)
+
+                RelocatableSchemasEnabledMappings enabled_mappings_flags = 
(RelocatableSchemasEnabledMappings) settings.get_flags ("relocatable-schemas-enabled-mappings");
+                if (!(RelocatableSchemasEnabledMappings.STARTUP in enabled_mappings_flags))
+                {
+                    warning (_("Startup mappings are disabled."));
+                    first_path = "/";
+                }
+                else if (key_name != null)
                     first_path = (!) first_path + (!) key_name;
             }
         }


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