[dconf-editor] Introduce RegistryInfo.



commit b4f266e3f205ec87a29680398dbb2aa1e3af6ed2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Jun 27 05:49:54 2016 +0200

    Introduce RegistryInfo.

 editor/Makefile.am                |    2 +
 editor/dconf-editor.gresource.xml |    1 +
 editor/dconf-view.vala            |   39 -------
 editor/registry-info.ui           |   47 ++++++++
 editor/registry-info.vala         |  220 +++++++++++++++++++++++++++++++++++++
 editor/registry-view.ui           |   46 +--------
 editor/registry-view.vala         |  156 +-------------------------
 po/POTFILES.in                    |    2 +
 po/POTFILES.skip                  |    1 +
 9 files changed, 277 insertions(+), 237 deletions(-)
---
diff --git a/editor/Makefile.am b/editor/Makefile.am
index 30c5c6e..88b4b8d 100644
--- a/editor/Makefile.am
+++ b/editor/Makefile.am
@@ -33,6 +33,7 @@ resource_data = \
        pathbar.ui \
        pathbar-item.ui \
        property-row.ui \
+       registry-info.ui \
        registry-view.ui
 
 resources.c: $(resource_data)
@@ -50,6 +51,7 @@ dconf_editor_SOURCES = \
        key-list-box-row.vala \
        modifications-revealer.vala \
        pathbar.vala \
+       registry-info.vala \
        registry-view.vala
 
 desktopdir = $(datadir)/applications
diff --git a/editor/dconf-editor.gresource.xml b/editor/dconf-editor.gresource.xml
index d90b66d..9c19ce1 100644
--- a/editor/dconf-editor.gresource.xml
+++ b/editor/dconf-editor.gresource.xml
@@ -11,6 +11,7 @@
     <file preprocess="xml-stripblanks">pathbar.ui</file>
     <file preprocess="xml-stripblanks">pathbar-item.ui</file>
     <file preprocess="xml-stripblanks">property-row.ui</file>
+    <file preprocess="xml-stripblanks">registry-info.ui</file>
     <file preprocess="xml-stripblanks">registry-view.ui</file>
   </gresource>
   <gresource prefix="/ca/desrt/dconf-editor/gtk">
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index 62226c4..2787cf2 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -17,45 +17,6 @@
 
 using Gtk;
 
-[GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/property-row.ui")]
-private class PropertyRow : ListBoxRow
-{
-    [GtkChild] private Grid grid;
-    [GtkChild] private Label name_label;
-
-    public PropertyRow.from_label (string property_name, string property_value)
-    {
-        name_label.set_text (property_name);
-
-        Label value_label = new Label (property_value);
-        value_label.valign = Align.START;
-        value_label.xalign = 0;
-        value_label.yalign = 0;
-        value_label.wrap = true;
-        value_label.selectable = true;
-        value_label.max_width_chars = 42;
-        value_label.width_chars = 42;
-        value_label.show ();
-        grid.attach (value_label, 1, 0, 1, 1);
-    }
-
-    public PropertyRow.from_widgets (string property_name, Widget widget, Widget? warning)
-    {
-        name_label.set_text (property_name);
-
-        grid.attach (widget, 1, 0, 1, 1);
-        widget.valign = Align.CENTER;
-
-        if (warning != null)
-        {
-            grid.row_spacing = 4;
-            grid.attach ((!) warning, 0, 1, 2, 1);
-            warning.hexpand = true;
-            warning.halign = Align.CENTER;
-        }
-    }
-}
-
 public interface KeyEditorChild : Widget
 {
     public signal void value_has_changed (bool enable_revealer, bool is_valid = false);
diff --git a/editor/registry-info.ui b/editor/registry-info.ui
new file mode 100644
index 0000000..19bc2a4
--- /dev/null
+++ b/editor/registry-info.ui
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <template class="RegistryInfo" parent="GtkGrid">
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkRevealer" id="no_schema_warning"> <!-- TODO report bug: hiding and showing infobar 
fails to draw it the 2nd time -->
+        <property name="visible">True</property>
+        <property name="reveal-child">False</property>
+        <child>
+          <object class="GtkInfoBar">
+            <property name="visible">True</property>
+            <property name="message-type">info</property>
+            <child internal-child="content_area">
+              <object class="GtkBox">
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="max-width-chars">40</property>
+                    <property name="use-markup">True</property>
+                    <property name="wrap">True</property>
+                    <property name="label" translatable="yes">&#60;b&#62;No schema available.&#60;/b&#62; 
Dconf Editor can’t find a schema associated with this key. The application that installed this key may have 
been removed, may have stop the use of this key, or may use a relocatable schema for defining its 
keys.</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkScrolledWindow">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkListBox" id="properties_list_box">
+            <property name="visible">True</property>
+            <property name="selection-mode">none</property>
+            <style>
+              <class name="properties-list"/>
+            </style>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
new file mode 100644
index 0000000..728bd93
--- /dev/null
+++ b/editor/registry-info.vala
@@ -0,0 +1,220 @@
+/*
+  This file is part of Dconf Editor
+
+  Dconf Editor is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Dconf Editor is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Dconf Editor.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+using Gtk;
+
+[GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/registry-info.ui")]
+class RegistryInfo : Grid
+{
+    [GtkChild] private Revealer no_schema_warning;
+    [GtkChild] private ListBox properties_list_box;
+
+    public bool populate_properties_list_box (ModificationsRevealer revealer, Key key)
+    {
+        bool has_schema;
+        unowned Variant [] dict_container;
+        key.properties.get ("(ba{ss})", out has_schema, out dict_container);
+        
+        if (!has_schema)
+        {
+            if (((DConfKey) key).is_ghost)
+                return false;
+            no_schema_warning.set_reveal_child (true);
+        }
+        else
+            no_schema_warning.set_reveal_child (false);
+
+        properties_list_box  foreach ((widget) => { widget.destroy (); });
+
+        Variant dict = dict_container [0];
+
+        // TODO use VariantDict
+        string key_name, tmp_string;
+
+        if (!dict.lookup ("key-name",     "s", out key_name))   assert_not_reached ();
+        if (!dict.lookup ("parent-path",  "s", out tmp_string)) assert_not_reached ();
+
+        if (dict.lookup ("schema-id",     "s", out tmp_string)) add_row_from_label (_("Schema"),      
tmp_string);
+        if (dict.lookup ("summary",       "s", out tmp_string)) add_row_from_label (_("Summary"),     
tmp_string);
+        if (dict.lookup ("description",   "s", out tmp_string)) add_row_from_label (_("Description"), 
tmp_string);
+        /* Translators: as in datatype (integer, boolean, string, etc.) */
+        if (dict.lookup ("type-name",     "s", out tmp_string)) add_row_from_label (_("Type"),        
tmp_string);
+        else assert_not_reached ();
+        if (dict.lookup ("minimum",       "s", out tmp_string)) add_row_from_label (_("Minimum"),     
tmp_string);
+        if (dict.lookup ("maximum",       "s", out tmp_string)) add_row_from_label (_("Maximum"),     
tmp_string);
+        if (dict.lookup ("default-value", "s", out tmp_string)) add_row_from_label (_("Default"),     
tmp_string);
+
+        if (!dict.lookup ("type-code",    "s", out tmp_string)) assert_not_reached ();
+
+        bool disable_revealer_for_value = false;
+        KeyEditorChild key_editor_child = create_child (key);
+        if (has_schema)
+        {
+            Switch custom_value_switch = new Switch ();
+            custom_value_switch.halign = Align.END;
+            custom_value_switch.hexpand = true;
+            custom_value_switch.show ();
+            add_row_from_widget (_("Use default value"), custom_value_switch, null);
+
+            custom_value_switch.bind_property ("active", key_editor_child, "sensitive", 
BindingFlags.SYNC_CREATE | BindingFlags.INVERT_BOOLEAN);
+
+            bool disable_revealer_for_switch = false;
+            GSettingsKey gkey = (GSettingsKey) key;
+            revealer.reload.connect (() => {
+                    disable_revealer_for_switch = true;
+                    custom_value_switch.set_active (gkey.is_default);
+                    disable_revealer_for_switch = false;    // TODO bad but needed
+                });
+            custom_value_switch.set_active (key.planned_change ? key.planned_value == null : 
gkey.is_default);
+            custom_value_switch.notify ["active"].connect (() => {
+                    if (disable_revealer_for_switch)
+                        disable_revealer_for_switch = false;
+                    else if (custom_value_switch.get_active ())
+                        revealer.add_delayed_setting (key, null);
+                    else
+                    {
+                        Variant tmp_variant = key.planned_change && (key.planned_value != null) ? 
key.planned_value : key.value;
+                        revealer.add_delayed_setting (key, tmp_variant);
+                        key_editor_child.reload (tmp_variant);
+                    }
+                });
+        }
+        key_editor_child.value_has_changed.connect ((enable_revealer, is_valid) => {
+                if (disable_revealer_for_value)
+                    disable_revealer_for_value = false;
+                else if (enable_revealer && is_valid)
+                    revealer.add_delayed_setting (key, key_editor_child.get_variant ());
+                else if (enable_revealer && !is_valid)
+                    revealer.dismiss_change (key);
+            });
+        key_editor_child.child_activated.connect (() => { revealer.apply_delayed_settings (); });  // TODO 
"only" used for string-based and spin widgets
+        revealer.reload.connect (() => {
+                disable_revealer_for_value = true;
+                key_editor_child.reload (key.value);
+                if (tmp_string == "<flags>")
+                    key.planned_value = key.value;
+            });
+        add_row_from_widget (_("Custom value"), key_editor_child, tmp_string);
+
+        return true;
+    }
+
+    private static KeyEditorChild create_child (Key key)
+    {
+        switch (key.type_string)
+        {
+            case "<enum>":
+                return (KeyEditorChild) new KeyEditorChildEnum (key);
+            case "<flags>":
+                return (KeyEditorChild) new KeyEditorChildFlags ((GSettingsKey) key);
+            case "b":
+                return (KeyEditorChild) new KeyEditorChildBool (key.planned_change && (key.planned_value != 
null) ? ((!) key.planned_value).get_boolean () : key.value.get_boolean ());
+            case "y":
+            case "n":
+            case "q":
+            case "i":
+            case "u":
+            case "h":   // TODO "x" and "t" are not working in spinbuttons (double-based)
+                return (KeyEditorChild) new KeyEditorChildNumberInt (key);
+            case "d":
+                return (KeyEditorChild) new KeyEditorChildNumberDouble (key);
+            case "mb":
+                return (KeyEditorChild) new KeyEditorChildNullableBool (key);
+            default:
+                return (KeyEditorChild) new KeyEditorChildDefault (key.type_string, key.planned_change && 
(key.planned_value != null) ? key.planned_value : key.value);
+        }
+    }
+
+    /*\
+    * * Rows creation
+    \*/
+
+    private void add_row_from_label (string property_name, string property_value)
+    {
+        properties_list_box.add (new PropertyRow.from_label (property_name, property_value));
+    }
+
+    private void add_row_from_widget (string property_name, Widget widget, string? type)
+    {
+        properties_list_box.add (new PropertyRow.from_widgets (property_name, widget, type != null ? 
add_warning ((!) type) : null));
+    }
+
+    private static Widget? add_warning (string type)
+    {
+        if (type != "<flags>" && ((type != "s" && "s" in type) || (type != "g" && "g" in type)) || (type != 
"o" && "o" in type))
+        {
+            if ("m" in type)
+                /* Translators: neither the "nothing" keyword nor the "m" type should be translated; a 
"maybe type" is a type of variant that is nullable. */
+                return warning_label (_("Use the keyword “nothing” to set a maybe type (beginning with “m”) 
to its empty value. Strings, signatures and object paths should be surrounded by quotation marks."));
+            else
+                return warning_label (_("Strings, signatures and object paths should be surrounded by 
quotation marks."));
+        }
+        else if (type != "m" && type != "mb" && type != "<enum>" && "m" in type)
+            /* Translators: neither the "nothing" keyword nor the "m" type should be translated; a "maybe 
type" is a type of variant that is nullable. */
+            return warning_label (_("Use the keyword “nothing” to set a maybe type (beginning with “m”) to 
its empty value."));
+        return null;
+    }
+    private static Widget warning_label (string text)
+    {
+        Label label = new Label (text);
+        label.visible = true;
+        label.max_width_chars = 59;
+        label.wrap = true;
+        label.halign = Align.START;
+        label.get_style_context ().add_class ("italic-label");
+        return (Widget) label;
+    }
+}
+
+[GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/property-row.ui")]
+private class PropertyRow : ListBoxRow
+{
+    [GtkChild] private Grid grid;
+    [GtkChild] private Label name_label;
+
+    public PropertyRow.from_label (string property_name, string property_value)
+    {
+        name_label.set_text (property_name);
+
+        Label value_label = new Label (property_value);
+        value_label.valign = Align.START;
+        value_label.xalign = 0;
+        value_label.yalign = 0;
+        value_label.wrap = true;
+        value_label.selectable = true;
+        value_label.max_width_chars = 42;
+        value_label.width_chars = 42;
+        value_label.show ();
+        grid.attach (value_label, 1, 0, 1, 1);
+    }
+
+    public PropertyRow.from_widgets (string property_name, Widget widget, Widget? warning)
+    {
+        name_label.set_text (property_name);
+
+        grid.attach (widget, 1, 0, 1, 1);
+        widget.valign = Align.CENTER;
+
+        if (warning != null)
+        {
+            grid.row_spacing = 4;
+            grid.attach ((!) warning, 0, 1, 2, 1);
+            warning.hexpand = true;
+            warning.halign = Align.CENTER;
+        }
+    }
+}
diff --git a/editor/registry-view.ui b/editor/registry-view.ui
index df17f5d..39cfd2c 100644
--- a/editor/registry-view.ui
+++ b/editor/registry-view.ui
@@ -110,53 +110,9 @@
           </packing>
         </child>
         <child>
-          <object class="GtkGrid">
+          <object class="RegistryInfo" id="properties_view">
             <property name="visible">True</property>
-            <property name="orientation">vertical</property>
-            <child>
-              <object class="GtkRevealer" id="no_schema_warning"> <!-- TODO report bug: hiding and showing 
infobar fails to draw it the 2nd time -->
-                <property name="visible">True</property>
-                <property name="reveal-child">False</property>
-                <child>
-                  <object class="GtkInfoBar">
-                    <property name="visible">True</property>
-                    <property name="message-type">info</property>
-                    <child internal-child="content_area">
-                      <object class="GtkBox">
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="max-width-chars">40</property>
-                            <property name="use-markup">True</property>
-                            <property name="wrap">True</property>
-                            <property name="label" translatable="yes">&#60;b&#62;No schema 
available.&#60;/b&#62; Dconf Editor can’t find a schema associated with this key. The application that 
installed this key may have been removed, may have stop the use of this key, or may use a relocatable schema 
for defining its keys.</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkScrolledWindow">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkListBox" id="properties_list_box">
-                    <property name="visible">True</property>
-                    <property name="selection-mode">none</property>
-                    <style>
-                      <class name="properties-list"/>
-                    </style>
-                  </object>
-                </child>
-              </object>
-            </child>
           </object>
-          <packing>
-            <property name="name">properties-view</property>
-          </packing>
         </child>
       </object>
     </child>
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index 480f5e2..035725e 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -29,9 +29,8 @@ class RegistryView : Grid
     [GtkChild] private TreeView dir_tree_view;
     [GtkChild] private TreeSelection dir_tree_selection;
 
-    [GtkChild] private Revealer no_schema_warning;
     [GtkChild] private Stack stack;
-    [GtkChild] private ListBox properties_list_box;
+    [GtkChild] private RegistryInfo properties_view;
 
     [GtkChild] private ListBox key_list_box;
     private GLib.ListStore? key_model = null;
@@ -105,7 +104,6 @@ class RegistryView : Grid
 
         update_current_path (full_name);
 
-        no_schema_warning.set_reveal_child (false);
         stack.set_visible_child_name ("browse-view");
 
         invalidate_popovers ();
@@ -164,17 +162,11 @@ class RegistryView : Grid
             ((KeyListBoxRow) row).change_dismissed.connect (() => { revealer.dismiss_change (key); });
 
             row.on_row_clicked.connect (() => {
-                    if (!key.has_schema && ((DConfKey) key).is_ghost)
+                    if (!properties_view.populate_properties_list_box (revealer, key))
                         return;
 
-                    properties_list_box  foreach ((widget) => { widget.destroy (); });
-                    populate_properties_list_box (key);
-
-                    stack.set_visible_child_name ("properties-view");
-
+                    stack.set_visible_child (properties_view);
                     update_current_path (key.full_name);
-
-                    no_schema_warning.set_reveal_child (!key.has_schema);
                 });
             // TODO bug: row is always visually activated after the dialog destruction if mouse is over at 
this time
         }
@@ -182,108 +174,6 @@ class RegistryView : Grid
         return row;
     }
 
-    private void populate_properties_list_box (Key key)
-    {
-        bool has_schema;
-        unowned Variant [] dict_container;
-        key.properties.get ("(ba{ss})", out has_schema, out dict_container);
-        Variant dict = dict_container [0];
-
-        // TODO use VariantDict
-        string key_name, tmp_string;
-
-        if (!dict.lookup ("key-name",     "s", out key_name))   assert_not_reached ();
-        if (!dict.lookup ("parent-path",  "s", out tmp_string)) assert_not_reached ();
-
-        if (dict.lookup ("schema-id",     "s", out tmp_string)) add_row_from_label (_("Schema"),      
tmp_string);
-        if (dict.lookup ("summary",       "s", out tmp_string)) add_row_from_label (_("Summary"),     
tmp_string);
-        if (dict.lookup ("description",   "s", out tmp_string)) add_row_from_label (_("Description"), 
tmp_string);
-        /* Translators: as in datatype (integer, boolean, string, etc.) */
-        if (dict.lookup ("type-name",     "s", out tmp_string)) add_row_from_label (_("Type"),        
tmp_string);
-        else assert_not_reached ();
-        if (dict.lookup ("minimum",       "s", out tmp_string)) add_row_from_label (_("Minimum"),     
tmp_string);
-        if (dict.lookup ("maximum",       "s", out tmp_string)) add_row_from_label (_("Maximum"),     
tmp_string);
-        if (dict.lookup ("default-value", "s", out tmp_string)) add_row_from_label (_("Default"),     
tmp_string);
-
-        if (!dict.lookup ("type-code",    "s", out tmp_string)) assert_not_reached ();
-
-        bool disable_revealer_for_value = false;
-        KeyEditorChild key_editor_child = create_child (key);
-        if (has_schema)
-        {
-            Switch custom_value_switch = new Switch ();
-            custom_value_switch.halign = Align.END;
-            custom_value_switch.hexpand = true;
-            custom_value_switch.show ();
-            add_row_from_widget (_("Use default value"), custom_value_switch, null);
-
-            custom_value_switch.bind_property ("active", key_editor_child, "sensitive", 
BindingFlags.SYNC_CREATE | BindingFlags.INVERT_BOOLEAN);
-
-            bool disable_revealer_for_switch = false;
-            GSettingsKey gkey = (GSettingsKey) key;
-            revealer.reload.connect (() => {
-                    disable_revealer_for_switch = true;
-                    custom_value_switch.set_active (gkey.is_default);
-                    disable_revealer_for_switch = false;    // TODO bad but needed
-                });
-            custom_value_switch.set_active (key.planned_change ? key.planned_value == null : 
gkey.is_default);
-            custom_value_switch.notify ["active"].connect (() => {
-                    if (disable_revealer_for_switch)
-                        disable_revealer_for_switch = false;
-                    else if (custom_value_switch.get_active ())
-                        revealer.add_delayed_setting (key, null);
-                    else
-                    {
-                        Variant tmp_variant = key.planned_change && (key.planned_value != null) ? 
key.planned_value : key.value;
-                        revealer.add_delayed_setting (key, tmp_variant);
-                        key_editor_child.reload (tmp_variant);
-                    }
-                });
-        }
-        key_editor_child.value_has_changed.connect ((enable_revealer, is_valid) => {
-                if (disable_revealer_for_value)
-                    disable_revealer_for_value = false;
-                else if (enable_revealer && is_valid)
-                    revealer.add_delayed_setting (key, key_editor_child.get_variant ());
-                else if (enable_revealer && !is_valid)
-                    revealer.dismiss_change (key);
-            });
-        key_editor_child.child_activated.connect (() => { revealer.apply_delayed_settings (); });  // TODO 
"only" used for string-based and spin widgets
-        revealer.reload.connect (() => {
-                disable_revealer_for_value = true;
-                key_editor_child.reload (key.value);
-                if (tmp_string == "<flags>")
-                    key.planned_value = key.value;
-            });
-        add_row_from_widget (_("Custom value"), key_editor_child, tmp_string);
-    }
-
-    private static KeyEditorChild create_child (Key key)
-    {
-        switch (key.type_string)
-        {
-            case "<enum>":
-                return (KeyEditorChild) new KeyEditorChildEnum (key);
-            case "<flags>":
-                return (KeyEditorChild) new KeyEditorChildFlags ((GSettingsKey) key);
-            case "b":
-                return (KeyEditorChild) new KeyEditorChildBool (key.planned_change && (key.planned_value != 
null) ? ((!) key.planned_value).get_boolean () : key.value.get_boolean ());
-            case "y":
-            case "n":
-            case "q":
-            case "i":
-            case "u":
-            case "h":   // TODO "x" and "t" are not working in spinbuttons (double-based)
-                return (KeyEditorChild) new KeyEditorChildNumberInt (key);
-            case "d":
-                return (KeyEditorChild) new KeyEditorChildNumberDouble (key);
-            case "mb":
-                return (KeyEditorChild) new KeyEditorChildNullableBool (key);
-            default:
-                return (KeyEditorChild) new KeyEditorChildDefault (key.type_string, key.planned_change && 
(key.planned_value != null) ? key.planned_value : key.value);
-        }
-    }
-
     private bool on_button_pressed (Widget widget, Gdk.EventButton event)
     {
         ListBoxRow list_box_row = (ListBoxRow) widget.get_parent ();
@@ -322,46 +212,6 @@ class RegistryView : Grid
     }
 
     /*\
-    * * Properties listbox
-    \*/
-
-    private void add_row_from_label (string property_name, string property_value)
-    {
-        properties_list_box.add (new PropertyRow.from_label (property_name, property_value));
-    }
-
-    private void add_row_from_widget (string property_name, Widget widget, string? type)
-    {
-        properties_list_box.add (new PropertyRow.from_widgets (property_name, widget, type != null ? 
add_warning ((!) type) : null));
-    }
-
-    private static Widget? add_warning (string type)
-    {
-        if (type != "<flags>" && ((type != "s" && "s" in type) || (type != "g" && "g" in type)) || (type != 
"o" && "o" in type))
-        {
-            if ("m" in type)
-                /* Translators: neither the "nothing" keyword nor the "m" type should be translated; a 
"maybe type" is a type of variant that is nullable. */
-                return warning_label (_("Use the keyword “nothing” to set a maybe type (beginning with “m”) 
to its empty value. Strings, signatures and object paths should be surrounded by quotation marks."));
-            else
-                return warning_label (_("Strings, signatures and object paths should be surrounded by 
quotation marks."));
-        }
-        else if (type != "m" && type != "mb" && type != "<enum>" && "m" in type)
-            /* Translators: neither the "nothing" keyword nor the "m" type should be translated; a "maybe 
type" is a type of variant that is nullable. */
-            return warning_label (_("Use the keyword “nothing” to set a maybe type (beginning with “m”) to 
its empty value."));
-        return null;
-    }
-    private static Widget warning_label (string text)
-    {
-        Label label = new Label (text);
-        label.visible = true;
-        label.max_width_chars = 59;
-        label.wrap = true;
-        label.halign = Align.START;
-        label.get_style_context ().add_class ("italic-label");
-        return (Widget) label;
-    }
-
-    /*\
     * * Revealer stuff
     \*/
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5d986d9..1dfca1c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,5 +13,7 @@ editor/dconf-window.vala
 editor/key-list-box-row.vala
 [type: gettext/glade]editor/modifications-revealer.ui
 editor/modifications-revealer.vala
+[type: gettext/glade]editor/registry-info.ui
+editor/registry-info.vala
 [type: gettext/glade]editor/registry-view.ui
 editor/registry-view.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 12aaa33..2618fe9 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -5,6 +5,7 @@ editor/dconf-view.c
 editor/dconf-window.c
 editor/key-list-box-row.c
 editor/modifications-revealer.c
+editor/registry-info.c
 editor/registry-view.c
 # Autotools failure
 sub/editor/ca.desrt.dconf-editor.desktop.in


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