2007-07-01 14:25:21 +00:00
|
|
|
/* This file is part of the KDE project
|
|
|
|
Copyright (c) 2007 David Faure <faure@kde.org>
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public License
|
|
|
|
along with this library; see the file COPYING.LIB. If not, write to
|
|
|
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "dolphinpart.h"
|
2013-02-09 20:56:51 +00:00
|
|
|
#include "dolphinremoveaction.h"
|
2007-07-02 17:24:54 +00:00
|
|
|
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KFileItemListProperties>
|
2007-11-23 11:50:00 +00:00
|
|
|
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KAboutData>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KActionCollection>
|
2015-02-24 12:07:35 +00:00
|
|
|
#include "dolphindebug.h"
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KIconLoader>
|
2014-10-18 12:42:41 +00:00
|
|
|
#include <KLocalizedString>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KMessageBox>
|
|
|
|
#include <KPluginFactory>
|
2011-04-10 16:32:53 +00:00
|
|
|
#include <KRun>
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KToolInvocation>
|
2008-06-04 11:51:54 +00:00
|
|
|
#include <kauthorized.h>
|
2014-10-10 21:36:36 +00:00
|
|
|
#include <QMenu>
|
2014-10-18 13:00:17 +00:00
|
|
|
#include <KSharedConfig>
|
|
|
|
#include <KConfigGroup>
|
2014-10-20 20:13:23 +00:00
|
|
|
#include <KMimeTypeEditor>
|
2015-02-26 16:40:06 +00:00
|
|
|
#include <KJobWidgets>
|
2012-09-12 19:54:37 +00:00
|
|
|
|
|
|
|
#include "dolphinpart_ext.h"
|
2013-08-28 16:46:45 +00:00
|
|
|
#include "dolphinnewfilemenu.h"
|
2010-07-24 21:45:49 +00:00
|
|
|
#include "views/dolphinview.h"
|
2010-07-24 22:08:30 +00:00
|
|
|
#include "views/dolphinviewactionhandler.h"
|
2010-08-27 05:26:27 +00:00
|
|
|
#include "views/dolphinnewfilemenuobserver.h"
|
2010-07-24 22:08:30 +00:00
|
|
|
#include "views/dolphinremoteencoding.h"
|
2012-09-05 02:26:28 +00:00
|
|
|
#include "kitemviews/kfileitemmodel.h"
|
|
|
|
#include "kitemviews/private/kfileitemmodeldirlister.h"
|
2009-03-21 11:49:10 +00:00
|
|
|
|
2014-10-18 13:00:17 +00:00
|
|
|
#include <QStandardPaths>
|
2007-11-15 20:04:05 +00:00
|
|
|
#include <QActionGroup>
|
2014-10-18 13:00:17 +00:00
|
|
|
#include <QTextDocument>
|
2007-09-19 20:33:28 +00:00
|
|
|
#include <QApplication>
|
2007-11-15 20:04:05 +00:00
|
|
|
#include <QClipboard>
|
2012-04-11 14:06:18 +00:00
|
|
|
#include <QDir>
|
2014-11-02 16:03:18 +00:00
|
|
|
#include <QKeyEvent>
|
2014-12-14 18:05:53 +00:00
|
|
|
#include <QInputDialog>
|
2007-07-01 14:25:21 +00:00
|
|
|
|
2008-04-17 21:49:53 +00:00
|
|
|
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
|
2007-07-01 14:25:21 +00:00
|
|
|
|
2008-04-17 21:49:53 +00:00
|
|
|
DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
|
2007-07-01 14:25:21 +00:00
|
|
|
: KParts::ReadOnlyPart(parent)
|
2012-07-18 02:47:10 +00:00
|
|
|
,m_openTerminalAction(0)
|
2013-02-09 20:56:51 +00:00
|
|
|
,m_removeAction(0)
|
2007-07-01 14:25:21 +00:00
|
|
|
{
|
|
|
|
Q_UNUSED(args)
|
2014-10-20 22:27:42 +00:00
|
|
|
setComponentData(*createAboutData(), false);
|
2007-07-02 17:24:54 +00:00
|
|
|
m_extension = new DolphinPartBrowserExtension(this);
|
2007-07-01 14:25:21 +00:00
|
|
|
|
2008-01-15 11:09:56 +00:00
|
|
|
// make sure that other apps using this part find Dolphin's view-file-columns icons
|
2016-03-16 21:17:37 +00:00
|
|
|
KIconLoader::global()->addAppDir(QStringLiteral("dolphin"));
|
2008-01-15 11:09:56 +00:00
|
|
|
|
2014-10-21 19:18:43 +00:00
|
|
|
m_view = new DolphinView(QUrl(), parentWidget);
|
2008-05-07 20:02:37 +00:00
|
|
|
m_view->setTabsForFilesEnabled(true);
|
2007-07-01 14:25:21 +00:00
|
|
|
setWidget(m_view);
|
2007-07-02 17:24:54 +00:00
|
|
|
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(&DolphinNewFileMenuObserver::instance(), &DolphinNewFileMenuObserver::errorMessage,
|
|
|
|
this, &DolphinPart::slotErrorMessage);
|
2013-08-28 16:46:45 +00:00
|
|
|
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_view, &DolphinView::directoryLoadingCompleted, this, static_cast<void(DolphinPart::*)()>(&DolphinPart::completed));
|
|
|
|
connect(m_view, &DolphinView::directoryLoadingProgress, this, &DolphinPart::updateProgress);
|
|
|
|
connect(m_view, &DolphinView::errorMessage, this, &DolphinPart::slotErrorMessage);
|
2011-01-09 13:58:35 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
setXMLFile(QStringLiteral("dolphinpart.rc"));
|
2007-10-10 23:01:35 +00:00
|
|
|
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_view, &DolphinView::infoMessage,
|
|
|
|
this, &DolphinPart::slotMessage);
|
|
|
|
connect(m_view, &DolphinView::operationCompletedMessage,
|
|
|
|
this, &DolphinPart::slotMessage);
|
|
|
|
connect(m_view, &DolphinView::errorMessage,
|
|
|
|
this, &DolphinPart::slotErrorMessage);
|
|
|
|
connect(m_view, &DolphinView::itemActivated,
|
|
|
|
this, &DolphinPart::slotItemActivated);
|
|
|
|
connect(m_view, &DolphinView::itemsActivated,
|
|
|
|
this, &DolphinPart::slotItemsActivated);
|
|
|
|
connect(m_view, &DolphinView::tabRequested,
|
|
|
|
this, &DolphinPart::createNewWindow);
|
|
|
|
connect(m_view, &DolphinView::requestContextMenu,
|
|
|
|
this, &DolphinPart::slotOpenContextMenu);
|
|
|
|
connect(m_view, &DolphinView::selectionChanged,
|
|
|
|
m_extension, static_cast<void(DolphinPartBrowserExtension::*)(const KFileItemList&)>(&DolphinPartBrowserExtension::selectionInfo));
|
|
|
|
connect(m_view, &DolphinView::selectionChanged,
|
|
|
|
this, &DolphinPart::slotSelectionChanged);
|
|
|
|
connect(m_view, &DolphinView::requestItemInfo,
|
|
|
|
this, &DolphinPart::slotRequestItemInfo);
|
|
|
|
connect(m_view, &DolphinView::modeChanged,
|
|
|
|
this, &DolphinPart::viewModeChanged); // relay signal
|
|
|
|
connect(m_view, &DolphinView::redirection,
|
|
|
|
this, &DolphinPart::slotDirectoryRedirection);
|
2008-10-13 21:54:03 +00:00
|
|
|
|
2008-10-05 18:11:46 +00:00
|
|
|
// Watch for changes that should result in updates to the
|
|
|
|
// status bar text.
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_view, &DolphinView::itemCountChanged, this, &DolphinPart::updateStatusBar);
|
|
|
|
connect(m_view, &DolphinView::selectionChanged, this, &DolphinPart::updateStatusBar);
|
2008-02-11 12:34:48 +00:00
|
|
|
|
|
|
|
m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
|
|
|
|
m_actionHandler->setCurrentView(m_view);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_actionHandler, &DolphinViewActionHandler::createDirectory, this, &DolphinPart::createDirectory);
|
2007-07-02 17:24:54 +00:00
|
|
|
|
2009-03-25 22:00:50 +00:00
|
|
|
m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(this, &DolphinPart::aboutToOpenURL,
|
|
|
|
m_remoteEncoding, &DolphinRemoteEncoding::slotAboutToOpenUrl);
|
2009-03-25 22:00:50 +00:00
|
|
|
|
2007-11-15 20:04:05 +00:00
|
|
|
QClipboard* clipboard = QApplication::clipboard();
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(clipboard, &QClipboard::dataChanged,
|
|
|
|
this, &DolphinPart::updatePasteAction);
|
2007-11-15 20:04:05 +00:00
|
|
|
|
2012-09-03 21:53:03 +00:00
|
|
|
// Create file info and listing filter extensions.
|
|
|
|
// NOTE: Listing filter needs to be instantiated after the creation of the view.
|
|
|
|
new DolphinPartFileInfoExtension(this);
|
2012-09-11 20:40:32 +00:00
|
|
|
|
2012-09-03 21:53:03 +00:00
|
|
|
new DolphinPartListingFilterExtension(this);
|
|
|
|
|
2012-09-05 02:26:28 +00:00
|
|
|
KDirLister* lister = m_view->m_model->m_dirLister;
|
|
|
|
if (lister) {
|
|
|
|
DolphinPartListingNotificationExtension* notifyExt = new DolphinPartListingNotificationExtension(this);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(lister, &KDirLister::newItems, notifyExt, &DolphinPartListingNotificationExtension::slotNewItems);
|
|
|
|
connect(lister, &KDirLister::itemsDeleted, notifyExt, &DolphinPartListingNotificationExtension::slotItemsDeleted);
|
2012-09-05 02:26:28 +00:00
|
|
|
} else {
|
2015-02-24 16:07:55 +00:00
|
|
|
qCWarning(DolphinDebug) << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported";
|
2012-09-05 02:26:28 +00:00
|
|
|
}
|
|
|
|
|
2007-10-10 23:01:35 +00:00
|
|
|
createActions();
|
2008-02-13 18:45:20 +00:00
|
|
|
m_actionHandler->updateViewActions();
|
2007-11-17 00:08:54 +00:00
|
|
|
slotSelectionChanged(KFileItemList()); // initially disable selection-dependent actions
|
2007-10-10 23:01:35 +00:00
|
|
|
|
2013-02-09 20:56:51 +00:00
|
|
|
// Listen to events from the app so we can update the remove key by
|
|
|
|
// checking for a Shift key press.
|
|
|
|
qApp->installEventFilter(this);
|
|
|
|
|
2007-07-02 17:24:54 +00:00
|
|
|
// TODO there was a "always open a new window" (when clicking on a directory) setting in konqueror
|
|
|
|
// (sort of spacial navigation)
|
2008-04-10 11:51:30 +00:00
|
|
|
|
|
|
|
loadPlugins(this, this, componentData());
|
2007-07-01 14:25:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DolphinPart::~DolphinPart()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-10-10 23:01:35 +00:00
|
|
|
void DolphinPart::createActions()
|
|
|
|
{
|
2008-06-05 19:19:14 +00:00
|
|
|
// Edit menu
|
|
|
|
|
2013-08-28 16:46:45 +00:00
|
|
|
m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this);
|
2010-08-27 05:26:27 +00:00
|
|
|
m_newFileMenu->setParentWidget(widget());
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_newFileMenu->menu(), &QMenu::aboutToShow,
|
|
|
|
this, &DolphinPart::updateNewMenu);
|
2008-06-05 19:19:14 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction *editMimeTypeAction = actionCollection()->addAction( QStringLiteral("editMimeType") );
|
2007-12-24 19:07:32 +00:00
|
|
|
editMimeTypeAction->setText( i18nc("@action:inmenu Edit", "&Edit File Type..." ) );
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(editMimeTypeAction, &QAction::triggered, this, &DolphinPart::slotEditMimeType);
|
2007-12-24 11:50:08 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction* selectItemsMatching = actionCollection()->addAction(QStringLiteral("select_items_matching"));
|
2009-11-25 08:46:04 +00:00
|
|
|
selectItemsMatching->setText(i18nc("@action:inmenu Edit", "Select Items Matching..."));
|
2014-09-14 20:49:25 +00:00
|
|
|
actionCollection()->setDefaultShortcut(selectItemsMatching, Qt::CTRL | Qt::Key_S);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(selectItemsMatching, &QAction::triggered, this, &DolphinPart::slotSelectItemsMatchingPattern);
|
2009-11-25 08:46:04 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction* unselectItemsMatching = actionCollection()->addAction(QStringLiteral("unselect_items_matching"));
|
2009-11-25 08:46:04 +00:00
|
|
|
unselectItemsMatching->setText(i18nc("@action:inmenu Edit", "Unselect Items Matching..."));
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(unselectItemsMatching, &QAction::triggered, this, &DolphinPart::slotUnselectItemsMatchingPattern);
|
2009-11-25 08:46:04 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
actionCollection()->addAction(KStandardAction::SelectAll, QStringLiteral("select_all"), m_view, SLOT(selectAll()));
|
2009-11-25 08:46:04 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction* unselectAll = actionCollection()->addAction(QStringLiteral("unselect_all"));
|
2009-11-25 08:46:04 +00:00
|
|
|
unselectAll->setText(i18nc("@action:inmenu Edit", "Unselect All"));
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(unselectAll, &QAction::triggered, m_view, &DolphinView::clearSelection);
|
2009-11-25 08:46:04 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction* invertSelection = actionCollection()->addAction(QStringLiteral("invert_selection"));
|
2009-11-25 08:46:04 +00:00
|
|
|
invertSelection->setText(i18nc("@action:inmenu Edit", "Invert Selection"));
|
2014-09-14 20:49:25 +00:00
|
|
|
actionCollection()->setDefaultShortcut(invertSelection, Qt::CTRL | Qt::SHIFT | Qt::Key_A);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(invertSelection, &QAction::triggered, m_view, &DolphinView::invertSelection);
|
2009-11-25 08:46:04 +00:00
|
|
|
|
2008-02-11 12:34:48 +00:00
|
|
|
// View menu: all done by DolphinViewActionHandler
|
2008-01-28 11:33:49 +00:00
|
|
|
|
2007-12-24 11:17:16 +00:00
|
|
|
// Go menu
|
|
|
|
|
|
|
|
QActionGroup* goActionGroup = new QActionGroup(this);
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(goActionGroup, &QActionGroup::triggered,
|
|
|
|
this, &DolphinPart::slotGoTriggered);
|
2007-12-24 11:17:16 +00:00
|
|
|
|
2007-12-25 00:43:40 +00:00
|
|
|
createGoAction("go_applications", "start-here-kde",
|
2014-11-03 22:52:18 +00:00
|
|
|
i18nc("@action:inmenu Go", "App&lications"), QStringLiteral("programs:/"),
|
2007-12-24 11:17:16 +00:00
|
|
|
goActionGroup);
|
2007-12-25 00:43:40 +00:00
|
|
|
createGoAction("go_network_folders", "folder-remote",
|
2014-11-03 22:52:18 +00:00
|
|
|
i18nc("@action:inmenu Go", "&Network Folders"), QStringLiteral("remote:/"),
|
2007-12-24 11:17:16 +00:00
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_settings", "preferences-system",
|
2014-11-03 22:52:18 +00:00
|
|
|
i18nc("@action:inmenu Go", "Sett&ings"), QStringLiteral("settings:/"),
|
2007-12-24 11:17:16 +00:00
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_trash", "user-trash",
|
2014-11-03 22:52:18 +00:00
|
|
|
i18nc("@action:inmenu Go", "Trash"), QStringLiteral("trash:/"),
|
2007-12-24 11:17:16 +00:00
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_autostart", "",
|
2014-04-06 01:32:55 +00:00
|
|
|
i18nc("@action:inmenu Go", "Autostart"), QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/autostart",
|
2007-12-24 11:17:16 +00:00
|
|
|
goActionGroup);
|
2008-06-04 11:51:54 +00:00
|
|
|
|
|
|
|
// Tools menu
|
2016-03-16 21:17:37 +00:00
|
|
|
m_findFileAction = actionCollection()->addAction(QStringLiteral("find_file"));
|
2012-07-18 02:47:10 +00:00
|
|
|
m_findFileAction->setText(i18nc("@action:inmenu Tools", "Find File..."));
|
2014-09-14 20:49:25 +00:00
|
|
|
actionCollection()->setDefaultShortcut(m_findFileAction, Qt::CTRL | Qt::Key_F);
|
2016-03-16 21:17:37 +00:00
|
|
|
m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile);
|
2011-04-10 16:32:53 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
if (KAuthorized::authorizeKAction(QStringLiteral("shell_access"))) {
|
|
|
|
m_openTerminalAction = actionCollection()->addAction(QStringLiteral("open_terminal"));
|
|
|
|
m_openTerminalAction->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
|
2012-07-18 02:47:10 +00:00
|
|
|
m_openTerminalAction->setText(i18nc("@action:inmenu Tools", "Open &Terminal"));
|
2014-04-10 14:53:41 +00:00
|
|
|
connect(m_openTerminalAction, &QAction::triggered, this, &DolphinPart::slotOpenTerminal);
|
2014-09-14 20:49:25 +00:00
|
|
|
actionCollection()->setDefaultShortcut(m_openTerminalAction, Qt::Key_F4);
|
2008-06-04 11:51:54 +00:00
|
|
|
}
|
2007-12-24 11:17:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::createGoAction(const char* name, const char* iconName,
|
|
|
|
const QString& text, const QString& url,
|
|
|
|
QActionGroup* actionGroup)
|
|
|
|
{
|
2014-04-06 01:32:55 +00:00
|
|
|
QAction* action = actionCollection()->addAction(name);
|
|
|
|
action->setIcon(QIcon::fromTheme(iconName));
|
2007-12-24 11:17:16 +00:00
|
|
|
action->setText(text);
|
|
|
|
action->setData(url);
|
|
|
|
action->setActionGroup(actionGroup);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotGoTriggered(QAction* action)
|
|
|
|
{
|
|
|
|
const QString url = action->data().toString();
|
2014-10-21 19:18:43 +00:00
|
|
|
emit m_extension->openUrlRequest(QUrl(url));
|
2007-11-15 14:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
|
|
|
|
{
|
2007-11-15 20:04:05 +00:00
|
|
|
const bool hasSelection = !selection.isEmpty();
|
2008-06-02 10:07:13 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
QAction* renameAction = actionCollection()->action(QStringLiteral("rename"));
|
|
|
|
QAction* moveToTrashAction = actionCollection()->action(QStringLiteral("move_to_trash"));
|
|
|
|
QAction* deleteAction = actionCollection()->action(QStringLiteral("delete"));
|
|
|
|
QAction* editMimeTypeAction = actionCollection()->action(QStringLiteral("editMimeType"));
|
|
|
|
QAction* propertiesAction = actionCollection()->action(QStringLiteral("properties"));
|
|
|
|
QAction* deleteWithTrashShortcut = actionCollection()->action(QStringLiteral("delete_shortcut")); // see DolphinViewActionHandler
|
2008-06-02 10:07:13 +00:00
|
|
|
|
2007-11-15 20:04:05 +00:00
|
|
|
if (!hasSelection) {
|
2016-03-16 21:17:37 +00:00
|
|
|
stateChanged(QStringLiteral("has_no_selection"));
|
2008-06-02 10:07:13 +00:00
|
|
|
|
|
|
|
emit m_extension->enableAction("cut", false);
|
|
|
|
emit m_extension->enableAction("copy", false);
|
2008-06-05 22:25:07 +00:00
|
|
|
deleteWithTrashShortcut->setEnabled(false);
|
2008-06-02 10:07:13 +00:00
|
|
|
editMimeTypeAction->setEnabled(false);
|
2007-11-15 14:59:02 +00:00
|
|
|
} else {
|
2016-03-16 21:17:37 +00:00
|
|
|
stateChanged(QStringLiteral("has_selection"));
|
2007-11-15 14:59:02 +00:00
|
|
|
|
2008-06-05 22:25:07 +00:00
|
|
|
// TODO share this code with DolphinMainWindow::updateEditActions (and the desktop code)
|
|
|
|
// in libkonq
|
2009-04-01 23:34:33 +00:00
|
|
|
KFileItemListProperties capabilities(selection);
|
2008-06-02 10:07:13 +00:00
|
|
|
const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
|
2008-06-04 11:51:54 +00:00
|
|
|
|
2008-06-02 10:07:13 +00:00
|
|
|
renameAction->setEnabled(capabilities.supportsMoving());
|
|
|
|
moveToTrashAction->setEnabled(enableMoveToTrash);
|
|
|
|
deleteAction->setEnabled(capabilities.supportsDeleting());
|
2008-06-05 22:25:07 +00:00
|
|
|
deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
|
2008-06-02 10:07:13 +00:00
|
|
|
editMimeTypeAction->setEnabled(true);
|
|
|
|
propertiesAction->setEnabled(true);
|
|
|
|
emit m_extension->enableAction("cut", capabilities.supportsMoving());
|
|
|
|
emit m_extension->enableAction("copy", true);
|
2007-11-15 14:59:02 +00:00
|
|
|
}
|
2007-11-15 20:04:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::updatePasteAction()
|
|
|
|
{
|
|
|
|
QPair<bool, QString> pasteInfo = m_view->pasteInfo();
|
|
|
|
emit m_extension->enableAction( "paste", pasteInfo.first );
|
|
|
|
emit m_extension->setActionText( "paste", pasteInfo.second );
|
2007-10-10 23:01:35 +00:00
|
|
|
}
|
|
|
|
|
2007-07-01 14:25:21 +00:00
|
|
|
KAboutData* DolphinPart::createAboutData()
|
|
|
|
{
|
2016-03-16 21:17:37 +00:00
|
|
|
return new KAboutData(QStringLiteral("dolphinpart"), i18nc("@title", "Dolphin Part"), QStringLiteral("0.1"));
|
2007-07-01 14:25:21 +00:00
|
|
|
}
|
|
|
|
|
2014-04-10 01:02:40 +00:00
|
|
|
bool DolphinPart::openUrl(const QUrl &url)
|
2007-07-01 14:25:21 +00:00
|
|
|
{
|
2008-05-05 00:42:33 +00:00
|
|
|
bool reload = arguments().reload();
|
|
|
|
// A bit of a workaround so that changing the namefilter works: force reload.
|
|
|
|
// Otherwise DolphinView wouldn't relist the URL, so nothing would happen.
|
2011-01-09 13:58:35 +00:00
|
|
|
if (m_nameFilter != m_view->nameFilter())
|
2008-05-05 00:42:33 +00:00
|
|
|
reload = true;
|
2007-08-28 21:47:20 +00:00
|
|
|
if (m_view->url() == url && !reload) { // DolphinView won't do anything in that case, so don't emit started
|
|
|
|
return true;
|
|
|
|
}
|
2007-08-28 20:20:05 +00:00
|
|
|
setUrl(url); // remember it at the KParts level
|
2014-10-21 19:18:43 +00:00
|
|
|
QUrl visibleUrl(url);
|
2008-05-05 00:42:33 +00:00
|
|
|
if (!m_nameFilter.isEmpty()) {
|
2014-10-21 19:18:43 +00:00
|
|
|
visibleUrl.setPath(visibleUrl.path() + '/' + m_nameFilter);
|
2008-05-05 00:42:33 +00:00
|
|
|
}
|
2014-10-21 19:18:43 +00:00
|
|
|
QString prettyUrl = visibleUrl.toDisplayString(QUrl::PreferLocalFile);
|
2007-11-11 21:03:59 +00:00
|
|
|
emit setWindowCaption(prettyUrl);
|
|
|
|
emit m_extension->setLocationBarUrl(prettyUrl);
|
2007-11-28 19:44:44 +00:00
|
|
|
emit started(0); // get the wheel to spin
|
2011-01-09 13:58:35 +00:00
|
|
|
m_view->setNameFilter(m_nameFilter);
|
2007-07-01 14:25:21 +00:00
|
|
|
m_view->setUrl(url);
|
2009-03-10 00:56:38 +00:00
|
|
|
updatePasteAction();
|
2008-04-09 07:02:55 +00:00
|
|
|
emit aboutToOpenURL();
|
2007-08-28 21:47:20 +00:00
|
|
|
if (reload)
|
2007-07-02 17:24:54 +00:00
|
|
|
m_view->reload();
|
2012-07-18 02:47:10 +00:00
|
|
|
// Disable "Find File" and "Open Terminal" actions for non-file URLs,
|
|
|
|
// e.g. ftp, smb, etc. #279283
|
|
|
|
const bool isLocalUrl = url.isLocalFile();
|
|
|
|
m_findFileAction->setEnabled(isLocalUrl);
|
|
|
|
if (m_openTerminalAction) {
|
|
|
|
m_openTerminalAction->setEnabled(isLocalUrl);
|
|
|
|
}
|
2007-07-01 14:25:21 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-07-29 21:56:37 +00:00
|
|
|
void DolphinPart::slotMessage(const QString& msg)
|
2007-07-02 17:24:54 +00:00
|
|
|
{
|
|
|
|
emit setStatusBarText(msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotErrorMessage(const QString& msg)
|
|
|
|
{
|
2015-02-24 16:07:55 +00:00
|
|
|
qCDebug(DolphinDebug) << msg;
|
2010-08-30 08:56:19 +00:00
|
|
|
emit canceled(msg);
|
|
|
|
//KMessageBox::error(m_view, msg);
|
2007-07-02 17:24:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotRequestItemInfo(const KFileItem& item)
|
|
|
|
{
|
2007-09-24 10:55:55 +00:00
|
|
|
emit m_extension->mouseOverInfo(item);
|
2008-10-05 18:11:46 +00:00
|
|
|
if (item.isNull()) {
|
|
|
|
updateStatusBar();
|
|
|
|
} else {
|
2013-08-01 12:14:40 +00:00
|
|
|
const QString escapedText = Qt::convertFromPlainText(item.getStatusBarInfo());
|
2016-03-16 21:17:37 +00:00
|
|
|
ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
|
2008-10-05 18:11:46 +00:00
|
|
|
}
|
2007-07-02 17:24:54 +00:00
|
|
|
}
|
|
|
|
|
2011-08-29 18:13:39 +00:00
|
|
|
void DolphinPart::slotItemActivated(const KFileItem& item)
|
2007-08-28 17:50:54 +00:00
|
|
|
{
|
2008-01-04 14:40:31 +00:00
|
|
|
KParts::OpenUrlArguments args;
|
2010-07-09 13:15:02 +00:00
|
|
|
// Forget about the known mimetype if a target URL is used.
|
|
|
|
// Testcase: network:/ with a item (mimetype "inode/some-foo-service") pointing to a http URL (html)
|
|
|
|
if (item.targetUrl() == item.url()) {
|
|
|
|
args.setMimeType(item.mimetype());
|
|
|
|
}
|
2008-01-04 14:40:31 +00:00
|
|
|
|
|
|
|
// Ideally, konqueror should be changed to not require trustedSource for directory views,
|
|
|
|
// since the idea was not to need BrowserArguments for non-browser stuff...
|
|
|
|
KParts::BrowserArguments browserArgs;
|
|
|
|
browserArgs.trustedSource = true;
|
2008-04-23 20:57:58 +00:00
|
|
|
emit m_extension->openUrlRequest(item.targetUrl(), args, browserArgs);
|
|
|
|
}
|
2008-01-04 14:40:31 +00:00
|
|
|
|
2012-12-13 21:54:09 +00:00
|
|
|
void DolphinPart::slotItemsActivated(const KFileItemList& items)
|
|
|
|
{
|
|
|
|
foreach (const KFileItem& item, items) {
|
|
|
|
slotItemActivated(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-20 22:27:42 +00:00
|
|
|
void DolphinPart::createNewWindow(const QUrl& url)
|
2008-04-23 20:57:58 +00:00
|
|
|
{
|
|
|
|
// TODO: Check issue N176832 for the missing QAIV signal; task 177399 - maybe this code
|
2011-08-29 18:13:39 +00:00
|
|
|
// should be moved into DolphinPart::slotItemActivated()
|
2009-04-07 12:45:02 +00:00
|
|
|
emit m_extension->createNewWindow(url);
|
2007-08-28 17:50:54 +00:00
|
|
|
}
|
|
|
|
|
2011-10-08 19:40:34 +00:00
|
|
|
void DolphinPart::slotOpenContextMenu(const QPoint& pos,
|
|
|
|
const KFileItem& _item,
|
2014-10-20 22:27:42 +00:00
|
|
|
const QUrl &,
|
2009-02-11 20:45:12 +00:00
|
|
|
const QList<QAction*>& customActions)
|
2007-08-28 19:48:36 +00:00
|
|
|
{
|
2007-10-01 17:06:34 +00:00
|
|
|
KParts::BrowserExtension::PopupFlags popupFlags = KParts::BrowserExtension::DefaultPopupItems
|
|
|
|
| KParts::BrowserExtension::ShowProperties
|
|
|
|
| KParts::BrowserExtension::ShowUrlOperations;
|
2007-08-28 19:48:36 +00:00
|
|
|
|
2007-09-19 20:33:28 +00:00
|
|
|
KFileItem item(_item);
|
2007-08-28 19:48:36 +00:00
|
|
|
|
2007-09-19 20:33:28 +00:00
|
|
|
if (item.isNull()) { // viewport context menu
|
|
|
|
popupFlags |= KParts::BrowserExtension::ShowNavigationItems | KParts::BrowserExtension::ShowUp;
|
2011-01-09 13:58:35 +00:00
|
|
|
item = m_view->rootItem();
|
2008-06-02 02:50:36 +00:00
|
|
|
if (item.isNull())
|
2014-12-14 16:46:58 +00:00
|
|
|
item = KFileItem(url());
|
2009-11-14 01:51:08 +00:00
|
|
|
else
|
|
|
|
item.setUrl(url()); // ensure we use the view url, not the canonical path (#213799)
|
2007-09-19 20:33:28 +00:00
|
|
|
}
|
2007-08-28 19:48:36 +00:00
|
|
|
|
2009-11-10 00:07:36 +00:00
|
|
|
// TODO: We should change the signature of the slots (and signals) for being able
|
|
|
|
// to tell for which items we want a popup.
|
2010-03-14 13:18:09 +00:00
|
|
|
KFileItemList items;
|
|
|
|
if (m_view->selectedItems().isEmpty()) {
|
|
|
|
items.append(item);
|
|
|
|
} else {
|
|
|
|
items = m_view->selectedItems();
|
|
|
|
}
|
|
|
|
|
2009-11-10 00:07:36 +00:00
|
|
|
KFileItemListProperties capabilities(items);
|
|
|
|
|
2007-11-15 14:59:02 +00:00
|
|
|
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
|
|
|
QList<QAction *> editActions;
|
2009-12-23 08:51:33 +00:00
|
|
|
editActions += m_view->versionControlActions(m_view->selectedItems());
|
2009-02-17 10:57:23 +00:00
|
|
|
editActions += customActions;
|
|
|
|
|
2008-04-27 22:35:49 +00:00
|
|
|
if (!_item.isNull()) { // only for context menu on one or more items
|
2013-06-24 05:11:16 +00:00
|
|
|
const bool supportsMoving = capabilities.supportsMoving();
|
|
|
|
|
|
|
|
if (capabilities.supportsDeleting()) {
|
2014-10-07 05:38:16 +00:00
|
|
|
const bool showDeleteAction = (KSharedConfig::openConfig()->group("KDE").readEntry("ShowDeleteCommand", false) ||
|
2013-06-24 05:11:16 +00:00
|
|
|
!item.isLocalFile());
|
|
|
|
const bool showMoveToTrashAction = capabilities.isLocal() && supportsMoving;
|
|
|
|
|
|
|
|
if (showDeleteAction && showMoveToTrashAction) {
|
|
|
|
delete m_removeAction;
|
|
|
|
m_removeAction = 0;
|
2016-03-16 21:17:37 +00:00
|
|
|
editActions.append(actionCollection()->action(QStringLiteral("move_to_trash")));
|
|
|
|
editActions.append(actionCollection()->action(QStringLiteral("delete")));
|
2013-06-24 05:11:16 +00:00
|
|
|
} else if (showDeleteAction && !showMoveToTrashAction) {
|
2016-03-16 21:17:37 +00:00
|
|
|
editActions.append(actionCollection()->action(QStringLiteral("delete")));
|
2013-06-24 05:11:16 +00:00
|
|
|
} else {
|
|
|
|
if (!m_removeAction)
|
|
|
|
m_removeAction = new DolphinRemoveAction(this, actionCollection());
|
|
|
|
editActions.append(m_removeAction);
|
|
|
|
m_removeAction->update();
|
|
|
|
}
|
|
|
|
} else {
|
2008-06-02 02:50:36 +00:00
|
|
|
popupFlags |= KParts::BrowserExtension::NoDeletion;
|
|
|
|
}
|
2008-06-04 11:51:54 +00:00
|
|
|
|
2009-11-10 00:07:36 +00:00
|
|
|
if (supportsMoving) {
|
2016-03-16 21:17:37 +00:00
|
|
|
editActions.append(actionCollection()->action(QStringLiteral("rename")));
|
2009-11-10 00:07:36 +00:00
|
|
|
}
|
2007-11-17 00:53:45 +00:00
|
|
|
|
2009-11-10 00:07:36 +00:00
|
|
|
// Normally KonqPopupMenu only shows the "Create new" submenu in the current view
|
2008-10-13 21:54:03 +00:00
|
|
|
// since otherwise the created file would not be visible.
|
|
|
|
// But in treeview mode we should allow it.
|
|
|
|
if (m_view->itemsExpandable())
|
|
|
|
popupFlags |= KParts::BrowserExtension::ShowCreateDirectory;
|
|
|
|
|
2007-11-17 00:53:45 +00:00
|
|
|
}
|
2008-04-27 22:35:49 +00:00
|
|
|
|
2016-03-16 21:17:37 +00:00
|
|
|
actionGroups.insert(QStringLiteral("editactions"), editActions);
|
2009-02-17 10:57:23 +00:00
|
|
|
|
2011-10-08 19:40:34 +00:00
|
|
|
emit m_extension->popupMenu(pos,
|
2008-04-27 22:35:49 +00:00
|
|
|
items,
|
|
|
|
KParts::OpenUrlArguments(),
|
|
|
|
KParts::BrowserArguments(),
|
|
|
|
popupFlags,
|
|
|
|
actionGroups);
|
2007-08-28 19:48:36 +00:00
|
|
|
}
|
|
|
|
|
2014-10-20 22:27:42 +00:00
|
|
|
void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUrl)
|
2009-01-16 13:21:33 +00:00
|
|
|
{
|
2015-02-24 16:07:55 +00:00
|
|
|
qCDebug(DolphinDebug) << oldUrl << newUrl << "currentUrl=" << url();
|
2014-10-20 22:27:42 +00:00
|
|
|
if (oldUrl.matches(url(), QUrl::StripTrailingSlash /* #207572 */)) {
|
2009-01-16 13:21:33 +00:00
|
|
|
KParts::ReadOnlyPart::setUrl(newUrl);
|
2014-10-20 22:27:42 +00:00
|
|
|
const QString prettyUrl = newUrl.toDisplayString(QUrl::PreferLocalFile);
|
2009-01-16 13:21:33 +00:00
|
|
|
emit m_extension->setLocationBarUrl(prettyUrl);
|
|
|
|
}
|
2008-05-28 23:07:09 +00:00
|
|
|
}
|
|
|
|
|
2007-11-17 00:08:54 +00:00
|
|
|
|
2007-12-24 11:50:08 +00:00
|
|
|
void DolphinPart::slotEditMimeType()
|
|
|
|
{
|
|
|
|
const KFileItemList items = m_view->selectedItems();
|
|
|
|
if (!items.isEmpty()) {
|
2014-10-20 20:13:23 +00:00
|
|
|
KMimeTypeEditor::editMimeType(items.first().mimetype(), m_view);
|
2007-12-24 19:07:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-25 08:46:04 +00:00
|
|
|
void DolphinPart::slotSelectItemsMatchingPattern()
|
|
|
|
{
|
|
|
|
openSelectionDialog(i18nc("@title:window", "Select"),
|
|
|
|
i18n("Select all items matching this pattern:"),
|
2010-11-04 17:27:11 +00:00
|
|
|
true);
|
2009-11-25 08:46:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotUnselectItemsMatchingPattern()
|
|
|
|
{
|
|
|
|
openSelectionDialog(i18nc("@title:window", "Unselect"),
|
|
|
|
i18n("Unselect all items matching this pattern:"),
|
2010-11-04 17:27:11 +00:00
|
|
|
false);
|
2009-11-25 08:46:04 +00:00
|
|
|
}
|
|
|
|
|
2010-11-04 17:27:11 +00:00
|
|
|
void DolphinPart::openSelectionDialog(const QString& title, const QString& text, bool selectItems)
|
2009-11-25 08:46:04 +00:00
|
|
|
{
|
|
|
|
bool okClicked;
|
2016-03-16 21:17:37 +00:00
|
|
|
const QString pattern = QInputDialog::getText(m_view, title, text, QLineEdit::Normal, QStringLiteral("*"), &okClicked);
|
2009-11-25 08:46:04 +00:00
|
|
|
|
|
|
|
if (okClicked && !pattern.isEmpty()) {
|
|
|
|
QRegExp patternRegExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);
|
2012-04-11 14:42:46 +00:00
|
|
|
m_view->selectItems(patternRegExp, selectItems);
|
2009-11-25 08:46:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-13 18:45:20 +00:00
|
|
|
void DolphinPart::setCurrentViewMode(const QString& viewModeName)
|
|
|
|
{
|
|
|
|
QAction* action = actionCollection()->action(viewModeName);
|
|
|
|
Q_ASSERT(action);
|
|
|
|
action->trigger();
|
|
|
|
}
|
|
|
|
|
|
|
|
QString DolphinPart::currentViewMode() const
|
|
|
|
{
|
|
|
|
return m_actionHandler->currentViewModeActionName();
|
|
|
|
}
|
|
|
|
|
2008-05-05 00:42:33 +00:00
|
|
|
void DolphinPart::setNameFilter(const QString& nameFilter)
|
|
|
|
{
|
|
|
|
// This is the "/home/dfaure/*.diff" kind of name filter (KDirLister::setNameFilter)
|
|
|
|
// which is unrelated to DolphinView::setNameFilter which is substring filtering in a proxy.
|
|
|
|
m_nameFilter = nameFilter;
|
|
|
|
// TODO save/restore name filter in saveState/restoreState like KonqDirPart did in kde3?
|
|
|
|
}
|
|
|
|
|
2008-06-04 11:51:54 +00:00
|
|
|
void DolphinPart::slotOpenTerminal()
|
|
|
|
{
|
|
|
|
QString dir(QDir::homePath());
|
|
|
|
|
2014-10-21 19:18:43 +00:00
|
|
|
QUrl u(url());
|
2008-06-04 11:51:54 +00:00
|
|
|
|
|
|
|
// If the given directory is not local, it can still be the URL of an
|
|
|
|
// ioslave using UDS_LOCAL_PATH which to be converted first.
|
2015-02-26 16:40:06 +00:00
|
|
|
KIO::StatJob* statJob = KIO::mostLocalUrl(u);
|
|
|
|
KJobWidgets::setWindow(statJob, widget());
|
|
|
|
statJob->exec();
|
|
|
|
u = statJob->mostLocalUrl();
|
2008-06-04 11:51:54 +00:00
|
|
|
|
|
|
|
//If the URL is local after the above conversion, set the directory.
|
|
|
|
if (u.isLocalFile()) {
|
2009-03-15 20:20:33 +00:00
|
|
|
dir = u.toLocalFile();
|
2008-06-04 11:51:54 +00:00
|
|
|
}
|
|
|
|
|
2008-06-05 19:19:14 +00:00
|
|
|
KToolInvocation::invokeTerminal(QString(), dir);
|
|
|
|
}
|
|
|
|
|
2011-04-10 16:32:53 +00:00
|
|
|
void DolphinPart::slotFindFile()
|
|
|
|
{
|
2016-03-16 21:17:37 +00:00
|
|
|
KRun::run(QStringLiteral("kfind"), {url()}, widget());
|
2011-04-10 16:32:53 +00:00
|
|
|
}
|
|
|
|
|
2008-06-05 19:19:14 +00:00
|
|
|
void DolphinPart::updateNewMenu()
|
|
|
|
{
|
2010-01-26 12:04:56 +00:00
|
|
|
// As requested by KNewFileMenu :
|
2010-08-27 05:26:27 +00:00
|
|
|
m_newFileMenu->checkUpToDate();
|
2011-07-30 18:13:09 +00:00
|
|
|
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
|
2008-06-05 19:19:14 +00:00
|
|
|
// And set the files that the menu apply on :
|
2010-08-27 05:26:27 +00:00
|
|
|
m_newFileMenu->setPopupFiles(url());
|
2008-06-04 11:51:54 +00:00
|
|
|
}
|
|
|
|
|
2008-10-05 18:11:46 +00:00
|
|
|
void DolphinPart::updateStatusBar()
|
|
|
|
{
|
2013-08-15 16:56:48 +00:00
|
|
|
const QString escapedText = Qt::convertFromPlainText(m_view->statusBarText());
|
2016-03-16 21:17:37 +00:00
|
|
|
emit ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
|
2008-10-05 18:11:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::updateProgress(int percent)
|
|
|
|
{
|
|
|
|
m_extension->loadingProgress(percent);
|
|
|
|
}
|
|
|
|
|
2009-03-26 18:44:36 +00:00
|
|
|
void DolphinPart::createDirectory()
|
|
|
|
{
|
2011-07-30 18:13:09 +00:00
|
|
|
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
|
2010-08-27 05:26:27 +00:00
|
|
|
m_newFileMenu->setPopupFiles(url());
|
|
|
|
m_newFileMenu->createDirectory();
|
2009-03-26 18:44:36 +00:00
|
|
|
}
|
|
|
|
|
2014-10-20 22:27:42 +00:00
|
|
|
void DolphinPart::setFilesToSelect(const QList<QUrl>& files)
|
2010-01-27 23:55:55 +00:00
|
|
|
{
|
2012-08-27 17:55:17 +00:00
|
|
|
if (files.isEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2010-01-27 23:55:55 +00:00
|
|
|
m_view->markUrlsAsSelected(files);
|
2012-08-27 17:55:17 +00:00
|
|
|
m_view->markUrlAsCurrent(files.at(0));
|
2010-01-27 23:55:55 +00:00
|
|
|
}
|
|
|
|
|
2013-02-09 20:56:51 +00:00
|
|
|
bool DolphinPart::eventFilter(QObject* obj, QEvent* event)
|
|
|
|
{
|
|
|
|
const int type = event->type();
|
|
|
|
|
|
|
|
if ((type == QEvent::KeyPress || type == QEvent::KeyRelease) && m_removeAction) {
|
|
|
|
QMenu* menu = qobject_cast<QMenu*>(obj);
|
|
|
|
if (menu && menu->parent() == m_view) {
|
|
|
|
QKeyEvent* ev = static_cast<QKeyEvent*>(event);
|
|
|
|
if (ev->key() == Qt::Key_Shift) {
|
|
|
|
m_removeAction->update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return KParts::ReadOnlyPart::eventFilter(obj, event);
|
|
|
|
}
|
|
|
|
|
2007-07-01 14:25:21 +00:00
|
|
|
#include "dolphinpart.moc"
|