summaryrefslogtreecommitdiff
path: root/editor/dconf-schema.vala
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-02-06 14:30:16 -0500
committerRyan Lortie <desrt@desrt.ca>2012-02-06 14:30:16 -0500
commitb79a0a04429fa8d7a489a9c8ecffbc580d0777a2 (patch)
tree00fce1fccf863015d26837ecdc520d21a969b581 /editor/dconf-schema.vala
parent27f6fff96ea20844cbb17300e8e4bb0fe093b3da (diff)
downloaddconf-b79a0a04429fa8d7a489a9c8ecffbc580d0777a2.tar.gz
editor: clean up some Vala warnings
Diffstat (limited to 'editor/dconf-schema.vala')
-rw-r--r--editor/dconf-schema.vala26
1 files changed, 5 insertions, 21 deletions
diff --git a/editor/dconf-schema.vala b/editor/dconf-schema.vala
index 6374988..dc8e60a 100644
--- a/editor/dconf-schema.vala
+++ b/editor/dconf-schema.vala
@@ -84,16 +84,8 @@ public class SchemaKey
continue;
}
- Variant v;
- try
- {
- v = new Variant.string (value);
- choices.append (new SchemaChoice(value, v));
- }
- catch (VariantParseError e)
- {
- warning ("Invalid choice value '%s'", value);
- }
+ var v = new Variant.string (value);
+ choices.append (new SchemaChoice(value, v));
}
}
else if (child->name == "aliases")
@@ -130,16 +122,8 @@ public class SchemaKey
continue;
}
- Variant v;
- try
- {
- v = new Variant.string (target);
- choices.append (new SchemaChoice(value, v));
- }
- catch (VariantParseError e)
- {
- warning ("Invalid alias value '%s'", target);
- }
+ var v = new Variant.string (target);
+ choices.append (new SchemaChoice(value, v));
}
}
else if (child->type != Xml.ElementType.TEXT_NODE && child->type != Xml.ElementType.COMMENT_NODE)
@@ -423,7 +407,7 @@ public class SchemaList
public void load_directory(string dir) throws Error
{
File directory = File.new_for_path(dir);
- var i = directory.enumerate_children (FILE_ATTRIBUTE_STANDARD_NAME, 0, null);
+ var i = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0, null);
FileInfo info;
while ((info = i.next_file (null)) != null) {
string name = info.get_name();