Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/jabber.c @ 17573:2f067d8fb19a
Fixed a few small mistakes I discovered while testing user mood in Adium.
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Tue, 12 Jun 2007 03:19:42 +0000 |
parents | 2e0799b916b9 |
children | 5fc8a8a25008 |
comparison
equal
deleted
inserted
replaced
17572:2e0799b916b9 | 17573:2f067d8fb19a |
---|---|
1190 JabberBuddyResource *jbr = NULL; | 1190 JabberBuddyResource *jbr = NULL; |
1191 const char *sub; | 1191 const char *sub; |
1192 GList *l; | 1192 GList *l; |
1193 | 1193 |
1194 if (full) { | 1194 if (full) { |
1195 PurpleStatus *status; | |
1196 PurpleValue *value; | |
1197 | |
1195 if(jb->subscription & JABBER_SUB_FROM) { | 1198 if(jb->subscription & JABBER_SUB_FROM) { |
1196 if(jb->subscription & JABBER_SUB_TO) | 1199 if(jb->subscription & JABBER_SUB_TO) |
1197 sub = _("Both"); | 1200 sub = _("Both"); |
1198 else if(jb->subscription & JABBER_SUB_PENDING) | 1201 else if(jb->subscription & JABBER_SUB_PENDING) |
1199 sub = _("From (To pending)"); | 1202 sub = _("From (To pending)"); |
1207 else | 1210 else |
1208 sub = _("None"); | 1211 sub = _("None"); |
1209 } | 1212 } |
1210 | 1213 |
1211 purple_notify_user_info_add_pair(user_info, _("Subscription"), sub); | 1214 purple_notify_user_info_add_pair(user_info, _("Subscription"), sub); |
1215 | |
1216 status = purple_presence_get_active_status(purple_buddy_get_presence(b)); | |
1217 value = purple_status_get_attr_value(status, "mood"); | |
1218 if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) { | |
1219 const char *mood = purple_value_get_string(value); | |
1220 | |
1221 value = purple_status_get_attr_value(status, "moodtext"); | |
1222 if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) { | |
1223 char *moodplustext = g_strdup_printf("%s (%s)",mood,purple_value_get_string(value)); | |
1224 | |
1225 purple_notify_user_info_add_pair(user_info, _("Mood"), moodplustext); | |
1226 g_free(moodplustext); | |
1227 } else | |
1228 purple_notify_user_info_add_pair(user_info, _("Mood"), mood); | |
1229 } | |
1212 } | 1230 } |
1213 | 1231 |
1214 for(l=jb->resources; l; l = l->next) { | 1232 for(l=jb->resources; l; l = l->next) { |
1215 char *text = NULL; | 1233 char *text = NULL; |
1216 char *res = NULL; | 1234 char *res = NULL; |