Git commit e785be92b34b1b26f1de763a07513dcec1c29e14 by Daniel Nicoletti. Committed on 01/07/2012 at 00:53. Pushed by dantti into branch 'master'. Add support to display the download size remaining when downloading M +10 -2 libapper/PkTransaction.cpp http://commits.kde.org/apper/e785be92b34b1b26f1de763a07513dcec1c29e14 diff --git a/libapper/PkTransaction.cpp b/libapper/PkTransaction.cpp index 1748ef3..854845a 100644 --- a/libapper/PkTransaction.cpp +++ b/libapper/PkTransaction.cpp @@ -432,11 +432,19 @@ void PkTransaction::updateUi() d->busySeq->setSequence(sequence); d->busySeq->start(); } - } else if (status =3D=3D Transaction::StatusDownload && transaction->s= peed() !=3D 0) { + } else if (status =3D=3D Transaction::StatusDownload) { uint speed =3D transaction->speed(); - if (speed) { + qulonglong downloadRemaining =3D transaction->downloadSizeRemainin= g(); + if (speed !=3D 0 && downloadRemaining !=3D 0) { + ui->currentL->setText(i18n("Downloading packages at %1/s, %2 r= emaining", + KGlobal::locale()->formatByteSize(s= peed), + KGlobal::locale()->formatByteSize(d= ownloadRemaining))); + } else if (speed !=3D 0 && downloadRemaining =3D=3D 0) { ui->currentL->setText(i18n("Downloading packages at %1/s", KGlobal::locale()->formatByteSize= (speed))); + } else if (speed =3D=3D 0 && downloadRemaining !=3D 0) { + ui->currentL->setText(i18n("Downloading packages, %1 remaining= ", + KGlobal::locale()->formatByteSize= (downloadRemaining))); } } =20