Minor issue: the Dolphin context menu should take care about the protocol capabilities (copy, move, delete, ...) like in konq_popupmenu (I'll fix this before 4.1).
CCMAIL: faure@kde.org
BUG: 155969
svn path=/trunk/KDE/kdebase/apps/; revision=792995
<label context="@label">Show selection toggle</label>
<default>true</default>
</entry>
+ <entry name="ShowCopyMoveMenu" type="Bool">
+ <label context="@label">Show 'Copy To' and 'Move To' commands in context menu</label>
+ <default>false</default>
+ </entry>
<entry name="ViewPropsTimestamp" type="DateTime" >
<label context="@label">Timestamp since when the view properties are valid</label>
</entry>
#include "dolphinsettings.h"
#include "dolphinview.h"
#include "dolphinviewcontainer.h"
+#include "dolphin_generalsettings.h"
#include <kactioncollection.h>
#include <kfileplacesmodel.h>
// Insert 'Actions' sub menu
KonqMenuActions menuActions;
menuActions.setItems(m_selectedItems);
- if (menuActions.addActionsTo(popup))
+ if (menuActions.addActionsTo(popup)) {
popup->addSeparator();
+ }
+
+ // Insert 'Copy To' and 'Move To' sub menus
+ if (DolphinSettings::instance().generalSettings()->showCopyMoveMenu()) {
+ m_copyToMenu.setItems(m_selectedItems);
+ m_copyToMenu.addActionsTo(popup);
+ popup->addSeparator();
+ }
// insert 'Properties...' entry
QAction* propertiesAction = m_mainWindow->actionCollection()->action("properties");
#include <kfileitem.h>
#include <kservice.h>
#include <kurl.h>
+#include <konq_copytomenu.h>
#include <QtCore/QObject>
KFileItemList m_selectedItems;
KUrl::List m_selectedUrls;
int m_context;
+ KonqCopyToMenu m_copyToMenu;
};
#endif
m_confirmMoveToTrash(0),
m_confirmDelete(0),
m_showDeleteCommand(0),
+ m_showCopyMoveMenu(0),
m_browseThroughArchives(0),
m_renameInline(0)
{
m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command in context menu"), vBox);
connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+ m_showCopyMoveMenu = new QCheckBox(i18nc("@option:check", "Show 'Copy To' and 'Move To' commands in context menu"), vBox);
+ connect(m_showCopyMoveMenu, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+
m_browseThroughArchives = new QCheckBox(i18nc("@option:check", "Browse through archives"), vBox);
connect(m_browseThroughArchives, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
kdeConfig.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
kdeConfig.sync();
+ settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked());
settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
settings->setRenameInline(m_renameInline->isChecked());
}
m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false));
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
+ m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu());
m_browseThroughArchives->setChecked(settings->browseThroughArchives());
m_renameInline->setChecked(settings->renameInline());
}
QCheckBox* m_confirmDelete;
QCheckBox* m_showDeleteCommand;
+ QCheckBox* m_showCopyMoveMenu;
QCheckBox* m_browseThroughArchives;
QCheckBox* m_renameInline;
};