[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/libkonq
From:       David Faure <faure () kde ! org>
Date:       2005-02-09 23:54:24
Message-ID: 20050209235424.9CDB61D193 () office ! kde ! org
[Download RAW message or body]

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;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic