Dominique Leuenberger 2014-08-05 20:05:14 +00:00 committed by Git OBS Bridge
parent 066885a25c
commit 46715e72b8
2 changed files with 26 additions and 22 deletions

View File

@ -1,4 +1,4 @@
From f6bf1516b480ceb13b54ac401b45426e4bc8ed6d Mon Sep 17 00:00:00 2001 From b25b57872daa036adbafeddb6aaf1236407bed1b Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com> From: Mike Gorse <mgorse@suse.com>
Date: Thu, 1 May 2014 12:56:11 -0500 Date: Thu, 1 May 2014 12:56:11 -0500
Subject: [PATCH] Use g_settings_get_default_value() to retrieve default values Subject: [PATCH] Use g_settings_get_default_value() to retrieve default values
@ -8,16 +8,16 @@ more reliable than parsing the schema ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=668234 https://bugzilla.gnome.org/show_bug.cgi?id=668234
--- ---
editor/dconf-editor.vala | 5 ++- editor/dconf-editor.vala | 5 +++-
editor/dconf-model.vala | 7 ++++- editor/dconf-model.vala | 7 ++++-
editor/dconf-schema.vala | 80 +----------------------------------------------- editor/dconf-schema.vala | 76 +-----------------------------------------------
3 files changed, 11 insertions(+), 81 deletions(-) 3 files changed, 11 insertions(+), 77 deletions(-)
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 671b9b5..467a6c6 100644 index 8174218..692c57e 100644
--- a/editor/dconf-editor.vala --- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala +++ b/editor/dconf-editor.vala
@@ -223,7 +223,10 @@ class ConfigurationEditor : Gtk.Application @@ -235,7 +235,10 @@ class ConfigurationEditor : Gtk.Application
if (selected_key.schema != null) if (selected_key.schema != null)
{ {
var gettext_domain = selected_key.schema.gettext_domain; var gettext_domain = selected_key.schema.gettext_domain;
@ -28,7 +28,7 @@ index 671b9b5..467a6c6 100644
if (selected_key.schema.summary != null) if (selected_key.schema.summary != null)
summary = selected_key.schema.summary; summary = selected_key.schema.summary;
if (gettext_domain != null && summary != "") if (gettext_domain != null && summary != "")
@@ -233,7 +236,7 @@ class ConfigurationEditor : Gtk.Application @@ -245,7 +248,7 @@ class ConfigurationEditor : Gtk.Application
if (gettext_domain != null && description != "") if (gettext_domain != null && description != "")
description = dgettext(gettext_domain, description); description = dgettext(gettext_domain, description);
type = key_to_description(selected_key); type = key_to_description(selected_key);
@ -63,7 +63,7 @@ index 8b43d60..ae25f86 100644
set set
{ {
diff --git a/editor/dconf-schema.vala b/editor/dconf-schema.vala diff --git a/editor/dconf-schema.vala b/editor/dconf-schema.vala
index fd35fb2..862eff3 100644 index fd35fb2..37c6571 100644
--- a/editor/dconf-schema.vala --- a/editor/dconf-schema.vala
+++ b/editor/dconf-schema.vala +++ b/editor/dconf-schema.vala
@@ -3,7 +3,6 @@ public class SchemaKey @@ -3,7 +3,6 @@ public class SchemaKey
@ -74,12 +74,10 @@ index fd35fb2..862eff3 100644
public SchemaValueRange? range; public SchemaValueRange? range;
public SchemaValueRange type_range; public SchemaValueRange type_range;
public List<SchemaChoice> choices; public List<SchemaChoice> choices;
@@ -40,18 +39,7 @@ public class SchemaKey @@ -42,15 +41,8 @@ public class SchemaKey
{
for (var child = node->children; child != null; child = child->next) if (child->name == "default")
{ {
- if (child->name == "default")
- {
- try - try
- { - {
- default_value = Variant.parse(new VariantType(type), child->get_content()); - default_value = Variant.parse(new VariantType(type), child->get_content());
@ -87,14 +85,13 @@ index fd35fb2..862eff3 100644
- catch (VariantParseError e) - catch (VariantParseError e)
- { - {
- // ... - // ...
+ // we use get_default_value(), so ignore this
}
- } - }
- } else if (child->name == "summary")
- else if (child->name == "summary")
+ if (child->name == "summary")
summary = child->get_content(); summary = child->get_content();
else if (child->name == "description") else if (child->name == "description")
description = child->get_content(); @@ -129,9 +121,6 @@ public class SchemaKey
@@ -129,9 +117,6 @@ public class SchemaKey
else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE) else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE)
warning ("Unknown child tag in <key>, <%s>", child->name); warning ("Unknown child tag in <key>, <%s>", child->name);
} }
@ -104,7 +101,7 @@ index fd35fb2..862eff3 100644
} }
} }
@@ -248,9 +233,6 @@ public class SchemaEnum @@ -248,9 +237,6 @@ public class SchemaEnum
else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE) else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE)
warning ("Unknown tag in <enum>, <%s>", child->name); warning ("Unknown tag in <enum>, <%s>", child->name);
} }
@ -114,7 +111,7 @@ index fd35fb2..862eff3 100644
} }
} }
@@ -301,9 +283,6 @@ public class SchemaFlags @@ -301,9 +287,6 @@ public class SchemaFlags
else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE) else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE)
warning ("Unknown tag in <flags>, <%s>", child->name); warning ("Unknown tag in <flags>, <%s>", child->name);
} }
@ -124,7 +121,7 @@ index fd35fb2..862eff3 100644
} }
} }
@@ -407,53 +386,6 @@ public class SchemaList @@ -407,53 +390,6 @@ public class SchemaList
delete doc; delete doc;
} }
@ -178,7 +175,7 @@ index fd35fb2..862eff3 100644
public void load_directory(string dir) throws Error public void load_directory(string dir) throws Error
{ {
var directory = File.new_for_path(dir); var directory = File.new_for_path(dir);
@@ -471,15 +403,5 @@ public class SchemaList @@ -471,15 +407,5 @@ public class SchemaList
} }
i = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0, null); i = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0, null);
@ -197,3 +194,4 @@ index fd35fb2..862eff3 100644
-- --
1.8.4 1.8.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 5 20:04:06 UTC 2014 - dimstar@opensuse.org
- Update dconf-use-g_settings_get_default_value.patch from
bgo#668234#c5: Silence "Unknown child tag in <key>, <default>".
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 13 09:55:39 UTC 2014 - fezhang@suse.com Fri Jun 13 09:55:39 UTC 2014 - fezhang@suse.com