Mercurial > pidgin
diff libpurple/protocols/jabber/jabber.c @ 29458:a538cb73f897
propagate from branch 'im.pidgin.pidgin' (head b0098e2250f135d121960d8152e144e7e344125e)
to branch 'im.pidgin.cpw.rekkanoryo.icqxstatus' (head dcd3ab65d5cfcd79b00a7b95ab5fe788da64c112)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 07 Feb 2010 19:31:56 +0000 |
parents | 1cf9103727f2 5391094529c6 |
children | f3654983e1da |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Fri Feb 05 14:40:39 2010 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Feb 07 19:31:56 2010 +0000 @@ -2058,12 +2058,12 @@ if (full) { PurpleStatus *status; - status = purple_presence_get_active_status(presence); - mood = purple_status_get_attr_string(status, "mood"); - if(mood != NULL) { + status = purple_presence_get_status(presence, "mood"); + mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME); + if(mood && *mood) { const char *moodtext; - moodtext = purple_status_get_attr_string(status, "moodtext"); - if(moodtext != NULL) { + moodtext = purple_status_get_attr_string(status, PURPLE_MOOD_COMMENT); + if(moodtext && *moodtext) { char *moodplustext = g_strdup_printf("%s (%s)", mood, moodtext); purple_notify_user_info_add_pair(user_info, _("Mood"), moodplustext); @@ -2130,7 +2130,7 @@ "nick", _("Nickname"), purple_value_new(PURPLE_TYPE_STRING), "buzz", _("Allow Buzz"), buzz_enabled, NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); priority_value = purple_value_new(PURPLE_TYPE_INT); purple_value_set_int(priority_value, 1); @@ -2146,7 +2146,7 @@ "nick", _("Nickname"), purple_value_new(PURPLE_TYPE_STRING), "buzz", _("Allow Buzz"), buzz_enabled, NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); priority_value = purple_value_new(PURPLE_TYPE_INT); purple_value_set_int(priority_value, 0); @@ -2162,7 +2162,7 @@ "nick", _("Nickname"), purple_value_new(PURPLE_TYPE_STRING), "buzz", _("Allow Buzz"), buzz_enabled, NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); priority_value = purple_value_new(PURPLE_TYPE_INT); purple_value_set_int(priority_value, 0); @@ -2178,7 +2178,7 @@ "nick", _("Nickname"), purple_value_new(PURPLE_TYPE_STRING), "buzz", _("Allow Buzz"), buzz_enabled, NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); priority_value = purple_value_new(PURPLE_TYPE_INT); purple_value_set_int(priority_value, 0); @@ -2191,11 +2191,11 @@ "moodtext", _("Mood Text"), purple_value_new(PURPLE_TYPE_STRING), "nick", _("Nickname"), purple_value_new(PURPLE_TYPE_STRING), NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); /* if(js->protocol_version == JABBER_PROTO_0_9) - m = g_list_append(m, _("Invisible")); + "Invisible" */ type = purple_status_type_new_with_attrs(PURPLE_STATUS_OFFLINE, @@ -2203,7 +2203,7 @@ NULL, TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), NULL); - types = g_list_append(types, type); + types = g_list_prepend(types, type); type = purple_status_type_new_with_attrs(PURPLE_STATUS_TUNE, "tune", NULL, FALSE, TRUE, TRUE, @@ -2217,9 +2217,9 @@ PURPLE_TUNE_YEAR, _("Tune Year"), purple_value_new(PURPLE_TYPE_INT), PURPLE_TUNE_URL, _("Tune URL"), purple_value_new(PURPLE_TYPE_STRING), NULL); - types = g_list_append(types, type); - - return types; + types = g_list_prepend(types, type); + + return g_list_reverse(types); } static void