Mercurial > pidgin
changeset 13034:615c84e94745
[gaim-migrate @ 15392]
Fix SF Bug #1414257
'If you disable idle times, when someone goes idle (but
not away), their name in the buddy list is still
'higher' than it should be...as though the idle time is
still being displayed below it, even though it's not.
(This is only visible when "Show Buddy Details" is on).'
Also, I cleaned up a little code in that function.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 25 Jan 2006 04:44:41 +0000 |
parents | 69b3d5cbd2b1 |
children | 7da470b0c424 |
files | src/gtkblist.c |
diffstat | 1 files changed, 27 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Wed Jan 25 02:58:54 2006 +0000 +++ b/src/gtkblist.c Wed Jan 25 04:44:41 2006 +0000 @@ -2929,9 +2929,9 @@ presence = gaim_buddy_get_presence(b); - if (!gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) { - - if ((gaim_presence_is_idle(presence) || !GAIM_BUDDY_IS_ONLINE(b)) && !selected) + if (!gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) + { + if (!selected && (gaim_presence_is_idle(presence) || !gaim_presence_is_online(presence))) { text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); @@ -3011,32 +3011,35 @@ idletime = g_strdup(_("Idle")); } - if(!GAIM_BUDDY_IS_ONLINE(b) && !statustext) - statustext = g_strdup(_("Offline ")); - - if (gaim_presence_is_idle(presence) && !selected) { - text = g_strdup_printf("<span color='%s'>%s</span>\n" - "<span color='%s' size='smaller'>%s%s%s</span>", - dim_grey(), esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); - } else if (statustext == NULL && idletime == NULL && GAIM_BUDDY_IS_ONLINE(b)) { - text = g_strdup(esc); - } else { - if (selected) + if(!gaim_presence_is_online(presence) && !statustext) + statustext = g_strdup(_("Offline")); + + if (statustext == NULL && idletime == NULL) + { + if (!selected && gaim_presence_is_idle(presence)) + text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); + else + text = g_strdup(esc); + } + else + { + if (!selected && (gaim_presence_is_idle(presence) || !gaim_presence_is_online(presence))) + { + text = g_strdup_printf("<span color='%s'>%s</span>\n" + "<span color='%s' size='smaller'>%s%s%s</span>", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); + } + else + { text = g_strdup_printf("%s\n" "<span size='smaller'>%s%s%s</span>", esc, idletime != NULL ? idletime : "", (idletime != NULL && statustext != NULL) ? " - " : "", statustext != NULL ? statustext : ""); - else - text = g_strdup_printf("%s\n" - "<span color='%s' size='smaller'>%s%s%s</span>", esc, - dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + } } g_free(idletime);