Avoid another couple of type casts
This commit is contained in:
parent
0fec08b469
commit
5bf6e961d4
@ -373,8 +373,8 @@ static void _download_refresh(Download * download)
|
|||||||
snprintf(buf, sizeof(buf), _("%.1f of %.1f %s"), rate,
|
snprintf(buf, sizeof(buf), _("%.1f of %.1f %s"), rate,
|
||||||
fraction, _(unit));
|
fraction, _(unit));
|
||||||
gtk_label_set_text(GTK_LABEL(download->done), buf);
|
gtk_label_set_text(GTK_LABEL(download->done), buf);
|
||||||
fraction = (double)download->data_received
|
fraction = download->data_received;
|
||||||
/ (double)download->content_length;
|
fraction /= download->content_length;
|
||||||
snprintf(buf, sizeof(buf), "%.1f%%", fraction * 100);
|
snprintf(buf, sizeof(buf), "%.1f%%", fraction * 100);
|
||||||
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(
|
||||||
download->progress), fraction);
|
download->progress), fraction);
|
||||||
|
Loading…
Reference in New Issue
Block a user