comparison console/gntblist.c @ 14065:8ef994bacf3d

[gaim-migrate @ 16686] Add preference to show idletime in the 'tooltip' for the buddylist. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 10 Aug 2006 15:44:43 +0000
parents fec4fadf30c9
children eaf7f35635bc
comparison
equal deleted inserted replaced
14064:fec4fadf30c9 14065:8ef994bacf3d
811 g_string_free(tip, TRUE); 811 g_string_free(tip, TRUE);
812 g_free(strip); 812 g_free(strip);
813 g_free(br); 813 g_free(br);
814 } 814 }
815 815
816 if (gaim_prefs_get_bool("/gaim/gnt/blist/idletime"))
817 {
818 GaimPresence *pre = gaim_buddy_get_presence(buddy);
819 if (gaim_presence_is_idle(pre))
820 {
821 time_t idle = gaim_presence_get_idle_time(pre);
822 char *st = gaim_str_seconds_to_string(time(NULL) - idle);
823 g_string_append_printf(str, _("\nIdle: %s"), st);
824 g_free(st);
825 }
826 }
827
816 title = g_strdup(gaim_buddy_get_name(buddy)); 828 title = g_strdup(gaim_buddy_get_name(buddy));
817 } 829 }
818 else if (GAIM_BLIST_NODE_IS_GROUP(node)) 830 else if (GAIM_BLIST_NODE_IS_GROUP(node))
819 { 831 {
820 GaimGroup *group = (GaimGroup *)node; 832 GaimGroup *group = (GaimGroup *)node;