# HG changeset patch # User Luke Schierer # Date 1192816596 0 # Node ID ee70ed741adac3c4bd9b43476a490529a3187cc5 # Parent aad0f10eb4dc43a6a5357f84f673ac8a25c7bb61 applied changes from 61346ebfdbe38e90d131141a7fa41abeda7984c5 through 2ed39e287c8bc0502ecaf3b390fc0441ab160a99 diff -r aad0f10eb4dc -r ee70ed741ada pidgin/gtkblist.c --- a/pidgin/gtkblist.c Fri Oct 19 17:53:35 2007 +0000 +++ b/pidgin/gtkblist.c Fri Oct 19 17:56:36 2007 +0000 @@ -3459,25 +3459,31 @@ else idletime = g_strdup(_("Idle")); - if (!selected) + if (!selected) { + g_free(text); text = g_strdup_printf("%s\n" - "%s%s%s", - dim_grey(), esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + "%s%s%s", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); + } } - else if (!selected && !statustext) /* We handle selected text later */ + else if (!selected && !statustext) {/* We handle selected text later */ + g_free(text); text = g_strdup_printf("%s", dim_grey(), esc); - else if (!selected && !text) + } else if (!selected && !text) { + g_free(text); text = g_strdup_printf("%s\n" "%s", dim_grey(), esc, dim_grey(), statustext != NULL ? statustext : ""); + } } else if (!PURPLE_BUDDY_IS_ONLINE(b)) { - if (!selected && !statustext) /* We handle selected text later */ + if (!selected && !statustext) {/* We handle selected text later */ + g_free(text); text = g_strdup_printf("%s", dim_grey(), esc); - else if (!selected && !text) + } else if (!selected && !text) text = g_strdup_printf("%s\n" "%s", dim_grey(), esc, dim_grey(), @@ -3494,13 +3500,15 @@ } /* It is selected. */ - if ((selected && !text) || (selected && idletime)) + if ((selected && !text) || (selected && idletime)) { + g_free(text); text = g_strdup_printf("%s\n" "%s%s%s", esc, idletime != NULL ? idletime : "", (idletime != NULL && statustext != NULL) ? " - " : "", statustext != NULL ? statustext : ""); + } g_free(idletime); g_free(statustext);