From 149975a0044f0a964c44b98e3228f4aeb6588d00 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 20 Jul 2012 12:09:04 +0200 Subject: Fix bug 303375 - Dots in directory names treated as file extension. Patch by Emmanuel Pescosta BUG: 303375 REVIEW: 105575 FIXED-IN: 4.9.0 --- src/views/renamedialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index e232b9614..a91f91b1b 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -87,7 +87,9 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : if (m_renameOneItem) { const QString fileName = items.first().url().prettyUrl(); const QString extension = KMimeType::extractKnownExtension(fileName.toLower()); - if (extension.length() > 0) { + + // If the current item is a directory, select the whole file name. + if ((extension.length() > 0) && !items.first().isDir()) { // Don't select the extension selectionLength -= extension.length() + 1; } -- cgit v1.3 From 43474e7b9d55c3fe768032cf7e69f46bcf5c14cd Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 20 Jul 2012 12:11:45 +0200 Subject: Fix compiler warning, which spotted a real bug. ItemLayout is an enum, not a flag, so == is even more correct than '&'. --- src/views/dolphinitemlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp index a031b1699..039b5f230 100644 --- a/src/views/dolphinitemlistview.cpp +++ b/src/views/dolphinitemlistview.cpp @@ -90,7 +90,7 @@ void DolphinItemListView::readSettings() setEnabledSelectionToggles(GeneralSettings::showSelectionToggle()); - const bool expandableFolders = (itemLayout() && KFileItemListView::DetailsLayout) && + const bool expandableFolders = (itemLayout() == KFileItemListView::DetailsLayout) && DetailsModeSettings::expandableFolders(); setSupportsItemExpanding(expandableFolders); -- cgit v1.3 From d898f40f29f6328fd80165022790609972dcce7c Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 23 Aug 2012 22:58:05 -0300 Subject: Adjust to Ark's drag'n'drop D-Bus interface changes. Ark's drag'n'drop D-Bus interface needs to be changed: so far, the object path was always /DndExtract, but this does not work if Ark is being used as an embedded KPart (in Konqueror or Rekonq, for example), as all tabs will end up calling QDBusConnection::registerObject() with the same path. Only the first call will work, and the result is that dragging and dropping from any tab previewing an archive with Ark will extract from the first archive being previewed. To fix that, applications that accept the application/x-kde-dndextract mimetype should now be adjusted to check the application/x-kde-ark-dndextract-service and application/x-kde-ark-dndextract-path ones instead; the former contains the same service information that used to be passed, while the latter tells which object path should be talked to. This is the Dolphin part of the change, which also needs to be made to the folderview plasmoid. REVIEW: 106131 CCBUG: 304860 --- src/views/draganddrophelper.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/views') diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index 45e5076f6..f81d4d0bf 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -35,10 +35,13 @@ QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destU } const QMimeData* mimeData = event->mimeData(); - if (mimeData->hasFormat("application/x-kde-dndextract")) { - const QString remoteDBusClient = mimeData->data("application/x-kde-dndextract"); - QDBusMessage message = QDBusMessage::createMethodCall(remoteDBusClient, "/DndExtract", - "org.kde.DndExtract", "extractSelectedFilesTo"); + if (mimeData->hasFormat("application/x-kde-ark-dndextract-service") && + mimeData->hasFormat("application/x-kde-ark-dndextract-path")) { + const QString remoteDBusClient = mimeData->data("application/x-kde-ark-dndextract-service"); + const QString remoteDBusPath = mimeData->data("application/x-kde-ark-dndextract-path"); + + QDBusMessage message = QDBusMessage::createMethodCall(remoteDBusClient, remoteDBusPath, + "org.kde.ark.DndExtract", "extractSelectedFilesTo"); message.setArguments(QVariantList() << destUrl.pathOrUrl()); QDBusConnection::sessionBus().call(message); } else if (!destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile())) { -- cgit v1.3