[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kio
From: David Faure <faure () kde ! org>
Date: 2004-11-26 0:40:24
Message-ID: 20041126004024.701FC1D05C () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
When using kio_uiserver to display progress for something else than a KIO job,
we might have a number of files and no "total size" - e.g. in the dialog I
added in the kolab resource. "10% of 540 files" looks better than "10% of 0B"
M +3 -1 kio/defaultprogress.cpp 1.66
M +3 -1 misc/uiserver.cpp 1.120
--- kdelibs/kio/misc/uiserver.cpp #1.119:1.120
@@ -265,5 +265,7 @@ void ProgressItem::setProcessedDirs( uns
void ProgressItem::setPercent( unsigned long percent ) {
- QString tmps = i18n( "%1 % of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize));
+ QString total = m_iTotalSize ? KIO::convertSize(m_iTotalSize)
+ : i18n( "%1 files" ).arg( m_iTotalFiles );
+ QString tmps = i18n( "%1 % of %2 ").arg( percent ).arg( total );
setText( ListProgress::TB_PROGRESS, tmps );
--- kdelibs/kio/kio/defaultprogress.cpp #1.65:1.66
@@ -230,5 +230,7 @@ void DefaultProgress::showTotals()
void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
{
- QString tmp(i18n( "%1% of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize)));
+ QString total = m_iTotalSize ? KIO::convertSize( m_iTotalSize )
+ : i18n( "%1 files" ).arg( m_iTotalFiles );
+ QString tmp = i18n( "%1 % of %2 " ).arg( percent ).arg( total );
m_pProgressBar->setValue( percent );
switch(mode) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic