comparison console/gntblist.c @ 14379:a7e29c0b51f4

[gaim-migrate @ 17085] Parts of Richard Nelson (wabz)'s patch: Emit the selection-changed signal when you wheel-scroll. Show the idle-time only when it has an appropriate idle-time. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 30 Aug 2006 05:07:43 +0000
parents 1bd09d355f9e
children 4a901f5d1312
comparison
equal deleted inserted replaced
14378:d1d275a95d02 14379:a7e29c0b51f4
975 { 975 {
976 GaimPresence *pre = gaim_buddy_get_presence(buddy); 976 GaimPresence *pre = gaim_buddy_get_presence(buddy);
977 if (gaim_presence_is_idle(pre)) 977 if (gaim_presence_is_idle(pre))
978 { 978 {
979 time_t idle = gaim_presence_get_idle_time(pre); 979 time_t idle = gaim_presence_get_idle_time(pre);
980 char *st = gaim_str_seconds_to_string(time(NULL) - idle); 980 if (idle > 0) {
981 g_string_append_printf(str, _("\nIdle: %s"), st); 981 char *st = gaim_str_seconds_to_string(time(NULL) - idle);
982 g_free(st); 982 g_string_append_printf(str, _("\nIdle: %s"), st);
983 g_free(st);
984 }
983 } 985 }
984 } 986 }
985 987
986 title = g_strdup(gaim_buddy_get_name(buddy)); 988 title = g_strdup(gaim_buddy_get_name(buddy));
987 } 989 }