Support URL-format vCard properties
This commit is contained in:
parent
3a1b9aa543
commit
205576d973
11
contact.scm
11
contact.scm
|
@ -230,15 +230,20 @@
|
|||
(lineEditWidget (if formname (qt:find window lineEditName) #f))]
|
||||
(cond
|
||||
[lineEditWidget
|
||||
(set! (qt:property lineEditWidget "text") (last property))]
|
||||
(set! (qt:property lineEditWidget "text")
|
||||
(cond
|
||||
[(string? (last property))
|
||||
(last property)]
|
||||
[(uri:uri? (last property))
|
||||
(uri:uri->string (last property))]
|
||||
[#t ""]))]
|
||||
[(and (eq? (car property) 'PHOTO)
|
||||
(list? (last property)))
|
||||
(let* [(avatar (qt:find window "avatarLabel"))
|
||||
(old-pixmap (if avatar (qt:property avatar "pixmap")))
|
||||
[new-pixmap (if avatar (u8vector->pixmap (cadr (last property))))]]
|
||||
(when avatar
|
||||
(set! (qt:property avatar "pixmap") new-pixmap)
|
||||
(qt:delete old-pixmap)))])))
|
||||
(set! (qt:property avatar "pixmap") new-pixmap)))])))
|
||||
vcard-alist))
|
||||
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue