From af39a7c8aed5e474119f17b0b11f310abfbe40ef Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Fri, 25 Feb 2011 23:28:24 +0000 Subject: redraw % on download finish. svn path=/trunk/netsurf/; revision=11815 --- atari/download.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'atari') diff --git a/atari/download.c b/atari/download.c index a58b05a96..14393267f 100755 --- a/atari/download.c +++ b/atari/download.c @@ -299,7 +299,18 @@ void gui_download_window_done(struct gui_download_window *dw) dw->fd = NULL; } OBJECT * tree = ObjcTree(OC_FORM, dw->form ); - ObjcChange( OC_FORM, dw->form, DOWNLOAD_BT_ABORT, DISABLED, TRUE); + tree[DOWNLOAD_PROGRESS_DONE].ob_width = 400; + snprintf( (char*)&dw->lbl_percent, MAX_SLEN_LBL_PERCENT, + "%lu%s", 100, "%" + ); + snprintf( (char*)&dw->lbl_done, MAX_SLEN_LBL_DONE, "%s / %s", + human_friendly_bytesize(dw->size_downloaded), + (dw->size_total>0) ? human_friendly_bytesize(dw->size_total) : human_friendly_bytesize(dw->size_downloaded) + ); + ObjcString( tree, DOWNLOAD_LBL_BYTES, (char*)&dw->lbl_done ); + ObjcString( tree, DOWNLOAD_LBL_PERCENT, (char*)&dw->lbl_percent ); + ObjcChange( OC_FORM, dw->form, DOWNLOAD_BT_ABORT, DISABLED, FALSE); + snd_rdw( dw->form ); if( (tree[DOWNLOAD_CB_CLOSE_RDY].ob_state & SELECTED) != 0 ) { ApplWrite( _AESapid, WM_CLOSED, dw->form->handle, 0,0,0,0); } -- cgit v1.2.3