# HG changeset patch # User Paul Aurich # Date 1277839351 0 # Node ID 53469b47d3f39fb15e584a58a11c3dea3ac990df # Parent ebc34634e592d3babf246b517fe133e15b008ce2 Add a comment noting the moods should be sorted post-translation. Also split out a slightly-confusing use of the ? ternary operator and add a check on PURPLE_PROTOCOL_PLUGIN_HAS_FUNC. Didn't touch the mysterious crashing code from #12245. diff -r ebc34634e592 -r 53469b47d3f3 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Tue Jun 29 17:34:21 2010 +0000 +++ b/pidgin/gtkblist.c Tue Jun 29 19:22:31 2010 +0000 @@ -3601,11 +3601,12 @@ purple_request_field_list_add_selected(f, _("None")); /* TODO: rlaager wants this sorted. */ - /* The connection is checked for PURPLE_CONNECTION_SUPPORT_MOODS flag before - * this function is called for a non-null account. So using - * PURPLE_PROTOCOL_PLUGIN_HAS_FUNC isn't necessary here */ - for (mood = account ? prpl_info->get_moods(account) : global_moods; - mood->mood != NULL ; mood++) { + /* TODO: darkrain wants it sorted post-translation */ + if (account && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods)) + mood = prpl_info->get_moods(account); + else + mood = global_moods; + for ( ; mood->mood != NULL ; mood++) { char *path; if (mood->mood == NULL || mood->description == NULL)