[Commits] [SCM] claws branch, master, updated. 3.16.0-106-ge92ba4b

wwp at claws-mail.org wwp at claws-mail.org
Sun Apr 8 17:05:34 CEST 2018


The branch, master has been updated
       via  e92ba4b16a734387fce2bc463bd8815804e3d817 (commit)
      from  2c2680cada1bd3516aed2da1edf954fdbdeee8c7 (commit)

Summary of changes:
 src/addritem.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit e92ba4b16a734387fce2bc463bd8815804e3d817
Author: wwp <wwp at free.fr>
Date:   Sun Apr 8 17:03:50 2018 +0200

    addritem+person_get_picture now returns something useful: a copy
    of the addritem's picture full path (still to be free'd by the caller),
    instead of a copy of the addritem's UID string.

diff --git a/src/addritem.c b/src/addritem.c
index f6d9d12..3a81826 100644
--- a/src/addritem.c
+++ b/src/addritem.c
@@ -270,12 +270,16 @@ void addritem_person_set_picture( ItemPerson *person, const gchar *value ) {
 }
 
 /**
- * Get picture for person object.
+ * Get picture filename for person object.
  * \param person Person object.
+ * \return copy of picture file path string (to be freed by caller - and there is
+ *         no guarantee that path does exist, or NULL.
  */
 gchar *addritem_person_get_picture( ItemPerson *person) {
 	if (person->picture)
-		return g_strdup(person->picture);
+		return g_strconcat( get_rc_dir(), G_DIR_SEPARATOR_S,
+			ADDRBOOK_DIR, G_DIR_SEPARATOR_S, person->picture,
+			".png", NULL );
 	return NULL;
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list