# HG changeset patch # User Richard Laager # Date 1138164281 0 # Node ID 615c84e94745f31e424210fcd9a2bb1859e5522e # Parent 69b3d5cbd2b1a797225c8454b59adbf54584380c [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 diff -r 69b3d5cbd2b1 -r 615c84e94745 src/gtkblist.c --- 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("%s", 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("%s\n" - "%s%s%s", - 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("%s", 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("%s\n" + "%s%s%s", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); + } + else + { text = g_strdup_printf("%s\n" "%s%s%s", esc, idletime != NULL ? idletime : "", (idletime != NULL && statustext != NULL) ? " - " : "", statustext != NULL ? statustext : ""); - else - text = g_strdup_printf("%s\n" - "%s%s%s", esc, - dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + } } g_free(idletime);