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
|
|
|
#include <konq_operations.h>
|
|
|
|
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KAboutData>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KActionCollection>
|
|
|
|
#include <KConfigGroup>
|
|
|
|
#include <KDebug>
|
|
|
|
#include <KGlobalSettings>
|
|
|
|
#include <KIconLoader>
|
|
|
|
#include <KLocale>
|
|
|
|
#include <KMessageBox>
|
|
|
|
#include <KPluginFactory>
|
2011-04-10 16:32:53 +00:00
|
|
|
#include <KRun>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KToggleAction>
|
|
|
|
#include <KIO/NetAccess>
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KToolInvocation>
|
2008-06-04 11:51:54 +00:00
|
|
|
#include <kauthorized.h>
|
2011-02-10 09:59:35 +00:00
|
|
|
#include <KNewFileMenu>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KMenu>
|
2011-02-04 19:42:42 +00:00
|
|
|
#include <KInputDialog>
|
2011-02-04 14:43:21 +00:00
|
|
|
#include <KProtocolInfo>
|
2012-09-12 19:54:37 +00:00
|
|
|
#include <kdeversion.h>
|
|
|
|
|
|
|
|
#if KDE_IS_VERSION(4, 9, 2)
|
|
|
|
#include "dolphinpart_ext.h"
|
|
|
|
#endif
|
2007-11-15 20:04:05 +00:00
|
|
|
|
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
|
|
|
|
2007-11-15 20:04:05 +00:00
|
|
|
#include <QActionGroup>
|
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>
|
2013-07-01 00:02:21 +00:00
|
|
|
#include <QTextDocument>
|
2007-07-01 14:25:21 +00:00
|
|
|
|
2008-04-17 21:49:53 +00:00
|
|
|
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
|
2008-06-10 09:15:19 +00:00
|
|
|
K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin"))
|
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)
|
2008-04-10 11:51:30 +00:00
|
|
|
setComponentData(DolphinPartFactory::componentData(), 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
|
|
|
|
KIconLoader::global()->addAppDir("dolphin");
|
|
|
|
|
2011-01-09 13:58:35 +00:00
|
|
|
m_view = new DolphinView(KUrl(), 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
|
|
|
|
2012-04-17 23:56:34 +00:00
|
|
|
connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed()));
|
2012-04-11 19:52:15 +00:00
|
|
|
connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int)));
|
2011-01-09 13:58:35 +00:00
|
|
|
connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
|
|
|
|
|
2007-10-10 23:01:35 +00:00
|
|
|
setXMLFile("dolphinpart.rc");
|
|
|
|
|
2007-08-28 17:50:54 +00:00
|
|
|
connect(m_view, SIGNAL(infoMessage(QString)),
|
2009-07-29 21:56:37 +00:00
|
|
|
this, SLOT(slotMessage(QString)));
|
|
|
|
connect(m_view, SIGNAL(operationCompletedMessage(QString)),
|
|
|
|
this, SLOT(slotMessage(QString)));
|
2007-08-28 17:50:54 +00:00
|
|
|
connect(m_view, SIGNAL(errorMessage(QString)),
|
|
|
|
this, SLOT(slotErrorMessage(QString)));
|
2011-08-29 18:13:39 +00:00
|
|
|
connect(m_view, SIGNAL(itemActivated(KFileItem)),
|
|
|
|
this, SLOT(slotItemActivated(KFileItem)));
|
2012-12-13 21:54:09 +00:00
|
|
|
connect(m_view, SIGNAL(itemsActivated(KFileItemList)),
|
|
|
|
this, SLOT(slotItemsActivated(KFileItemList)));
|
2008-04-23 20:57:58 +00:00
|
|
|
connect(m_view, SIGNAL(tabRequested(KUrl)),
|
|
|
|
this, SLOT(createNewWindow(KUrl)));
|
2011-10-08 19:40:34 +00:00
|
|
|
connect(m_view, SIGNAL(requestContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)),
|
|
|
|
this, SLOT(slotOpenContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)));
|
2007-10-02 19:03:03 +00:00
|
|
|
connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
|
|
|
|
m_extension, SIGNAL(selectionInfo(KFileItemList)));
|
2007-11-15 14:59:02 +00:00
|
|
|
connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
|
|
|
|
this, SLOT(slotSelectionChanged(KFileItemList)));
|
2007-08-28 19:48:36 +00:00
|
|
|
connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
|
|
|
|
this, SLOT(slotRequestItemInfo(KFileItem)));
|
2011-07-30 18:13:09 +00:00
|
|
|
connect(m_view, SIGNAL(modeChanged(DolphinView::Mode,DolphinView::Mode)),
|
2008-02-13 18:45:20 +00:00
|
|
|
this, SIGNAL(viewModeChanged())); // relay signal
|
2011-07-31 11:33:56 +00:00
|
|
|
connect(m_view, SIGNAL(redirection(KUrl,KUrl)),
|
2012-04-11 19:52:15 +00:00
|
|
|
this, SLOT(slotDirectoryRedirection(KUrl,KUrl)));
|
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.
|
2011-01-09 13:58:35 +00:00
|
|
|
connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(updateStatusBar()));
|
2011-07-31 11:33:56 +00:00
|
|
|
connect(m_view, SIGNAL(selectionChanged(KFileItemList)), this, SLOT(updateStatusBar()));
|
2008-02-11 12:34:48 +00:00
|
|
|
|
|
|
|
m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
|
|
|
|
m_actionHandler->setCurrentView(m_view);
|
2009-03-26 18:44:36 +00:00
|
|
|
connect(m_actionHandler, SIGNAL(createDirectory()), SLOT(createDirectory()));
|
2007-07-02 17:24:54 +00:00
|
|
|
|
2009-03-25 22:00:50 +00:00
|
|
|
m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
|
|
|
|
connect(this, SIGNAL(aboutToOpenURL()),
|
|
|
|
m_remoteEncoding, SLOT(slotAboutToOpenUrl()));
|
|
|
|
|
2007-11-15 20:04:05 +00:00
|
|
|
QClipboard* clipboard = QApplication::clipboard();
|
|
|
|
connect(clipboard, SIGNAL(dataChanged()),
|
|
|
|
this, SLOT(updatePasteAction()));
|
|
|
|
|
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
|
|
|
|
|
|
|
#if KDE_IS_VERSION(4, 9, 2)
|
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);
|
|
|
|
connect(lister, SIGNAL(newItems(KFileItemList)), notifyExt, SLOT(slotNewItems(KFileItemList)));
|
|
|
|
connect(lister, SIGNAL(itemsDeleted(KFileItemList)), notifyExt, SLOT(slotItemsDeleted(KFileItemList)));
|
|
|
|
} else {
|
|
|
|
kWarning() << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported";
|
|
|
|
}
|
2012-09-11 20:40:32 +00:00
|
|
|
#endif
|
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()
|
|
|
|
{
|
2010-08-27 05:26:27 +00:00
|
|
|
DolphinNewFileMenuObserver::instance().detach(m_newFileMenu);
|
2007-07-01 14:25:21 +00:00
|
|
|
}
|
|
|
|
|
2007-10-10 23:01:35 +00:00
|
|
|
void DolphinPart::createActions()
|
|
|
|
{
|
2008-06-05 19:19:14 +00:00
|
|
|
// Edit menu
|
|
|
|
|
2010-08-27 05:26:27 +00:00
|
|
|
m_newFileMenu = new KNewFileMenu(actionCollection(), "new_menu", this);
|
|
|
|
m_newFileMenu->setParentWidget(widget());
|
|
|
|
DolphinNewFileMenuObserver::instance().attach(m_newFileMenu);
|
|
|
|
connect(m_newFileMenu->menu(), SIGNAL(aboutToShow()),
|
2008-06-05 19:19:14 +00:00
|
|
|
this, SLOT(updateNewMenu()));
|
|
|
|
|
2007-12-24 11:50:08 +00:00
|
|
|
KAction *editMimeTypeAction = actionCollection()->addAction( "editMimeType" );
|
2007-12-24 19:07:32 +00:00
|
|
|
editMimeTypeAction->setText( i18nc("@action:inmenu Edit", "&Edit File Type..." ) );
|
2007-12-24 11:50:08 +00:00
|
|
|
connect(editMimeTypeAction, SIGNAL(triggered()), SLOT(slotEditMimeType()));
|
|
|
|
|
2009-11-25 08:46:04 +00:00
|
|
|
KAction* selectItemsMatching = actionCollection()->addAction("select_items_matching");
|
|
|
|
selectItemsMatching->setText(i18nc("@action:inmenu Edit", "Select Items Matching..."));
|
|
|
|
selectItemsMatching->setShortcut(Qt::CTRL | Qt::Key_S);
|
|
|
|
connect(selectItemsMatching, SIGNAL(triggered()), this, SLOT(slotSelectItemsMatchingPattern()));
|
|
|
|
|
|
|
|
KAction* unselectItemsMatching = actionCollection()->addAction("unselect_items_matching");
|
|
|
|
unselectItemsMatching->setText(i18nc("@action:inmenu Edit", "Unselect Items Matching..."));
|
|
|
|
connect(unselectItemsMatching, SIGNAL(triggered()), this, SLOT(slotUnselectItemsMatchingPattern()));
|
|
|
|
|
|
|
|
actionCollection()->addAction(KStandardAction::SelectAll, "select_all", m_view, SLOT(selectAll()));
|
|
|
|
|
|
|
|
KAction* unselectAll = actionCollection()->addAction("unselect_all");
|
|
|
|
unselectAll->setText(i18nc("@action:inmenu Edit", "Unselect All"));
|
|
|
|
connect(unselectAll, SIGNAL(triggered()), m_view, SLOT(clearSelection()));
|
|
|
|
|
|
|
|
KAction* invertSelection = actionCollection()->addAction("invert_selection");
|
|
|
|
invertSelection->setText(i18nc("@action:inmenu Edit", "Invert Selection"));
|
|
|
|
invertSelection->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_A);
|
|
|
|
connect(invertSelection, SIGNAL(triggered()), m_view, SLOT(invertSelection()));
|
|
|
|
|
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);
|
|
|
|
connect(goActionGroup, SIGNAL(triggered(QAction*)),
|
|
|
|
this, SLOT(slotGoTriggered(QAction*)));
|
|
|
|
|
2007-12-25 00:43:40 +00:00
|
|
|
createGoAction("go_applications", "start-here-kde",
|
2007-12-24 11:17:16 +00:00
|
|
|
i18nc("@action:inmenu Go", "App&lications"), QString("programs:/"),
|
|
|
|
goActionGroup);
|
2007-12-25 00:43:40 +00:00
|
|
|
createGoAction("go_network_folders", "folder-remote",
|
2007-12-24 11:17:16 +00:00
|
|
|
i18nc("@action:inmenu Go", "&Network Folders"), QString("remote:/"),
|
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_settings", "preferences-system",
|
|
|
|
i18nc("@action:inmenu Go", "Sett&ings"), QString("settings:/"),
|
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_trash", "user-trash",
|
|
|
|
i18nc("@action:inmenu Go", "Trash"), QString("trash:/"),
|
|
|
|
goActionGroup);
|
|
|
|
createGoAction("go_autostart", "",
|
|
|
|
i18nc("@action:inmenu Go", "Autostart"), KGlobalSettings::autostartPath(),
|
|
|
|
goActionGroup);
|
2008-06-04 11:51:54 +00:00
|
|
|
|
|
|
|
// Tools menu
|
2012-07-18 02:47:10 +00:00
|
|
|
m_findFileAction = actionCollection()->addAction("find_file");
|
|
|
|
m_findFileAction->setText(i18nc("@action:inmenu Tools", "Find File..."));
|
|
|
|
m_findFileAction->setShortcut(Qt::CTRL | Qt::Key_F);
|
|
|
|
m_findFileAction->setIcon(KIcon("edit-find"));
|
|
|
|
connect(m_findFileAction, SIGNAL(triggered()), this, SLOT(slotFindFile()));
|
2011-04-10 16:32:53 +00:00
|
|
|
|
2008-06-04 11:51:54 +00:00
|
|
|
if (KAuthorized::authorizeKAction("shell_access")) {
|
2012-07-18 02:47:10 +00:00
|
|
|
m_openTerminalAction = actionCollection()->addAction("open_terminal");
|
|
|
|
m_openTerminalAction->setIcon(KIcon("utilities-terminal"));
|
|
|
|
m_openTerminalAction->setText(i18nc("@action:inmenu Tools", "Open &Terminal"));
|
|
|
|
connect(m_openTerminalAction, SIGNAL(triggered()), SLOT(slotOpenTerminal()));
|
|
|
|
m_openTerminalAction->setShortcut(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)
|
|
|
|
{
|
|
|
|
KAction* action = actionCollection()->addAction(name);
|
|
|
|
action->setIcon(KIcon(iconName));
|
|
|
|
action->setText(text);
|
|
|
|
action->setData(url);
|
|
|
|
action->setActionGroup(actionGroup);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPart::slotGoTriggered(QAction* action)
|
|
|
|
{
|
|
|
|
const QString url = action->data().toString();
|
|
|
|
emit m_extension->openUrlRequest(KUrl(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
|
|
|
|
|
|
|
QAction* renameAction = actionCollection()->action("rename");
|
|
|
|
QAction* moveToTrashAction = actionCollection()->action("move_to_trash");
|
|
|
|
QAction* deleteAction = actionCollection()->action("delete");
|
|
|
|
QAction* editMimeTypeAction = actionCollection()->action("editMimeType");
|
|
|
|
QAction* propertiesAction = actionCollection()->action("properties");
|
2008-06-05 22:25:07 +00:00
|
|
|
QAction* deleteWithTrashShortcut = actionCollection()->action("delete_shortcut"); // see DolphinViewActionHandler
|
2008-06-02 10:07:13 +00:00
|
|
|
|
2007-11-15 20:04:05 +00:00
|
|
|
if (!hasSelection) {
|
2007-11-15 14:59:02 +00:00
|
|
|
stateChanged("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 {
|
|
|
|
stateChanged("has_selection");
|
|
|
|
|
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()
|
|
|
|
{
|
2007-11-23 23:29:45 +00:00
|
|
|
return new KAboutData("dolphinpart", "dolphin", ki18nc("@title", "Dolphin Part"), "0.1");
|
2007-07-01 14:25:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DolphinPart::openUrl(const KUrl& url)
|
|
|
|
{
|
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
|
2008-05-05 00:42:33 +00:00
|
|
|
KUrl visibleUrl(url);
|
|
|
|
if (!m_nameFilter.isEmpty()) {
|
|
|
|
visibleUrl.addPath(m_nameFilter);
|
|
|
|
}
|
|
|
|
QString prettyUrl = visibleUrl.pathOrUrl();
|
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)
|
|
|
|
{
|
2010-08-30 08:56:19 +00:00
|
|
|
kDebug() << msg;
|
|
|
|
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());
|
2013-07-01 00:02:21 +00:00
|
|
|
ReadOnlyPart::setStatusBarText(QString("<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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-23 20:57:58 +00:00
|
|
|
void DolphinPart::createNewWindow(const KUrl& url)
|
|
|
|
{
|
|
|
|
// 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,
|
2009-02-11 20:45:12 +00:00
|
|
|
const KUrl&,
|
|
|
|
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())
|
|
|
|
item = KFileItem( S_IFDIR, (mode_t)-1, 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()) {
|
|
|
|
const bool showDeleteAction = (KGlobal::config()->group("KDE").readEntry("ShowDeleteCommand", false) ||
|
|
|
|
!item.isLocalFile());
|
|
|
|
const bool showMoveToTrashAction = capabilities.isLocal() && supportsMoving;
|
|
|
|
|
|
|
|
if (showDeleteAction && showMoveToTrashAction) {
|
|
|
|
delete m_removeAction;
|
|
|
|
m_removeAction = 0;
|
|
|
|
editActions.append(actionCollection()->action("move_to_trash"));
|
|
|
|
editActions.append(actionCollection()->action("delete"));
|
|
|
|
} else if (showDeleteAction && !showMoveToTrashAction) {
|
|
|
|
editActions.append(actionCollection()->action("delete"));
|
|
|
|
} 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) {
|
2008-06-02 02:50:36 +00:00
|
|
|
editActions.append(actionCollection()->action("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
|
|
|
|
2009-02-17 10:57:23 +00:00
|
|
|
actionGroups.insert("editactions", editActions);
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2012-04-11 19:52:15 +00:00
|
|
|
void DolphinPart::slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl)
|
2009-01-16 13:21:33 +00:00
|
|
|
{
|
|
|
|
//kDebug() << oldUrl << newUrl << "currentUrl=" << url();
|
2009-09-21 11:09:24 +00:00
|
|
|
if (oldUrl.equals(url(), KUrl::CompareWithoutTrailingSlash /* #207572 */)) {
|
2009-01-16 13:21:33 +00:00
|
|
|
KParts::ReadOnlyPart::setUrl(newUrl);
|
|
|
|
const QString prettyUrl = newUrl.pathOrUrl();
|
|
|
|
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()) {
|
2007-12-24 19:07:32 +00:00
|
|
|
KonqOperations::editMimeType(items.first().mimetype(), m_view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
QString pattern = KInputDialog::getText(title, text, "*", &okClicked, m_view);
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
KUrl u(url());
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
u = KIO::NetAccess::mostLocalUrl(u, widget());
|
|
|
|
|
|
|
|
//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()
|
|
|
|
{
|
|
|
|
KRun::run("kfind", url(), widget());
|
|
|
|
}
|
|
|
|
|
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()
|
|
|
|
{
|
|
|
|
emit ReadOnlyPart::setStatusBarText(m_view->statusBarText());
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2010-01-27 23:55:55 +00:00
|
|
|
void DolphinPart::setFilesToSelect(const KUrl::List& files)
|
|
|
|
{
|
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);
|
|
|
|
}
|
|
|
|
|
2010-11-01 16:56:47 +00:00
|
|
|
////
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::restoreState(QDataStream &stream)
|
|
|
|
{
|
|
|
|
KParts::BrowserExtension::restoreState(stream);
|
|
|
|
m_part->view()->restoreState(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::saveState(QDataStream &stream)
|
|
|
|
{
|
|
|
|
KParts::BrowserExtension::saveState(stream);
|
|
|
|
m_part->view()->saveState(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::cut()
|
|
|
|
{
|
|
|
|
m_part->view()->cutSelectedItems();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::copy()
|
|
|
|
{
|
|
|
|
m_part->view()->copySelectedItems();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::paste()
|
|
|
|
{
|
|
|
|
m_part->view()->paste();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::pasteTo(const KUrl&)
|
|
|
|
{
|
|
|
|
m_part->view()->pasteIntoFolder();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DolphinPartBrowserExtension::reparseConfiguration()
|
|
|
|
{
|
2012-01-30 15:36:40 +00:00
|
|
|
m_part->view()->readSettings();
|
2010-11-01 16:56:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
////
|
|
|
|
|
|
|
|
DolphinPartFileInfoExtension::DolphinPartFileInfoExtension(DolphinPart* part)
|
|
|
|
: KParts::FileInfoExtension(part)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
DolphinPart* DolphinPartFileInfoExtension::part() const
|
|
|
|
{
|
|
|
|
return static_cast<DolphinPart*>(parent());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DolphinPartFileInfoExtension::hasSelection() const
|
|
|
|
{
|
2012-04-11 14:42:46 +00:00
|
|
|
return part()->view()->selectedItemsCount() > 0;
|
2010-11-01 16:56:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
KParts::FileInfoExtension::QueryModes DolphinPartFileInfoExtension::supportedQueryModes() const
|
|
|
|
{
|
|
|
|
return (KParts::FileInfoExtension::AllItems | KParts::FileInfoExtension::SelectedItems);
|
|
|
|
}
|
|
|
|
|
|
|
|
KFileItemList DolphinPartFileInfoExtension::queryFor(KParts::FileInfoExtension::QueryMode mode) const
|
|
|
|
{
|
|
|
|
KFileItemList list;
|
|
|
|
|
|
|
|
if (mode == KParts::FileInfoExtension::None)
|
|
|
|
return list;
|
|
|
|
|
|
|
|
if (!(supportedQueryModes() & mode))
|
|
|
|
return list;
|
|
|
|
|
|
|
|
switch (mode) {
|
|
|
|
case KParts::FileInfoExtension::SelectedItems:
|
|
|
|
if (hasSelection())
|
|
|
|
return part()->view()->selectedItems();
|
|
|
|
break;
|
|
|
|
case KParts::FileInfoExtension::AllItems:
|
2010-11-04 17:27:11 +00:00
|
|
|
return part()->view()->items();
|
2010-11-01 16:56:47 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2007-07-01 14:25:21 +00:00
|
|
|
#include "dolphinpart.moc"
|