Bug 666528 — Can't convert from type 'GFile' to 'gchararray'
authorPhilip Withnall <philip@tecnocode.co.uk>
Wed, 21 Dec 2011 17:53:04 +0000 (17:53 +0000)
committerPhilip Withnall <philip@tecnocode.co.uk>
Wed, 21 Dec 2011 17:53:04 +0000 (17:53 +0000)
Add pretty-printing support for a couple of new properties to folks-inspect.

Closes: bgo#666528

NEWS
tools/inspect/utils.vala

diff --git a/NEWS b/NEWS
index bc17cc2..eee9353 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Overview of changes from libfolks 0.6.6 to libfolks 0.6.7
 =============================================================
 Bugs fixed:
 * Bug 666310 — Crash in Tracker backend by unsetting an entry in a read-only map
+* Bug 666528 — Can't convert from type 'GFile' to 'gchararray'
 
 Overview of changes from libfolks 0.6.5 to libfolks 0.6.6
 =============================================================
index 72620b9..d14c6ce 100644 (file)
@@ -237,7 +237,8 @@ private class Folks.Inspect.Utils
           return "Set of %u personas".printf (personas.size);
         }
       else if (prop_name == "groups" ||
-               prop_name == "local-ids")
+               prop_name == "local-ids" ||
+               prop_name == "supported-fields")
         {
           Set<string> groups = (Set<string>) prop_value.get_object ();
           output_string = "{ ";
@@ -272,6 +273,18 @@ private class Folks.Inspect.Utils
 
           return ret;
         }
+      else if (prop_name == "file")
+        {
+          string ret = null;
+          File? file = (File) prop_value.get_object ();
+
+          if (file != null)
+            {
+              ret = "%p (file: %s)".printf (file, file.get_uri ());
+            }
+
+          return ret;
+        }
       else if (prop_name == "im-addresses" ||
                prop_name == "web-service-addresses")
         {