Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/jabber.c @ 27847:0b36e6eb2439
propagate from branch 'im.pidgin.pidgin' (head fa58d38b47ddd3adf4314e997ff052d610af4d09)
to branch 'im.pidgin.pidgin.yaz' (head 6cc097c351098e07ab4efcce0ffa5cb202f111d6)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 03 Jun 2008 05:23:38 +0000 |
parents | 30eaeb7cc076 e7b6767f263b |
children | 81ebe4fac9ce |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Mon Jun 02 06:58:38 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Jun 03 05:23:38 2008 +0000 @@ -1506,8 +1506,7 @@ if (full) { PurpleStatus *status; - PurpleValue *value; - + if(jb->subscription & JABBER_SUB_FROM) { if(jb->subscription & JABBER_SUB_TO) sub = _("Both"); @@ -1523,17 +1522,17 @@ else sub = _("None"); } - + purple_notify_user_info_add_pair(user_info, _("Subscription"), sub); - + status = purple_presence_get_active_status(presence); - value = purple_status_get_attr_value(status, "mood"); - if (value && purple_value_get_type(value) == PURPLE_TYPE_STRING && (mood = purple_value_get_string(value))) { - - value = purple_status_get_attr_value(status, "moodtext"); - if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) { - char *moodplustext = g_strdup_printf("%s (%s)",mood,purple_value_get_string(value)); - + mood = purple_status_get_attr_string(status, "mood"); + if(mood != NULL) { + const char *moodtext; + moodtext = purple_status_get_attr_string(status, "moodtext"); + if(moodtext != NULL) { + char *moodplustext = g_strdup_printf("%s (%s)", mood, moodtext); + purple_notify_user_info_add_pair(user_info, _("Mood"), moodplustext); g_free(moodplustext); } else