Mercurial > pidgin
comparison src/gtkblist.c @ 12366:b0f518af7cad
[gaim-migrate @ 14670]
Show the idle time before the prpl status text in the blist,
and don't put the time in brackets. I think all this only
applies to the big list.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 06 Dec 2005 00:07:14 +0000 |
parents | 8dd086d0f2b3 |
children | a4bb82fac67c |
comparison
equal
deleted
inserted
replaced
12365:7f1c4630799c | 12366:b0f518af7cad |
---|---|
2968 time(&t); | 2968 time(&t); |
2969 ihrs = (t - idle_secs) / 3600; | 2969 ihrs = (t - idle_secs) / 3600; |
2970 imin = ((t - idle_secs) / 60) % 60; | 2970 imin = ((t - idle_secs) / 60) % 60; |
2971 | 2971 |
2972 if (ihrs) | 2972 if (ihrs) |
2973 idletime = g_strdup_printf(_("Idle (%dh %02dm) "), ihrs, imin); | 2973 idletime = g_strdup_printf(_("Idle %dh %02dm "), ihrs, imin); |
2974 else | 2974 else |
2975 idletime = g_strdup_printf(_("Idle (%dm) "), imin); | 2975 idletime = g_strdup_printf(_("Idle %dm "), imin); |
2976 } | 2976 } |
2977 else | 2977 else |
2978 idletime = g_strdup(_("Idle ")); | 2978 idletime = g_strdup(_("Idle ")); |
2979 } | 2979 } |
2980 | 2980 |
2983 | 2983 |
2984 if (gaim_presence_is_idle(presence) && !selected) { | 2984 if (gaim_presence_is_idle(presence) && !selected) { |
2985 text = g_strdup_printf("<span color='%s'>%s</span>\n" | 2985 text = g_strdup_printf("<span color='%s'>%s</span>\n" |
2986 "<span color='%s' size='smaller'>%s%s%s</span>", | 2986 "<span color='%s' size='smaller'>%s%s%s</span>", |
2987 dim_grey(), esc, dim_grey(), | 2987 dim_grey(), esc, dim_grey(), |
2988 statustext != NULL ? statustext : "", | 2988 idletime != NULL ? idletime : "", |
2989 (idletime != NULL && statustext != NULL) ? " - " : "", | 2989 (idletime != NULL && statustext != NULL) ? " - " : "", |
2990 idletime != NULL ? idletime : ""); | 2990 statustext != NULL ? statustext : ""); |
2991 } else if (statustext == NULL && idletime == NULL && GAIM_BUDDY_IS_ONLINE(b)) { | 2991 } else if (statustext == NULL && idletime == NULL && GAIM_BUDDY_IS_ONLINE(b)) { |
2992 text = g_strdup(esc); | 2992 text = g_strdup(esc); |
2993 } else { | 2993 } else { |
2994 if (selected) | 2994 if (selected) |
2995 text = g_strdup_printf("%s\n" | 2995 text = g_strdup_printf("%s\n" |
2996 "<span size='smaller'>%s%s%s</span>", esc, | 2996 "<span size='smaller'>%s%s%s</span>", esc, |
2997 statustext != NULL ? statustext : "", | 2997 idletime != NULL ? idletime : "", |
2998 (idletime != NULL && statustext != NULL) ? " - " : "", | 2998 (idletime != NULL && statustext != NULL) ? " - " : "", |
2999 idletime != NULL ? idletime : ""); | 2999 statustext != NULL ? statustext : ""); |
3000 else | 3000 else |
3001 text = g_strdup_printf("%s\n" | 3001 text = g_strdup_printf("%s\n" |
3002 "<span color='%s' size='smaller'>%s%s%s</span>", esc, | 3002 "<span color='%s' size='smaller'>%s%s%s</span>", esc, |
3003 dim_grey(), | 3003 dim_grey(), |
3004 statustext != NULL ? statustext : "", | 3004 idletime != NULL ? idletime : "", |
3005 (idletime != NULL && statustext != NULL) ? " - " : "", | 3005 (idletime != NULL && statustext != NULL) ? " - " : "", |
3006 idletime != NULL ? idletime : ""); | 3006 statustext != NULL ? statustext : ""); |
3007 } | 3007 } |
3008 if (idletime) | 3008 if (idletime) |
3009 g_free(idletime); | 3009 g_free(idletime); |
3010 if (statustext) | 3010 if (statustext) |
3011 g_free(statustext); | 3011 g_free(statustext); |