folks-inspect: print an Avatar's uri
authorRaul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
Fri, 11 Mar 2011 00:40:14 +0000 (00:40 +0000)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Fri, 11 Mar 2011 22:30:56 +0000 (14:30 -0800)
Fixes: bgo#644165 - An individual's avatar shouldn't be replaced by a null
avatar

NEWS
tools/inspect/Makefile.am
tools/inspect/utils.vala

diff --git a/NEWS b/NEWS
index 265b44d..e012e93 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Bugs fixed:
 * Bug 643955 — Add to_string () to RoleOwner class
 * Bug 643957 — Deal handle birthday and postal-addresses.
 * Bug 644457 — Handle structured names
+* Bug 644165 — An individual's avatar shouldn't be replaced by a null avatar
 
 API changes:
 * Add RoleDetails interface
index 715574a..bb815b5 100644 (file)
@@ -2,6 +2,7 @@ VALAFLAGS = \
        --vapidir=$(top_srcdir)/folks \
        --pkg=readline \
        --pkg=gobject-2.0 \
+       --pkg=gio-2.0 \
        --pkg=gee-1.0 \
        --pkg=folks \
        $(NULL)
@@ -22,12 +23,14 @@ folks_inspect_SOURCES = \
        $(NULL)
 folks_inspect_LDADD = \
        $(LIBREADLINE) \
+       $(GIO_LIBS) \
        $(GLIB_LIBS) \
        $(GEE_LIBS) \
        $(top_builddir)/folks/libfolks.la \
        $(NULL)
 folks_inspect_CFLAGS = \
        -I$(top_srcdir)/folks \
+       $(GIO_CFLAGS) \
        $(GLIB_CFLAGS) \
        $(GEE_CFLAGS) \
        $(NULL)
index 12e3b17..e62975c 100644 (file)
@@ -258,7 +258,11 @@ private class Folks.Inspect.Utils
         }
       else if (prop_name == "avatar")
         {
-          return "%p".printf (prop_value.get_object ());
+          string ret = null;
+          File avatar = (File) prop_value.get_object ();
+          if (avatar != null)
+            ret = avatar.get_uri ();
+          return ret;
         }
       else if (prop_name == "im-addresses")
         {