]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge remote-tracking branch 'origin/master' into frameworks
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 12 Jun 2014 06:51:50 +0000 (08:51 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 12 Jun 2014 06:51:50 +0000 (08:51 +0200)
Conflicts:
dolphin/src/dolphincontextmenu.cpp
dolphin/src/panels/folders/treeviewcontextmenu.cpp

src/dolphincontextmenu.cpp
src/dolphinpart.desktop
src/kitemviews/private/kfileitemclipboard.cpp
src/panels/folders/treeviewcontextmenu.cpp
src/settings/kcm/kcmdolphingeneral.desktop
src/settings/kcm/kcmdolphinnavigation.desktop
src/settings/kcm/kcmdolphinservices.desktop
src/settings/kcm/kcmdolphinviewmodes.desktop

index 51351f0413e581e9c515f66504fa7eaf47e7399b..952ffcc99097f89a632bfc760ce43c1411451f01 100644 (file)
@@ -430,10 +430,9 @@ QAction* DolphinContextMenu::createPasteAction()
     QAction* action = 0;
     const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir();
     if (isDir && (m_selectedItems.count() == 1)) {
+        const QPair<bool, QString> pasteInfo = KonqOperations::pasteInfo(m_fileInfo.url());
         action = new QAction(QIcon::fromTheme("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this);
-        const QMimeData* mimeData = QApplication::clipboard()->mimeData();
-        const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData);
-        action->setEnabled(!pasteData.isEmpty() && selectedItemsProperties().supportsWriting());
+        action->setEnabled(pasteInfo.first);
         connect(action, &QAction::triggered, m_mainWindow, &DolphinMainWindow::pasteIntoFolder);
     } else {
         action = m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::Paste));
index bdc3b929d2df50c7c922f3e64059f2498172aa66..8069382481f279d4236ec112aad9a8a83e05e793 100644 (file)
@@ -213,6 +213,7 @@ Name[gl]=Compacto
 Name[he]=מרוכז
 Name[hu]=Kompakt
 Name[ia]=Compacte
+Name[id]=Kompak
 Name[is]=Þjappað
 Name[it]=Compatta
 Name[kk]=Ықшамды
index ebf50e215491a7859811dee7d3cbb04cdcd8990f..69df5dee7ece9504109094807ad5cd759bbd8164 100644 (file)
@@ -55,6 +55,14 @@ KFileItemClipboard::~KFileItemClipboard()
 void KFileItemClipboard::updateCutItems()
 {
     const QMimeData* mimeData = QApplication::clipboard()->mimeData();
+
+    // mimeData can be 0 according to https://bugs.kde.org/show_bug.cgi?id=335053
+    if (!mimeData) {
+        m_cutItems.clear();
+        emit cutItemsChanged();
+        return;
+    }
+
     const QByteArray data = mimeData->data("application/x-kde-cutselection");
     const bool isCutSelection = (!data.isEmpty() && data.at(0) == QLatin1Char('1'));
     if (isCutSelection) {
index 2e59ae833ad53a2b3053cf3822ed849185802cf6..3f69ac22a3bd415880b9b0f04f6c5076703d83cb 100644 (file)
@@ -66,11 +66,10 @@ void TreeViewContextMenu::open()
         QAction* copyAction = new QAction(KIcon("edit-copy"), i18nc("@action:inmenu", "Copy"), this);
         connect(copyAction, &QAction::triggered, this, &TreeViewContextMenu::copy);
 
-        QAction* pasteAction = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste"), this);
-        const QMimeData* mimeData = QApplication::clipboard()->mimeData();
-        const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData);
+        const QPair<bool, QString> pasteInfo = KonqOperations::pasteInfo(m_fileItem.url());
+        QAction* pasteAction = new QAction(KIcon("edit-paste"), pasteInfo.second, this);
         connect(pasteAction, &QAction::triggered, this, &TreeViewContextMenu::paste);
-        pasteAction->setEnabled(!pasteData.isEmpty() && capabilities.supportsWriting());
+        pasteAction->setEnabled(pasteInfo.first);
 
         popup->addAction(cutAction);
         popup->addAction(copyAction);
@@ -176,17 +175,7 @@ void TreeViewContextMenu::copy()
 
 void TreeViewContextMenu::paste()
 {
-    QClipboard* clipboard = QApplication::clipboard();
-    const QMimeData* mimeData = clipboard->mimeData();
-
-    const KUrl::List source = KUrl::List::fromMimeData(mimeData);
-    const KUrl& dest = m_fileItem.url();
-    if (KonqMimeData::decodeIsCutSelection(mimeData)) {
-        KonqOperations::copy(m_parent, KonqOperations::MOVE, source, dest);
-        clipboard->clear();
-    } else {
-        KonqOperations::copy(m_parent, KonqOperations::COPY, source, dest);
-    }
+    KonqOperations::doPaste(m_parent, m_fileItem.url());
 }
 
 void TreeViewContextMenu::rename()
index b0620ac7430fa1d3a0165a1be7262b1e84207e7f..9da5ee462ab775dacf4c1cbcea6ceb37d9e0cc33 100644 (file)
@@ -314,6 +314,7 @@ X-KDE-Keywords[gl]=xestor de ficheiros
 X-KDE-Keywords[he]=מנהל קבצים
 X-KDE-Keywords[hu]=fájlkezelő
 X-KDE-Keywords[ia]=gerente de file
+X-KDE-Keywords[id]=manajer berkas
 X-KDE-Keywords[is]=skráastjóri
 X-KDE-Keywords[it]=gestore dei file
 X-KDE-Keywords[kk]=file manager
index 8636058cd318a1b0ce21026855bf346c2fb60641..6e59ae4dde2604b9f8da310908dc29e18a7f384b 100644 (file)
@@ -314,6 +314,7 @@ X-KDE-Keywords[gl]=xestor de ficheiros
 X-KDE-Keywords[he]=מנהל קבצים
 X-KDE-Keywords[hu]=fájlkezelő
 X-KDE-Keywords[ia]=gerente de file
+X-KDE-Keywords[id]=manajer berkas
 X-KDE-Keywords[is]=skráastjóri
 X-KDE-Keywords[it]=gestore dei file
 X-KDE-Keywords[kk]=file manager
index 34867305a44f4e39f12aa9b58d0b7beca8bb2e6b..42c34947f14d051f2788051dfb00a4b22820816a 100644 (file)
@@ -263,6 +263,7 @@ X-KDE-Keywords[gl]=xestor de ficheiros
 X-KDE-Keywords[he]=מנהל קבצים
 X-KDE-Keywords[hu]=fájlkezelő
 X-KDE-Keywords[ia]=gerente de file
+X-KDE-Keywords[id]=manajer berkas
 X-KDE-Keywords[is]=skráastjóri
 X-KDE-Keywords[it]=gestore dei file
 X-KDE-Keywords[kk]=file manager
index a4b4e058b1fb0092bc7e34b5b7987e585431a967..51f15e77a58aa18e13fcd312e2951ca9d3ea888c 100644 (file)
@@ -312,6 +312,7 @@ X-KDE-Keywords[gl]=xestor de ficheiros
 X-KDE-Keywords[he]=מנהל קבצים
 X-KDE-Keywords[hu]=fájlkezelő
 X-KDE-Keywords[ia]=gerente de file
+X-KDE-Keywords[id]=manajer berkas
 X-KDE-Keywords[is]=skráastjóri
 X-KDE-Keywords[it]=gestore dei file
 X-KDE-Keywords[kk]=file manager