[folks] libsocialweb: make gender_string lowercase before comparing with "male" and "female"
- From: Alban Crequy <albanc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] libsocialweb: make gender_string lowercase before comparing with "male" and "female"
- Date: Tue, 5 Apr 2011 13:29:47 +0000 (UTC)
commit e52ccc3b474ce5a7cf6d9e35ef4a047d14d1c409
Author: Alban Crequy <alban crequy collabora co uk>
Date: Mon Mar 28 11:39:56 2011 +0100
libsocialweb: make gender_string lowercase before comparing with "male" and "female"
backends/libsocialweb/lib/swf-persona.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/backends/libsocialweb/lib/swf-persona.vala b/backends/libsocialweb/lib/swf-persona.vala
index f457446..410aa90 100644
--- a/backends/libsocialweb/lib/swf-persona.vala
+++ b/backends/libsocialweb/lib/swf-persona.vala
@@ -215,9 +215,9 @@ public class Swf.Persona : Folks.Persona,
var gender_string = contact.get_value ("x-gender");
Gender gender;
- if (gender_string == "male")
+ if (gender_string != null && gender_string.down() == "male")
gender = Gender.MALE;
- else if (gender_string == "female")
+ else if (gender_string != null && gender_string.down() == "female")
gender = Gender.FEMALE;
else
gender = Gender.UNSPECIFIED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]