675 |
char *unit_format[] = { "%.0Lf", "%.1Lf", "%.02Lf", "%.02Lf" }; |
char *unit_format[] = { "%.0Lf", "%.1Lf", "%.02Lf", "%.02Lf" }; |
676 |
long unit_divide[] = { 1, 1024, 1024*1024, 1024*1024,1024 }; |
long unit_divide[] = { 1, 1024, 1024*1024, 1024*1024,1024 }; |
677 |
int num_unit; |
int num_unit; |
678 |
char format[32]; |
char format[32], date[128]; |
679 |
|
struct tm *date_tmp; |
680 |
|
|
681 |
if (!gui_ok) |
if (!gui_ok) |
682 |
return; |
return; |
737 |
_(dcc_status_string[ptr_dcc->status])); |
_(dcc_status_string[ptr_dcc->status])); |
738 |
|
|
739 |
/* other infos */ |
/* other infos */ |
740 |
|
gui_window_set_color (ptr_win->win_chat, |
741 |
|
(ptr_dcc == dcc_selected) ? |
742 |
|
COLOR_DCC_SELECTED : COLOR_WIN_CHAT); |
743 |
if (DCC_IS_FILE(ptr_dcc->type)) |
if (DCC_IS_FILE(ptr_dcc->type)) |
744 |
{ |
{ |
|
gui_window_set_color (ptr_win->win_chat, |
|
|
(ptr_dcc == dcc_selected) ? |
|
|
COLOR_DCC_SELECTED : COLOR_WIN_CHAT); |
|
745 |
wprintw (ptr_win->win_chat, " ["); |
wprintw (ptr_win->win_chat, " ["); |
746 |
if (ptr_dcc->size == 0) |
if (ptr_dcc->size == 0) |
747 |
num_bars = 10; |
num_bars = 10; |
771 |
unit_name[num_unit], |
unit_name[num_unit], |
772 |
((long double) ptr_dcc->size) / ((long double)(unit_divide[num_unit])), |
((long double) ptr_dcc->size) / ((long double)(unit_divide[num_unit])), |
773 |
unit_name[num_unit]); |
unit_name[num_unit]); |
774 |
|
wclrtoeol (ptr_win->win_chat); |
775 |
} |
} |
776 |
else |
else |
777 |
{ |
{ |
778 |
|
date_tmp = localtime (&(ptr_dcc->start_time)); |
779 |
|
strftime (date, sizeof (date) - 1, "%a, %d %b %Y %H:%M:%S", date_tmp); |
780 |
|
wprintw (ptr_win->win_chat, " %s", date); |
781 |
wclrtoeol (ptr_win->win_chat); |
wclrtoeol (ptr_win->win_chat); |
782 |
} |
} |
783 |
|
|