From kde-commits Wed Feb 09 23:54:24 2005 From: David Faure Date: Wed, 09 Feb 2005 23:54:24 +0000 To: kde-commits Subject: kdebase/libkonq Message-Id: <20050209235424.9CDB61D193 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=110799328026126 CVS commit by faure: Prettify confirmation dialog when deleting file from the trash. BUG: 98983 M +9 -2 konq_operations.cc 1.161 --- kdebase/libkonq/konq_operations.cc #1.160:1.161 @@ -251,6 +251,13 @@ bool KonqOperations::askDeleteConfirmati KURL::List::ConstIterator it = selectedURLs.begin(); QStringList prettyList; - for ( ; it != selectedURLs.end(); ++it ) + for ( ; it != selectedURLs.end(); ++it ) { + if ( (*it).protocol() == "trash" ) { + QString path = (*it).path(); + // HACK (#98983): remove "0-foo". Note that it works better than + // displaying KFileItem::name(), for files under a subdir. + prettyList.append( path.remove(QRegExp("^/[0-9]*-")) ); + } else prettyList.append( (*it).pathOrURL() ); + } int result;