Fix bogus speed display by removing old values
This commit is contained in:
parent
c8b6e07f27
commit
49da17badd
2 changed files with 4 additions and 4 deletions
|
@ -83,8 +83,10 @@ namespace Midori {
|
||||||
}
|
}
|
||||||
|
|
||||||
string speed;
|
string speed;
|
||||||
if (elapsed != last_time)
|
if (elapsed != last_time) {
|
||||||
speed = format_size ((int)((current_size - last_size) / (elapsed - last_time)));
|
speed = format_size ((uint64)(
|
||||||
|
(current_size - last_size) / (elapsed - last_time)));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
/* i18n: Unknown number of bytes, used for transfer rate like ?B/s */
|
/* i18n: Unknown number of bytes, used for transfer rate like ?B/s */
|
||||||
speed = _("?B");
|
speed = _("?B");
|
||||||
|
|
|
@ -213,8 +213,6 @@ midori_transferbar_add_download_item (MidoriTransferbar* transferbar,
|
||||||
G_CALLBACK (midori_transferbar_download_notify_status_cb), info);
|
G_CALLBACK (midori_transferbar_download_notify_status_cb), info);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (midori_transferbar_download_button_clicked_cb), info);
|
G_CALLBACK (midori_transferbar_download_button_clicked_cb), info);
|
||||||
g_object_set_data_full (G_OBJECT (download), "last-time", g_new0 (gdouble, 1), g_free);
|
|
||||||
g_object_set_data_full (G_OBJECT (download), "last-size", g_new0 (guint64, 1), g_free);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue