From: Peter Penz Date: Thu, 13 Nov 2008 23:05:43 +0000 (+0000) Subject: used 18ncp() in a wrong manner: for a single selection a different number of paramete... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/3cd004e748b02a3f7c17ece6b1679990fc425300?ds=sidebyside used 18ncp() in a wrong manner: for a single selection a different number of parameters should be shown svn path=/trunk/KDE/kdebase/apps/; revision=883998 --- diff --git a/src/draganddrophelper.cpp b/src/draganddrophelper.cpp index bdbcfae19..d5a52f859 100644 --- a/src/draganddrophelper.cpp +++ b/src/draganddrophelper.cpp @@ -103,14 +103,21 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); const KUrl source = urls.first(); const KUrl sourceDir = KUrl(source.directory()); + const bool singleSelection = (urls.count() == 1); - if ((urls.count() == 1) && (source == destination)) { + if (singleSelection && (source == destination)) { emit errorMessage(i18nc("@info:status", "A folder cannot dropped on to itself")); } else if (sourceDir == destination) { - const QString msg = i18ncp("@info:status", - "The dropped item %2 is already inside the folder %3", - "The dropped items are already inside the folder %3", - urls.count(), source.fileName(), destination.fileName()); + QString msg; + if (singleSelection) { + msg = i18nc("@info:status", + "The dropped item %1 is already inside " + "the folder %2", source.fileName(), destination.fileName()); + } else { + msg = i18nc("@info:status", + "The dropped items are already inside the folder %1", + destination.fileName()); + } emit errorMessage(msg); } else if (dropToItem) { KonqOperations::doDrop(destItem, destination, event, widget);