mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: adjust to kparts changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d53f503cad
commit
0dc8347c49
33 changed files with 197 additions and 3197 deletions
|
@ -96,35 +96,6 @@ install(
|
|||
DESTINATION ${KDE4_LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
##########################################
|
||||
|
||||
set(dolphinpart_SRCS
|
||||
dolphinpart.cpp
|
||||
dolphinpart_ext.cpp
|
||||
)
|
||||
|
||||
kde4_add_plugin(dolphinpart ${dolphinpart_SRCS})
|
||||
|
||||
target_link_libraries(dolphinpart
|
||||
KDE4::kparts
|
||||
KDE4::kfile
|
||||
dolphinprivate
|
||||
konq
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS dolphinpart
|
||||
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES dolphinpart.rc
|
||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/dolphinpart
|
||||
)
|
||||
install(
|
||||
FILES dolphinpart.desktop
|
||||
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
|
||||
)
|
||||
install(
|
||||
FILES views/versioncontrol/fileviewversioncontrolplugin.desktop
|
||||
DESTINATION ${KDE4_SERVICETYPES_INSTALL_DIR}
|
||||
|
|
|
@ -1,591 +0,0 @@
|
|||
/* 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"
|
||||
#include "dolphinremoveaction.h"
|
||||
|
||||
#include <KFileItemListProperties>
|
||||
#include <konq_operations.h>
|
||||
|
||||
#include <KAboutData>
|
||||
#include <KActionCollection>
|
||||
#include <KConfigGroup>
|
||||
#include <KDebug>
|
||||
#include <KIconLoader>
|
||||
#include <KLocale>
|
||||
#include <KMessageBox>
|
||||
#include <KPluginFactory>
|
||||
#include <KRun>
|
||||
#include <KToggleAction>
|
||||
#include <KIO/NetAccess>
|
||||
#include <KToolInvocation>
|
||||
#include <KMenu>
|
||||
#include <KInputDialog>
|
||||
#include <KProtocolInfo>
|
||||
#include <kdeversion.h>
|
||||
|
||||
|
||||
#include "dolphinpart_ext.h"
|
||||
#include "dolphinnewfilemenu.h"
|
||||
#include "views/dolphinview.h"
|
||||
#include "views/dolphinviewactionhandler.h"
|
||||
#include "views/dolphinnewfilemenuobserver.h"
|
||||
#include "views/dolphinremoteencoding.h"
|
||||
#include "kitemviews/kfileitemmodel.h"
|
||||
#include "kitemviews/private/kfileitemmodeldirlister.h"
|
||||
|
||||
#include <QActionGroup>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDir>
|
||||
#include <QTextDocument>
|
||||
|
||||
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
|
||||
K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin"))
|
||||
|
||||
DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
|
||||
: KParts::ReadOnlyPart(parent)
|
||||
,m_openTerminalAction(0)
|
||||
,m_removeAction(0)
|
||||
{
|
||||
Q_UNUSED(args)
|
||||
setComponentData(DolphinPartFactory::componentData());
|
||||
m_extension = new DolphinPartBrowserExtension(this);
|
||||
|
||||
// make sure that other apps using this part find Dolphin's view-file-columns icons
|
||||
KIconLoader::global()->addAppDir("dolphin");
|
||||
|
||||
m_view = new DolphinView(KUrl(), parentWidget);
|
||||
m_view->setTabsForFilesEnabled(true);
|
||||
setWidget(m_view);
|
||||
|
||||
connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)),
|
||||
this, SLOT(slotErrorMessage(QString)));
|
||||
|
||||
connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed()));
|
||||
connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int)));
|
||||
connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
|
||||
|
||||
setXMLFile("dolphinpart.rc");
|
||||
|
||||
connect(m_view, SIGNAL(infoMessage(QString)),
|
||||
this, SLOT(slotMessage(QString)));
|
||||
connect(m_view, SIGNAL(operationCompletedMessage(QString)),
|
||||
this, SLOT(slotMessage(QString)));
|
||||
connect(m_view, SIGNAL(errorMessage(QString)),
|
||||
this, SLOT(slotErrorMessage(QString)));
|
||||
connect(m_view, SIGNAL(itemActivated(KFileItem)),
|
||||
this, SLOT(slotItemActivated(KFileItem)));
|
||||
connect(m_view, SIGNAL(itemsActivated(KFileItemList)),
|
||||
this, SLOT(slotItemsActivated(KFileItemList)));
|
||||
connect(m_view, SIGNAL(tabRequested(KUrl)),
|
||||
this, SLOT(createNewWindow(KUrl)));
|
||||
connect(m_view, SIGNAL(requestContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)),
|
||||
this, SLOT(slotOpenContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)));
|
||||
connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
|
||||
m_extension, SIGNAL(selectionInfo(KFileItemList)));
|
||||
connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
|
||||
this, SLOT(slotSelectionChanged(KFileItemList)));
|
||||
connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
|
||||
this, SLOT(slotRequestItemInfo(KFileItem)));
|
||||
connect(m_view, SIGNAL(modeChanged(DolphinView::Mode,DolphinView::Mode)),
|
||||
this, SIGNAL(viewModeChanged())); // relay signal
|
||||
connect(m_view, SIGNAL(redirection(KUrl,KUrl)),
|
||||
this, SLOT(slotDirectoryRedirection(KUrl,KUrl)));
|
||||
|
||||
// Watch for changes that should result in updates to the
|
||||
// status bar text.
|
||||
connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(updateStatusBar()));
|
||||
connect(m_view, SIGNAL(selectionChanged(KFileItemList)), this, SLOT(updateStatusBar()));
|
||||
|
||||
m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
|
||||
m_actionHandler->setCurrentView(m_view);
|
||||
connect(m_actionHandler, SIGNAL(createDirectory()), SLOT(createDirectory()));
|
||||
|
||||
m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
|
||||
connect(this, SIGNAL(aboutToOpenURL()),
|
||||
m_remoteEncoding, SLOT(slotAboutToOpenUrl()));
|
||||
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
connect(clipboard, SIGNAL(dataChanged()),
|
||||
this, SLOT(updatePasteAction()));
|
||||
|
||||
createActions();
|
||||
m_actionHandler->updateViewActions();
|
||||
slotSelectionChanged(KFileItemList()); // initially disable selection-dependent actions
|
||||
|
||||
// Listen to events from the app so we can update the remove key by
|
||||
// checking for a Shift key press.
|
||||
qApp->installEventFilter(this);
|
||||
|
||||
// TODO there was a "always open a new window" (when clicking on a directory) setting in konqueror
|
||||
// (sort of spacial navigation)
|
||||
}
|
||||
|
||||
DolphinPart::~DolphinPart()
|
||||
{
|
||||
}
|
||||
|
||||
void DolphinPart::createActions()
|
||||
{
|
||||
// Edit menu
|
||||
|
||||
m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this);
|
||||
m_newFileMenu->setParentWidget(widget());
|
||||
connect(m_newFileMenu->menu(), SIGNAL(aboutToShow()),
|
||||
this, SLOT(updateNewMenu()));
|
||||
|
||||
KAction *editMimeTypeAction = actionCollection()->addAction( "editMimeType" );
|
||||
editMimeTypeAction->setText( i18nc("@action:inmenu Edit", "&Edit File Type..." ) );
|
||||
connect(editMimeTypeAction, SIGNAL(triggered()), SLOT(slotEditMimeType()));
|
||||
|
||||
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()));
|
||||
|
||||
// View menu: all done by DolphinViewActionHandler
|
||||
|
||||
// Go menu
|
||||
|
||||
QActionGroup* goActionGroup = new QActionGroup(this);
|
||||
connect(goActionGroup, SIGNAL(triggered(QAction*)),
|
||||
this, SLOT(slotGoTriggered(QAction*)));
|
||||
|
||||
createGoAction("go_applications", "start-here-kde",
|
||||
i18nc("@action:inmenu Go", "App&lications"), QString("programs:/"),
|
||||
goActionGroup);
|
||||
createGoAction("go_network_folders", "folder-remote",
|
||||
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);
|
||||
|
||||
// Tools menu
|
||||
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()));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
|
||||
{
|
||||
const bool hasSelection = !selection.isEmpty();
|
||||
|
||||
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");
|
||||
QAction* deleteWithTrashShortcut = actionCollection()->action("delete_shortcut"); // see DolphinViewActionHandler
|
||||
|
||||
if (!hasSelection) {
|
||||
stateChanged("has_no_selection");
|
||||
|
||||
emit m_extension->enableAction("cut", false);
|
||||
emit m_extension->enableAction("copy", false);
|
||||
deleteWithTrashShortcut->setEnabled(false);
|
||||
editMimeTypeAction->setEnabled(false);
|
||||
} else {
|
||||
stateChanged("has_selection");
|
||||
|
||||
// TODO share this code with DolphinMainWindow::updateEditActions (and the desktop code)
|
||||
// in libkonq
|
||||
KFileItemListProperties capabilities(selection);
|
||||
const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
|
||||
|
||||
renameAction->setEnabled(capabilities.supportsMoving());
|
||||
moveToTrashAction->setEnabled(enableMoveToTrash);
|
||||
deleteAction->setEnabled(capabilities.supportsDeleting());
|
||||
deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
|
||||
editMimeTypeAction->setEnabled(true);
|
||||
propertiesAction->setEnabled(true);
|
||||
emit m_extension->enableAction("cut", capabilities.supportsMoving());
|
||||
emit m_extension->enableAction("copy", true);
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinPart::updatePasteAction()
|
||||
{
|
||||
QPair<bool, QString> pasteInfo = m_view->pasteInfo();
|
||||
emit m_extension->enableAction( "paste", pasteInfo.first );
|
||||
emit m_extension->setActionText( "paste", pasteInfo.second );
|
||||
}
|
||||
|
||||
KAboutData* DolphinPart::createAboutData()
|
||||
{
|
||||
return new KAboutData("dolphinpart", "dolphin", ki18nc("@title", "Dolphin Part"), "0.1");
|
||||
}
|
||||
|
||||
bool DolphinPart::openUrl(const KUrl& url)
|
||||
{
|
||||
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.
|
||||
if (m_nameFilter != m_view->nameFilter())
|
||||
reload = true;
|
||||
if (m_view->url() == url && !reload) { // DolphinView won't do anything in that case, so don't emit started
|
||||
return true;
|
||||
}
|
||||
setUrl(url); // remember it at the KParts level
|
||||
KUrl visibleUrl(url);
|
||||
if (!m_nameFilter.isEmpty()) {
|
||||
visibleUrl.addPath(m_nameFilter);
|
||||
}
|
||||
QString prettyUrl = visibleUrl.pathOrUrl();
|
||||
emit setWindowCaption(prettyUrl);
|
||||
emit m_extension->setLocationBarUrl(prettyUrl);
|
||||
emit started(0); // get the wheel to spin
|
||||
m_view->setNameFilter(m_nameFilter);
|
||||
m_view->setUrl(url);
|
||||
updatePasteAction();
|
||||
emit aboutToOpenURL();
|
||||
if (reload)
|
||||
m_view->reload();
|
||||
// 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);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DolphinPart::slotMessage(const QString& msg)
|
||||
{
|
||||
emit setStatusBarText(msg);
|
||||
}
|
||||
|
||||
void DolphinPart::slotErrorMessage(const QString& msg)
|
||||
{
|
||||
kDebug() << msg;
|
||||
emit canceled(msg);
|
||||
//KMessageBox::error(m_view, msg);
|
||||
}
|
||||
|
||||
void DolphinPart::slotRequestItemInfo(const KFileItem& item)
|
||||
{
|
||||
emit m_extension->mouseOverInfo(item);
|
||||
if (item.isNull()) {
|
||||
updateStatusBar();
|
||||
} else {
|
||||
const QString escapedText = Qt::convertFromPlainText(item.getStatusBarInfo());
|
||||
ReadOnlyPart::setStatusBarText(QString("<qt>%1</qt>").arg(escapedText));
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinPart::slotItemActivated(const KFileItem& item)
|
||||
{
|
||||
KParts::OpenUrlArguments args;
|
||||
// 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());
|
||||
}
|
||||
|
||||
// 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;
|
||||
emit m_extension->openUrlRequest(item.targetUrl(), args, browserArgs);
|
||||
}
|
||||
|
||||
void DolphinPart::slotItemsActivated(const KFileItemList& items)
|
||||
{
|
||||
foreach (const KFileItem& item, items) {
|
||||
slotItemActivated(item);
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinPart::createNewWindow(const KUrl& url)
|
||||
{
|
||||
// TODO: Check issue N176832 for the missing QAIV signal; task 177399 - maybe this code
|
||||
// should be moved into DolphinPart::slotItemActivated()
|
||||
emit m_extension->createNewWindow(url);
|
||||
}
|
||||
|
||||
void DolphinPart::slotOpenContextMenu(const QPoint& pos,
|
||||
const KFileItem& _item,
|
||||
const KUrl&,
|
||||
const QList<QAction*>& customActions)
|
||||
{
|
||||
KParts::BrowserExtension::PopupFlags popupFlags = KParts::BrowserExtension::DefaultPopupItems
|
||||
| KParts::BrowserExtension::ShowProperties
|
||||
| KParts::BrowserExtension::ShowUrlOperations;
|
||||
|
||||
KFileItem item(_item);
|
||||
|
||||
if (item.isNull()) { // viewport context menu
|
||||
popupFlags |= KParts::BrowserExtension::ShowNavigationItems | KParts::BrowserExtension::ShowUp;
|
||||
item = m_view->rootItem();
|
||||
if (item.isNull())
|
||||
item = KFileItem( S_IFDIR, (mode_t)-1, url() );
|
||||
else
|
||||
item.setUrl(url()); // ensure we use the view url, not the canonical path (#213799)
|
||||
}
|
||||
|
||||
// TODO: We should change the signature of the slots (and signals) for being able
|
||||
// to tell for which items we want a popup.
|
||||
KFileItemList items;
|
||||
if (m_view->selectedItems().isEmpty()) {
|
||||
items.append(item);
|
||||
} else {
|
||||
items = m_view->selectedItems();
|
||||
}
|
||||
|
||||
KFileItemListProperties capabilities(items);
|
||||
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
QList<QAction *> editActions;
|
||||
editActions += m_view->versionControlActions(m_view->selectedItems());
|
||||
editActions += customActions;
|
||||
|
||||
if (!_item.isNull()) { // only for context menu on one or more items
|
||||
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 {
|
||||
popupFlags |= KParts::BrowserExtension::NoDeletion;
|
||||
}
|
||||
|
||||
if (supportsMoving) {
|
||||
editActions.append(actionCollection()->action("rename"));
|
||||
}
|
||||
|
||||
// Normally KonqPopupMenu only shows the "Create new" submenu in the current view
|
||||
// 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;
|
||||
|
||||
}
|
||||
|
||||
actionGroups.insert("editactions", editActions);
|
||||
|
||||
emit m_extension->popupMenu(pos,
|
||||
items,
|
||||
KParts::OpenUrlArguments(),
|
||||
KParts::BrowserArguments(),
|
||||
popupFlags,
|
||||
actionGroups);
|
||||
}
|
||||
|
||||
void DolphinPart::slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl)
|
||||
{
|
||||
//kDebug() << oldUrl << newUrl << "currentUrl=" << url();
|
||||
if (oldUrl.equals(url(), KUrl::RemoveTrailingSlash /* #207572 */)) {
|
||||
KParts::ReadOnlyPart::setUrl(newUrl);
|
||||
const QString prettyUrl = newUrl.pathOrUrl();
|
||||
emit m_extension->setLocationBarUrl(prettyUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DolphinPart::slotEditMimeType()
|
||||
{
|
||||
const KFileItemList items = m_view->selectedItems();
|
||||
if (!items.isEmpty()) {
|
||||
KonqOperations::editMimeType(items.first().mimetype(), m_view);
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinPart::slotSelectItemsMatchingPattern()
|
||||
{
|
||||
openSelectionDialog(i18nc("@title:window", "Select"),
|
||||
i18n("Select all items matching this pattern:"),
|
||||
true);
|
||||
}
|
||||
|
||||
void DolphinPart::slotUnselectItemsMatchingPattern()
|
||||
{
|
||||
openSelectionDialog(i18nc("@title:window", "Unselect"),
|
||||
i18n("Unselect all items matching this pattern:"),
|
||||
false);
|
||||
}
|
||||
|
||||
void DolphinPart::openSelectionDialog(const QString& title, const QString& text, bool selectItems)
|
||||
{
|
||||
bool okClicked;
|
||||
QString pattern = KInputDialog::getText(title, text, "*", &okClicked, m_view);
|
||||
|
||||
if (okClicked && !pattern.isEmpty()) {
|
||||
QRegExp patternRegExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);
|
||||
m_view->selectItems(patternRegExp, selectItems);
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinPart::setCurrentViewMode(const QString& viewModeName)
|
||||
{
|
||||
QAction* action = actionCollection()->action(viewModeName);
|
||||
Q_ASSERT(action);
|
||||
action->trigger();
|
||||
}
|
||||
|
||||
QString DolphinPart::currentViewMode() const
|
||||
{
|
||||
return m_actionHandler->currentViewModeActionName();
|
||||
}
|
||||
|
||||
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?
|
||||
}
|
||||
|
||||
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()) {
|
||||
dir = u.toLocalFile();
|
||||
}
|
||||
|
||||
KToolInvocation::invokeTerminal(QString(), dir);
|
||||
}
|
||||
|
||||
void DolphinPart::slotFindFile()
|
||||
{
|
||||
KRun::run("kfind", url(), widget());
|
||||
}
|
||||
|
||||
void DolphinPart::updateNewMenu()
|
||||
{
|
||||
// As requested by KNewFileMenu :
|
||||
m_newFileMenu->checkUpToDate();
|
||||
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
|
||||
// And set the files that the menu apply on :
|
||||
m_newFileMenu->setPopupFiles(url());
|
||||
}
|
||||
|
||||
void DolphinPart::updateStatusBar()
|
||||
{
|
||||
const QString escapedText = Qt::convertFromPlainText(m_view->statusBarText());
|
||||
emit ReadOnlyPart::setStatusBarText(QString("<qt>%1</qt>").arg(escapedText));
|
||||
}
|
||||
|
||||
void DolphinPart::updateProgress(int percent)
|
||||
{
|
||||
m_extension->loadingProgress(percent);
|
||||
}
|
||||
|
||||
void DolphinPart::createDirectory()
|
||||
{
|
||||
m_newFileMenu->setViewShowsHiddenFiles(m_view->hiddenFilesShown());
|
||||
m_newFileMenu->setPopupFiles(url());
|
||||
m_newFileMenu->createDirectory();
|
||||
}
|
||||
|
||||
void DolphinPart::setFilesToSelect(const KUrl::List& files)
|
||||
{
|
||||
if (files.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_view->markUrlsAsSelected(files);
|
||||
m_view->markUrlAsCurrent(files.at(0));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#include "moc_dolphinpart.cpp"
|
|
@ -1,338 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
Name=Dolphin View
|
||||
Name[af]=Dolphin Deel
|
||||
Name[ar]=عرض دولفين
|
||||
Name[as]=Dolphin প্ৰদৰ্শন
|
||||
Name[ast]=Vista de Dolphin
|
||||
Name[be@latin]=Vyhlad „Dolphin”
|
||||
Name[bg]=Преглед в Dolphin
|
||||
Name[bn]=ডলফিন ভিউ
|
||||
Name[bn_IN]=Dolphin প্রদর্শন
|
||||
Name[bs]=Delfinov prikaz
|
||||
Name[ca]=Vista del Dolphin
|
||||
Name[ca@valencia]=Vista del Dolphin
|
||||
Name[cs]=Pohled Dolphin
|
||||
Name[csb]=Wëzdrzatk Dolphina
|
||||
Name[da]=Dolphin-visning
|
||||
Name[de]=Dolphin-Ansicht
|
||||
Name[el]=Προβολή του Dolphin
|
||||
Name[en_GB]=Dolphin View
|
||||
Name[eo]=Dolphin-rigardo
|
||||
Name[es]=Vista de Dolphin
|
||||
Name[et]=Dolphini vaade
|
||||
Name[eu]=Dolphin ikuspegia
|
||||
Name[fi]=Dolphin-näkymä
|
||||
Name[fr]=Vue de Dolphin
|
||||
Name[fy]=Dolfyn werjefte
|
||||
Name[ga]=Amharc Dolphin
|
||||
Name[gl]=Vista de Dolphin
|
||||
Name[gu]=ડોલ્ફિન દેખાવ
|
||||
Name[he]=הגדרות תצוגה ב־Dolphin
|
||||
Name[hi]=डॉल्फ़िन दृश्य
|
||||
Name[hne]=डाल्फिन दृस्य
|
||||
Name[hr]=Dolphinov prikaz
|
||||
Name[hsb]=Napohlad w Dolphinje
|
||||
Name[hu]=Dolphin-nézet
|
||||
Name[ia]=Vista de Dolphin
|
||||
Name[id]=Tampilan Dolphin
|
||||
Name[is]=Dolphin sýn
|
||||
Name[it]=Vista di Dolphin
|
||||
Name[ja]=Dolphin ビュー
|
||||
Name[kk]=Dolphin көрінісі
|
||||
Name[km]=ទិដ្ឋភាព Dolphin
|
||||
Name[kn]=ಡಾಲ್ಫಿನ್ ನೋಟ
|
||||
Name[ko]=Dolphin 보기
|
||||
Name[ku]=Bergehê Dolphin
|
||||
Name[lt]=Dolphin žiūryklė
|
||||
Name[lv]=Dolphin skats
|
||||
Name[mai]=डाल्फिन दृश्य
|
||||
Name[mk]=Преглед со Делфин
|
||||
Name[ml]=ഡോള്ഫിന് അവതരണരീതി
|
||||
Name[mr]=डॉल्फिन दृश्य
|
||||
Name[ms]=Lihat Dolphin
|
||||
Name[nb]=Dolphin visning
|
||||
Name[nds]=Dolphin-Ansicht
|
||||
Name[nl]=Dolphin-weergave
|
||||
Name[nn]=Dolphin-vising
|
||||
Name[or]=ଡଲଫିନ ଦୃଶ୍ୟ
|
||||
Name[pa]=ਡਾਲਫਿਨ ਝਲਕ
|
||||
Name[pl]=Widok Dolphina
|
||||
Name[pt]=Área do Dolphin
|
||||
Name[pt_BR]=Visualização do Dolphin
|
||||
Name[ro]=Vizualizare Dolphin
|
||||
Name[ru]=Представление Dolphin
|
||||
Name[se]=Dolphinčájeheapmi
|
||||
Name[si]=ඩොල්ෆින් දසුන
|
||||
Name[sk]=Dolphin pohľad
|
||||
Name[sl]=Dolphin - pogled
|
||||
Name[sr]=Делфинов приказ
|
||||
Name[sr@ijekavian]=Делфинов приказ
|
||||
Name[sr@ijekavianlatin]=Dolphinov prikaz
|
||||
Name[sr@latin]=Dolphinov prikaz
|
||||
Name[sv]=Vy i Dolphin
|
||||
Name[ta]=டால்பின் காட்சி
|
||||
Name[te]=డాల్ఫిన్ వీక్షణం
|
||||
Name[tg]=Намоиши Dolphin
|
||||
Name[th]=มุมมองของดอลฟิน
|
||||
Name[tr]=Dolphin Görünümü
|
||||
Name[ug]=Dolphin كۆرۈنۈش
|
||||
Name[uk]=Перегляд Dolphin
|
||||
Name[wa]=Vuwe di Dolphin
|
||||
Name[x-test]=xxDolphin Viewxx
|
||||
Name[zh_CN]=Dolphin 视图
|
||||
Name[zh_TW]=Dolphin 檢視
|
||||
MimeType=inode/directory;
|
||||
X-KDE-ServiceTypes=KParts/ReadOnlyPart
|
||||
X-KDE-Library=dolphinpart
|
||||
Icon=view-icon
|
||||
InitialPreference=7
|
||||
|
||||
# Provide info about the view modes using the Actions mechanism so that KService parses it.
|
||||
# Konqueror then queries KService to get hold of the translated texts for the view modes
|
||||
Actions=icons;details;compact;
|
||||
|
||||
[Desktop Action icons]
|
||||
Name=Icons
|
||||
Name[af]=Ikone
|
||||
Name[ar]=أيقونات
|
||||
Name[as]=আইকন
|
||||
Name[ast]=Iconos
|
||||
Name[be]=Значкі
|
||||
Name[be@latin]=Ikony
|
||||
Name[bg]=Икони
|
||||
Name[bn]=আইকন
|
||||
Name[bn_IN]=আইকন
|
||||
Name[br]=Arlunioù
|
||||
Name[bs]=Ikone
|
||||
Name[ca]=Icones
|
||||
Name[ca@valencia]=Icones
|
||||
Name[cs]=Ikony
|
||||
Name[csb]=Ikònë
|
||||
Name[cy]=Eicon
|
||||
Name[da]=Ikoner
|
||||
Name[de]=Symbole
|
||||
Name[el]=Εικονίδια
|
||||
Name[en_GB]=Icons
|
||||
Name[eo]=Piktogramoj
|
||||
Name[es]=Iconos
|
||||
Name[et]=Ikoonid
|
||||
Name[eu]=Ikonoak
|
||||
Name[fa]=شمایلها
|
||||
Name[fi]=Kuvakkeet
|
||||
Name[fr]=Icônes
|
||||
Name[fy]=Byldkaikes
|
||||
Name[ga]=Deilbhíní
|
||||
Name[gl]=Iconas
|
||||
Name[gu]=ચિહ્નો
|
||||
Name[he]=סמלים
|
||||
Name[hi]=प्रतीक
|
||||
Name[hne]=चिनहा
|
||||
Name[hr]=Ikone
|
||||
Name[hsb]=Piktogramy
|
||||
Name[hu]=Ikonok
|
||||
Name[ia]=Icones
|
||||
Name[id]=Ikon
|
||||
Name[is]=Táknmyndir
|
||||
Name[it]=Icone
|
||||
Name[ja]=アイコン
|
||||
Name[ka]=ხატულები
|
||||
Name[kk]=Таңбашалар
|
||||
Name[km]=រូបតំណាង
|
||||
Name[kn]=ಚಿಹ್ನೆಗಳು
|
||||
Name[ko]=아이콘
|
||||
Name[ku]=Îkon
|
||||
Name[lt]=Ženkliukai
|
||||
Name[lv]=Ikonas
|
||||
Name[mai]=प्रतीक
|
||||
Name[mk]=Икони
|
||||
Name[ml]=ചിഹ്നങ്ങള്
|
||||
Name[mr]=चिन्ह
|
||||
Name[ms]=Ikon
|
||||
Name[nb]=Ikoner
|
||||
Name[nds]=Lüttbiller
|
||||
Name[ne]=प्रतिमा
|
||||
Name[nl]=Pictogrammen
|
||||
Name[nn]=Ikon
|
||||
Name[oc]=Icònas
|
||||
Name[or]=ଚିତ୍ର ସଂକେତଗୁଡ଼ିକ
|
||||
Name[pa]=ਆਈਕਾਨ
|
||||
Name[pl]=Ikony
|
||||
Name[pt]=Ícones
|
||||
Name[pt_BR]=Ícones
|
||||
Name[ro]=Pictograme
|
||||
Name[ru]=Значки
|
||||
Name[se]=Govažat
|
||||
Name[si]=අයිකන
|
||||
Name[sk]=Ikony
|
||||
Name[sl]=Ikone
|
||||
Name[sr]=Иконе
|
||||
Name[sr@ijekavian]=Иконе
|
||||
Name[sr@ijekavianlatin]=Ikone
|
||||
Name[sr@latin]=Ikone
|
||||
Name[sv]=Ikoner
|
||||
Name[ta]=சின்னங்கள்
|
||||
Name[te]=ప్రతిమలు
|
||||
Name[tg]=Нишонаҳо
|
||||
Name[th]=ไอคอน
|
||||
Name[tr]=Simgeler
|
||||
Name[ug]=سىنبەلگىلەر
|
||||
Name[uk]=Піктограми
|
||||
Name[uz]=Nishonchalar
|
||||
Name[uz@cyrillic]=Нишончалар
|
||||
Name[vi]=Biểu tượng
|
||||
Name[wa]=Imådjetes
|
||||
Name[xh]=Imphawu zemmifanekiso
|
||||
Name[x-test]=xxIconsxx
|
||||
Name[zh_CN]=图标
|
||||
Name[zh_TW]=圖示
|
||||
Icon=view-list-icons
|
||||
# Dummy
|
||||
Exec=dolphin
|
||||
|
||||
[Desktop Action compact]
|
||||
Name=Compact
|
||||
Name[ar]=مُتضامّ
|
||||
Name[bg]=Компактно
|
||||
Name[bs]=Sabij
|
||||
Name[ca]=Compacte
|
||||
Name[ca@valencia]=Compacte
|
||||
Name[cs]=Kompaktní
|
||||
Name[da]=Kompakt
|
||||
Name[de]=Kompakt
|
||||
Name[el]=Σύμπτυξη
|
||||
Name[en_GB]=Compact
|
||||
Name[es]=Compacta
|
||||
Name[et]=Kompaktne
|
||||
Name[fi]=Tiivis
|
||||
Name[fr]=Concis
|
||||
Name[ga]=Dlúth
|
||||
Name[gl]=Compacto
|
||||
Name[he]=מרוכז
|
||||
Name[hu]=Kompakt
|
||||
Name[ia]=Compacte
|
||||
Name[id]=Kompak
|
||||
Name[is]=Þjappað
|
||||
Name[it]=Compatta
|
||||
Name[kk]=Ықшамды
|
||||
Name[km]=តូចល្មម
|
||||
Name[ko]=축소됨
|
||||
Name[lt]=Kompaktiškas
|
||||
Name[lv]=Kompakts
|
||||
Name[mr]=संक्षिप्त
|
||||
Name[nb]=Kompakt
|
||||
Name[nds]=Drang
|
||||
Name[nl]=Compact
|
||||
Name[pa]=ਸੰਖੇਪ
|
||||
Name[pl]=Kompaktowo
|
||||
Name[pt]=Compacto
|
||||
Name[pt_BR]=Compacto
|
||||
Name[ro]=Compact
|
||||
Name[ru]=Столбцы
|
||||
Name[sk]=Kompaktný
|
||||
Name[sl]=Strnjeno
|
||||
Name[sr]=Сажето
|
||||
Name[sr@ijekavian]=Сажето
|
||||
Name[sr@ijekavianlatin]=Sažeto
|
||||
Name[sr@latin]=Sažeto
|
||||
Name[sv]=Kompakt
|
||||
Name[tr]=Sıkışık
|
||||
Name[ug]=ئىخچام
|
||||
Name[uk]=Компактний
|
||||
Name[wa]=Rastrindou
|
||||
Name[x-test]=xxCompactxx
|
||||
Name[zh_CN]=简洁视图
|
||||
Name[zh_TW]=簡潔模式
|
||||
Icon=view-list-details
|
||||
# Dummy
|
||||
Exec=dolphin
|
||||
|
||||
[Desktop Action details]
|
||||
Name=Details
|
||||
Name[af]=Besonderhede
|
||||
Name[ar]=تفاصيل
|
||||
Name[as]=বিৱৰণ
|
||||
Name[ast]=Detalles
|
||||
Name[be@latin]=Detali
|
||||
Name[bg]=Подробности
|
||||
Name[bn]=বিস্তারিত
|
||||
Name[bn_IN]=বিবরণ
|
||||
Name[bs]=Detalji
|
||||
Name[ca]=Detalls
|
||||
Name[ca@valencia]=Detalls
|
||||
Name[cs]=Podrobnosti
|
||||
Name[csb]=Detale
|
||||
Name[da]=Detaljer
|
||||
Name[de]=Details
|
||||
Name[el]=Λεπτομέρειες
|
||||
Name[en_GB]=Details
|
||||
Name[eo]=Detaloj
|
||||
Name[es]=Detalles
|
||||
Name[et]=Üksikasjad
|
||||
Name[eu]=Xehetasunak
|
||||
Name[fi]=Yksityiskohdat
|
||||
Name[fr]=Détails
|
||||
Name[fy]=Details
|
||||
Name[ga]=Mionsonraí
|
||||
Name[gl]=Detalles
|
||||
Name[gu]=વિગતો
|
||||
Name[he]=פרטים
|
||||
Name[hi]=विवरण
|
||||
Name[hne]=विवरन
|
||||
Name[hr]=Detalji
|
||||
Name[hsb]=Nadrobnosće
|
||||
Name[hu]=Részletek
|
||||
Name[ia]=Detalios
|
||||
Name[id]=Detail
|
||||
Name[is]=Smáatriði
|
||||
Name[it]=Dettagli
|
||||
Name[ja]=詳細
|
||||
Name[ka]=დეტალები
|
||||
Name[kk]=Егжей-тегжейі
|
||||
Name[km]=សេចក្ដីលម្អិត
|
||||
Name[kn]=ವಿವರಗಳು
|
||||
Name[ko]=자세히
|
||||
Name[ku]=Kitekit
|
||||
Name[lt]=Detalės
|
||||
Name[lv]=Detaļas
|
||||
Name[mai]=विवरण
|
||||
Name[mk]=Детали
|
||||
Name[ml]=വിശദവിവരങ്ങള്
|
||||
Name[mr]=तपशील
|
||||
Name[ms]=Perincian
|
||||
Name[nb]=Detaljer
|
||||
Name[nds]=Enkelheiten
|
||||
Name[nl]=Details
|
||||
Name[nn]=Detaljar
|
||||
Name[oc]=Detalhs
|
||||
Name[or]=ବିସ୍ତୃତ ବିବରଣୀ
|
||||
Name[pa]=ਵੇਰਵਾ
|
||||
Name[pl]=Szczegóły
|
||||
Name[pt]=Detalhes
|
||||
Name[pt_BR]=Detalhes
|
||||
Name[ro]=Detalii
|
||||
Name[ru]=Таблица
|
||||
Name[si]=විස්තර
|
||||
Name[sk]=Podrobnosti
|
||||
Name[sl]=Podrobnosti
|
||||
Name[sr]=Детаљи
|
||||
Name[sr@ijekavian]=Детаљи
|
||||
Name[sr@ijekavianlatin]=Detalji
|
||||
Name[sr@latin]=Detalji
|
||||
Name[sv]=Detaljinformation
|
||||
Name[ta]=விவரங்கள்
|
||||
Name[te]=వివరాలు
|
||||
Name[tg]=Тафсилотҳо
|
||||
Name[th]=รายละเอียด
|
||||
Name[tr]=Ayrıntılar
|
||||
Name[ug]=تەپسىلاتلار
|
||||
Name[uk]=Подробиці
|
||||
Name[uz]=Tafsilotlar
|
||||
Name[uz@cyrillic]=Тафсилотлар
|
||||
Name[wa]=Detays
|
||||
Name[x-test]=xxDetailsxx
|
||||
Name[zh_CN]=细节
|
||||
Name[zh_TW]=詳細模式
|
||||
Icon=view-list-tree
|
||||
# Dummy
|
||||
Exec=dolphin
|
|
@ -1,253 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
#ifndef DOLPHINPART_H
|
||||
#define DOLPHINPART_H
|
||||
|
||||
#include <kparts/part.h>
|
||||
|
||||
#include <QItemSelectionModel>
|
||||
|
||||
class DolphinNewFileMenu;
|
||||
class DolphinViewActionHandler;
|
||||
#include <QActionGroup>
|
||||
class KAction;
|
||||
class KFileItemList;
|
||||
class KFileItem;
|
||||
class DolphinPartBrowserExtension;
|
||||
class DolphinSortFilterProxyModel;
|
||||
class DolphinRemoteEncoding;
|
||||
class DolphinModel;
|
||||
class KDirLister;
|
||||
class DolphinView;
|
||||
class KAboutData;
|
||||
class DolphinRemoveAction;
|
||||
|
||||
class DolphinPart : public KParts::ReadOnlyPart
|
||||
{
|
||||
Q_OBJECT
|
||||
// Used by konqueror. Technically it means "we want undo enabled if
|
||||
// there are things in the undo history and the current part is a dolphin part".
|
||||
// Even though it's konqueror doing the undo...
|
||||
Q_PROPERTY( bool supportsUndo READ supportsUndo )
|
||||
|
||||
Q_PROPERTY( QString currentViewMode READ currentViewMode WRITE setCurrentViewMode )
|
||||
|
||||
// Used by konqueror when typing something like /home/dfaure/*.diff in the location bar
|
||||
Q_PROPERTY( QString nameFilter READ nameFilter WRITE setNameFilter )
|
||||
|
||||
// Used by konqueror to implement the --select command-line option
|
||||
Q_PROPERTY( KUrl::List filesToSelect READ filesToSelect WRITE setFilesToSelect )
|
||||
|
||||
public:
|
||||
explicit DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args);
|
||||
~DolphinPart();
|
||||
|
||||
static KAboutData* createAboutData();
|
||||
|
||||
/**
|
||||
* Standard KParts::ReadOnlyPart openUrl method.
|
||||
* Called by Konqueror to view a directory in DolphinPart.
|
||||
*/
|
||||
virtual bool openUrl(const KUrl& url);
|
||||
|
||||
/// see the supportsUndo property
|
||||
bool supportsUndo() const { return true; }
|
||||
|
||||
/**
|
||||
* Used by konqueror for setting the view mode
|
||||
* @param viewModeName internal name for the view mode, like "icons"
|
||||
* Those names come from the Actions line in dolphinpart.desktop,
|
||||
* and have to match the name of the KActions.
|
||||
*/
|
||||
void setCurrentViewMode(const QString& viewModeName);
|
||||
|
||||
/**
|
||||
* Used by konqueror for displaying the current view mode.
|
||||
* @see setCurrentViewMode
|
||||
*/
|
||||
QString currentViewMode() const;
|
||||
|
||||
/// Returns the view owned by this part; used by DolphinPartBrowserExtension
|
||||
DolphinView* view() { return m_view; }
|
||||
|
||||
/**
|
||||
* Sets a name filter, like *.diff
|
||||
*/
|
||||
void setNameFilter(const QString& nameFilter);
|
||||
|
||||
/**
|
||||
* Returns the current name filter. Used by konqueror to show it in the URL.
|
||||
*/
|
||||
QString nameFilter() const { return m_nameFilter; }
|
||||
|
||||
protected:
|
||||
/**
|
||||
* We reimplement openUrl so no need to implement openFile.
|
||||
*/
|
||||
virtual bool openFile() { return true; }
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* Emitted when the view mode changes. Used by konqueror.
|
||||
*/
|
||||
void viewModeChanged();
|
||||
|
||||
|
||||
/**
|
||||
* Emitted whenever the current URL is about to be changed.
|
||||
*/
|
||||
void aboutToOpenURL();
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotMessage(const QString& msg);
|
||||
void slotErrorMessage(const QString& msg);
|
||||
/**
|
||||
* Shows the information for the item \a item inside the statusbar. If the
|
||||
* item is null, the default statusbar information is shown.
|
||||
*/
|
||||
void slotRequestItemInfo(const KFileItem& item);
|
||||
/**
|
||||
* Handles clicking on an item
|
||||
*/
|
||||
void slotItemActivated(const KFileItem& item);
|
||||
/**
|
||||
* Handles activation of multiple items
|
||||
*/
|
||||
void slotItemsActivated(const KFileItemList& items);
|
||||
/**
|
||||
* Creates a new window showing the content of \a url.
|
||||
*/
|
||||
void createNewWindow(const KUrl& url);
|
||||
/**
|
||||
* Opens the context menu on the current mouse position.
|
||||
* @pos Position in screen coordinates.
|
||||
* @item File item context. If item is null, the context menu
|
||||
* should be applied to \a url.
|
||||
* @url URL which contains \a item.
|
||||
* @customActions Actions that should be added to the context menu,
|
||||
* if the file item is null.
|
||||
*/
|
||||
void slotOpenContextMenu(const QPoint& pos,
|
||||
const KFileItem& item,
|
||||
const KUrl& url,
|
||||
const QList<QAction*>& customActions);
|
||||
|
||||
/**
|
||||
* Informs the host that we are opening \a url (e.g. after a redirection
|
||||
* coming from KDirLister).
|
||||
* Testcase 1: fish://localhost
|
||||
* Testcase 2: showing a directory that is being renamed by another window (#180156)
|
||||
*/
|
||||
void slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl);
|
||||
|
||||
/**
|
||||
* Updates the state of the 'Edit' menu actions and emits
|
||||
* the signal selectionChanged().
|
||||
*/
|
||||
void slotSelectionChanged(const KFileItemList& selection);
|
||||
|
||||
/**
|
||||
* Updates the text of the paste action dependent from
|
||||
* the number of items which are in the clipboard.
|
||||
*/
|
||||
void updatePasteAction();
|
||||
|
||||
/**
|
||||
* Connected to all "Go" menu actions provided by DolphinPart
|
||||
*/
|
||||
void slotGoTriggered(QAction* action);
|
||||
|
||||
/**
|
||||
* Connected to the "editMimeType" action
|
||||
*/
|
||||
void slotEditMimeType();
|
||||
|
||||
/**
|
||||
* Connected to the "select_items_matching" action.
|
||||
* Opens a dialog which permits to select all items matching a pattern like "*.jpg".
|
||||
*/
|
||||
void slotSelectItemsMatchingPattern();
|
||||
|
||||
/**
|
||||
* Connected to the "unselect_items_matching" action.
|
||||
* Opens a dialog which permits to unselect all items matching a pattern like "*.jpg".
|
||||
*/
|
||||
void slotUnselectItemsMatchingPattern();
|
||||
|
||||
/**
|
||||
* Open a terminal window, starting with the current directory.
|
||||
*/
|
||||
void slotOpenTerminal();
|
||||
|
||||
/**
|
||||
* Open KFind with the current path.
|
||||
*/
|
||||
void slotFindFile();
|
||||
|
||||
/**
|
||||
* Updates the 'Create New...' sub menu, just before it's shown.
|
||||
*/
|
||||
void updateNewMenu();
|
||||
|
||||
/**
|
||||
* Updates the number of items (= number of files + number of
|
||||
* directories) in the statusbar. If files are selected, the number
|
||||
* of selected files and the sum of the filesize is shown.
|
||||
*/
|
||||
void updateStatusBar();
|
||||
|
||||
/**
|
||||
* Notify container of folder loading progress.
|
||||
*/
|
||||
void updateProgress(int percent);
|
||||
|
||||
void createDirectory();
|
||||
|
||||
/**
|
||||
* Called by konqueror --select
|
||||
*/
|
||||
void setFilesToSelect(const KUrl::List& files);
|
||||
KUrl::List filesToSelect() const { return KUrl::List(); } // silence moc
|
||||
|
||||
virtual bool eventFilter(QObject*, QEvent*);
|
||||
|
||||
private:
|
||||
void createActions();
|
||||
void createGoAction(const char* name, const char* iconName,
|
||||
const QString& text, const QString& url,
|
||||
QActionGroup* actionGroup);
|
||||
|
||||
void openSelectionDialog(const QString& title, const QString& text,
|
||||
bool selectItems);
|
||||
|
||||
private:
|
||||
DolphinView* m_view;
|
||||
DolphinViewActionHandler* m_actionHandler;
|
||||
DolphinRemoteEncoding* m_remoteEncoding;
|
||||
DolphinPartBrowserExtension* m_extension;
|
||||
DolphinNewFileMenu* m_newFileMenu;
|
||||
KAction* m_findFileAction;
|
||||
KAction* m_openTerminalAction;
|
||||
QString m_nameFilter;
|
||||
DolphinRemoveAction* m_removeAction;
|
||||
Q_DISABLE_COPY(DolphinPart)
|
||||
};
|
||||
|
||||
#endif /* DOLPHINPART_H */
|
|
@ -1,65 +0,0 @@
|
|||
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||
<kpartgui name="dolphinpart" version="10" >
|
||||
<MenuBar>
|
||||
<Menu name="edit"><text>&Edit</text>
|
||||
<Action name="new_menu"/>
|
||||
<Separator/>
|
||||
<Action name="rename"/>
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete"/>
|
||||
<Action name="editMimeType"/>
|
||||
<Action name="properties"/>
|
||||
<Separator/>
|
||||
<Menu name="selection">
|
||||
<text context="@title:menu">Selection</text>
|
||||
<Action name="select_items_matching" />
|
||||
<Action name="unselect_items_matching" />
|
||||
<Separator/>
|
||||
<Action name="select_all" />
|
||||
<Action name="unselect_all" />
|
||||
<Action name="invert_selection" />
|
||||
</Menu>
|
||||
</Menu>
|
||||
<Menu name="view"><text>&View</text>
|
||||
<Action name="sort" />
|
||||
<Action name="additional_info" />
|
||||
<Action name="show_preview" />
|
||||
<Action name="show_in_groups" />
|
||||
<Action name="show_hidden_files" />
|
||||
<Separator/>
|
||||
<Action name="view_properties" />
|
||||
</Menu>
|
||||
<Menu name="go"><text>&Go</text>
|
||||
<Action name="go_applications"/>
|
||||
<Action name="go_network_folders"/>
|
||||
<Action name="go_settings"/>
|
||||
<Action name="go_media"/>
|
||||
<Action name="go_trash"/>
|
||||
<Action name="go_autostart"/>
|
||||
</Menu>
|
||||
<Menu name="tools"><text context="@title:menu">Tools</text>
|
||||
<Action name="open_terminal"/>
|
||||
<Action name="find_file" />
|
||||
<Action name="show_filter_bar" />
|
||||
<Action name="change_remote_encoding" />
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
<ToolBar name="mainToolBar"><text context="@title:menu">Dolphin Toolbar</text>
|
||||
<Action name="icons" />
|
||||
<Action name="compact" />
|
||||
<Action name="details" />
|
||||
</ToolBar>
|
||||
<State name="has_selection" >
|
||||
<enable>
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
</enable>
|
||||
</State>
|
||||
<State name="has_no_selection" >
|
||||
<disable>
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
</disable>
|
||||
</State>
|
||||
</kpartgui>
|
|
@ -1,74 +0,0 @@
|
|||
/* This file is part of the KDE project
|
||||
* Copyright (c) 2012 Dawit Alemayehu <adawit@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_ext.h"
|
||||
|
||||
#include "dolphinpart.h"
|
||||
#include "views/dolphinview.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
#include <KFileItemList>
|
||||
|
||||
|
||||
DolphinPartBrowserExtension::DolphinPartBrowserExtension(DolphinPart* part)
|
||||
:KParts::BrowserExtension( part )
|
||||
,m_part(part)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
m_part->view()->readSettings();
|
||||
}
|
||||
|
||||
#include "moc_dolphinpart_ext.cpp"
|
|
@ -1,46 +0,0 @@
|
|||
/* This file is part of the KDE project
|
||||
* Copyright (c) 2012 Dawit Alemayehu <adawit@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.
|
||||
*/
|
||||
|
||||
#ifndef DOLPHINPART_EXT_H
|
||||
#define DOLPHINPART_EXT_H
|
||||
|
||||
#include <kparts/browserextension.h>
|
||||
|
||||
class DolphinPart;
|
||||
|
||||
class DolphinPartBrowserExtension : public KParts::BrowserExtension
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DolphinPartBrowserExtension( DolphinPart* part );
|
||||
virtual void restoreState(QDataStream &stream);
|
||||
virtual void saveState(QDataStream &stream);
|
||||
|
||||
public Q_SLOTS:
|
||||
void cut();
|
||||
void copy();
|
||||
void paste();
|
||||
void pasteTo(const KUrl&);
|
||||
void reparseConfiguration();
|
||||
|
||||
private:
|
||||
DolphinPart* m_part;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "dolphinprivate_export.h"
|
||||
|
||||
#include <kparts/part.h>
|
||||
#include <KFileItem>
|
||||
#include <KFileItemDelegate>
|
||||
#include <kio/fileundomanager.h>
|
||||
|
@ -773,7 +772,6 @@ private:
|
|||
// For unit tests
|
||||
friend class TestBase;
|
||||
friend class DolphinDetailsViewTest;
|
||||
friend class DolphinPart; // Accesses m_model
|
||||
};
|
||||
|
||||
/// Allow using DolphinView::Mode in QVariant
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "views/zoomlevelinfo.h"
|
||||
#include <konq_operations.h>
|
||||
|
||||
#include <QPointer>
|
||||
#include <KAction>
|
||||
#include <KActionCollection>
|
||||
#include <KActionMenu>
|
||||
|
@ -36,7 +37,6 @@
|
|||
#include <KToggleAction>
|
||||
#include <KPropertiesDialog>
|
||||
#include <KIcon>
|
||||
|
||||
#include <KDebug>
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ set(katepart_PART_SRCS
|
|||
|
||||
# document (THE document, buffer, lines/cursors/..., CORE STUFF)
|
||||
document/katedocument.cpp
|
||||
document/katedocumenthelpers.cpp
|
||||
document/katebuffer.cpp
|
||||
|
||||
# undo
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "kateview.h"
|
||||
#include "kateautoindent.h"
|
||||
#include "katetextline.h"
|
||||
#include "katedocumenthelpers.h"
|
||||
#include "katehighlighthelpers.h"
|
||||
#include "kateprinter.h"
|
||||
#include "katerenderer.h"
|
||||
|
@ -105,17 +104,16 @@ inline bool isBracket ( const QChar& c ) { return isStartBracket( c ) || isE
|
|||
// KateDocument Constructor
|
||||
//
|
||||
KateDocument::KateDocument ( QWidget *parentWidget, QObject *parent, const QVariantList &args)
|
||||
: KateDocument (true, false, true, parentWidget, parent)
|
||||
: KateDocument (true, true, parentWidget, parent)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
}
|
||||
|
||||
KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
|
||||
KateDocument::KateDocument ( bool bSingleViewMode,
|
||||
bool bReadOnly, QWidget *parentWidget,
|
||||
QObject *parent)
|
||||
: KTextEditor::Document (parent),
|
||||
m_bSingleViewMode(bSingleViewMode),
|
||||
m_bBrowserView(bBrowserView),
|
||||
m_bReadOnly(bReadOnly),
|
||||
m_activeView(0),
|
||||
editSessionNumber(0),
|
||||
|
@ -167,8 +165,6 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
|
|||
// swap file
|
||||
m_swapfile = new Kate::SwapFile(this);
|
||||
|
||||
new KateBrowserExtension( this ); // deleted by QObject memory management
|
||||
|
||||
// important, fill in the config into the indenter we use...
|
||||
m_indenter->updateConfig ();
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class KATEPARTINTERFACES_EXPORT KateDocument : public KTextEditor::Document,
|
|||
|
||||
public:
|
||||
explicit KateDocument (QWidget *parentWidget, QObject *, const QVariantList &args);
|
||||
explicit KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
|
||||
explicit KateDocument (bool bSingleViewMode=false, bool bReadOnly=false,
|
||||
QWidget *parentWidget = 0, QObject * = 0);
|
||||
~KateDocument ();
|
||||
|
||||
|
@ -132,18 +132,14 @@ Q_SIGNALS:
|
|||
// TODO for KDE5: move to KTE::Document
|
||||
void readWriteChanged (KTextEditor::Document *document);
|
||||
|
||||
|
||||
|
||||
public:
|
||||
bool readOnly () const { return m_bReadOnly; }
|
||||
bool browserView () const { return m_bBrowserView; }
|
||||
bool singleViewMode () const { return m_bSingleViewMode; }
|
||||
static bool simpleMode ();
|
||||
|
||||
private:
|
||||
// only to make part work, don't change it !
|
||||
const bool m_bSingleViewMode;
|
||||
const bool m_bBrowserView;
|
||||
const bool m_bReadOnly;
|
||||
|
||||
//
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/* This file is part of the KDE libraries and the Kate part.
|
||||
*
|
||||
* Copyright (C) 2001-2010 Christoph Cullmann <cullmann@kde.org>
|
||||
* Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
|
||||
* Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de>
|
||||
*
|
||||
* 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 "katedocumenthelpers.h"
|
||||
#include "moc_katedocumenthelpers.cpp"
|
||||
|
||||
#include "katedocument.h"
|
||||
#include "kateview.h"
|
||||
|
||||
#include <kmenu.h>
|
||||
#include <klocale.h>
|
||||
|
||||
namespace KTextEditor { class View; }
|
||||
|
||||
KateBrowserExtension::KateBrowserExtension( KateDocument* doc )
|
||||
: KParts::BrowserExtension( doc ),
|
||||
m_doc (doc)
|
||||
{
|
||||
setObjectName( "katepartbrowserextension" );
|
||||
emit enableAction( "print", true );
|
||||
}
|
||||
|
||||
void KateBrowserExtension::print()
|
||||
{
|
||||
m_doc->printDialog();
|
||||
}
|
||||
|
||||
// kate: space-indent on; indent-width 2; replace-tabs on;
|
|
@ -1,61 +0,0 @@
|
|||
/* This file is part of the KDE libraries and the Kate part.
|
||||
*
|
||||
* Copyright (C) 2001-2010 Christoph Cullmann <cullmann@kde.org>
|
||||
* Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
|
||||
* Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __KATE_DOCUMENT_HELPERS__
|
||||
#define __KATE_DOCUMENT_HELPERS__
|
||||
|
||||
#include <kparts/browserextension.h>
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
class KateDocument;
|
||||
|
||||
/**
|
||||
* Interface for embedding KateDocument into a browser
|
||||
*/
|
||||
class KateBrowserExtension : public KParts::BrowserExtension
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
* @param doc parent document
|
||||
*/
|
||||
explicit KateBrowserExtension( KateDocument* doc );
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* print the current file
|
||||
*/
|
||||
void print();
|
||||
|
||||
private:
|
||||
/**
|
||||
* parent document
|
||||
*/
|
||||
KateDocument* m_doc;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,955 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!-- http://www.w3.org/TR/CSS21/syndata.html#tokenization -->
|
||||
<!ENTITY nmstart "[_a-zA-Z]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])">
|
||||
<!ENTITY nmchar "[_a-zA-Z0-9-]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])">
|
||||
]>
|
||||
|
||||
<!--
|
||||
|
||||
Kate CSS syntax highlighting definition
|
||||
|
||||
Changelog:
|
||||
|
||||
- Version 2.06, by Mte90:
|
||||
- CSS3 tag
|
||||
|
||||
- Version 2.03, by Milian Wolff:
|
||||
- Make it spelling aware
|
||||
|
||||
- Version 2.08, Joseph Wenninger:
|
||||
- CSS3 media queries
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
||||
|
||||
|
||||
|
||||
<language name="CSS/PHP" hidden="true" version="2.09" kateversion="2.4" section="Other" extensions="" indenter="cstyle" mimetype="" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<list name="properties">
|
||||
<!-- CSS2 -->
|
||||
<item> azimuth </item>
|
||||
<item> background </item>
|
||||
<item> background-attachment </item>
|
||||
<item> background-break </item>
|
||||
<item> background-clip </item>
|
||||
<item> background-color </item>
|
||||
<item> background-image </item>
|
||||
<item> background-position </item>
|
||||
<item> background-origin </item>
|
||||
<item> background-repeat </item>
|
||||
<item> border </item>
|
||||
<item> border-bottom </item>
|
||||
<item> border-bottom-color </item>
|
||||
<item> border-bottom-style </item>
|
||||
<item> border-bottom-width </item>
|
||||
<item> border-collapse </item>
|
||||
<item> border-color </item>
|
||||
<item> border-left </item>
|
||||
<item> border-left-color </item>
|
||||
<item> border-left-style </item>
|
||||
<item> border-left-width </item>
|
||||
<item> border-right </item>
|
||||
<item> border-right-color </item>
|
||||
<item> border-right-style </item>
|
||||
<item> border-right-width </item>
|
||||
<item> border-spacing </item>
|
||||
<item> border-style </item>
|
||||
<item> border-top </item>
|
||||
<item> border-top-color </item>
|
||||
<item> border-top-style </item>
|
||||
<item> border-top-width </item>
|
||||
<item> border-width </item>
|
||||
<item> bottom </item>
|
||||
<item> caption-side </item>
|
||||
<item> clear </item>
|
||||
<item> clip </item>
|
||||
<item> color </item>
|
||||
<item> content </item>
|
||||
<item> counter-increment </item>
|
||||
<item> counter-reset </item>
|
||||
<item> cue </item>
|
||||
<item> cue-after </item>
|
||||
<item> cue-before </item>
|
||||
<item> cursor </item>
|
||||
<item> direction </item>
|
||||
<item> display </item>
|
||||
<item> elevation </item>
|
||||
<item> empty-cells </item>
|
||||
<item> float </item>
|
||||
<item> font </item>
|
||||
<item> font-family </item>
|
||||
<item> font-size </item>
|
||||
<item> font-size-adjust </item>
|
||||
<item> font-stretch </item>
|
||||
<item> font-style </item>
|
||||
<item> font-variant </item>
|
||||
<item> font-weight </item>
|
||||
<item> font-stretch </item>
|
||||
<item> height </item>
|
||||
<item> left </item>
|
||||
<item> letter-spacing </item>
|
||||
<item> line-height </item>
|
||||
<item> list-style </item>
|
||||
<item> list-style-image </item>
|
||||
<item> list-style-keyword </item>
|
||||
<item> list-style-position </item>
|
||||
<item> list-style-type </item>
|
||||
<item> margin </item>
|
||||
<item> margin-bottom </item>
|
||||
<item> margin-left </item>
|
||||
<item> margin-right </item>
|
||||
<item> margin-top </item>
|
||||
<item> marker-offset </item>
|
||||
<item> max-height </item>
|
||||
<item> max-width </item>
|
||||
<item> min-height </item>
|
||||
<item> min-width </item>
|
||||
<item> orphans </item>
|
||||
<item> outline </item>
|
||||
<item> outline-color </item>
|
||||
<item> outline-style </item>
|
||||
<item> outline-width </item>
|
||||
<item> overflow </item>
|
||||
<item> padding </item>
|
||||
<item> padding-bottom </item>
|
||||
<item> padding-left </item>
|
||||
<item> padding-right </item>
|
||||
<item> padding-top </item>
|
||||
<item> page </item>
|
||||
<item> page-break-after </item>
|
||||
<item> page-break-before </item>
|
||||
<item> page-break-inside </item>
|
||||
<item> pause </item>
|
||||
<item> pause-after </item>
|
||||
<item> pause-before </item>
|
||||
<item> pitch </item>
|
||||
<item> pitch-range </item>
|
||||
<item> play-during </item>
|
||||
<item> position </item>
|
||||
<item> quotes </item>
|
||||
<item> richness </item>
|
||||
<item> right </item>
|
||||
<item> size </item>
|
||||
<item> speak </item>
|
||||
<item> speak-header </item>
|
||||
<item> speak-numeral </item>
|
||||
<item> speak-punctuation </item>
|
||||
<item> speech-rate </item>
|
||||
<item> stress </item>
|
||||
<item> table-layout </item>
|
||||
<item> text-align </item>
|
||||
<item> text-decoration </item>
|
||||
<item> text-decoration-color </item>
|
||||
<item> text-indent </item>
|
||||
<item> text-shadow </item>
|
||||
<item> text-transform </item>
|
||||
<item> top </item>
|
||||
<item> unicode-bidi </item>
|
||||
<item> vertical-align </item>
|
||||
<item> visibility </item>
|
||||
<item> voice-family </item>
|
||||
<item> volume </item>
|
||||
<item> white-space </item>
|
||||
<item> widows </item>
|
||||
<item> width </item>
|
||||
<item> word-spacing </item>
|
||||
<item> z-index </item>
|
||||
|
||||
<!-- CSS3 -->
|
||||
<item> animation-name </item>
|
||||
<item> animation-duration </item>
|
||||
<item> animation-iteration </item>
|
||||
<item> animation-direction </item>
|
||||
<item> animation-delay </item>
|
||||
<item> animation-play-state </item>
|
||||
<item> animation-fill-mode </item>
|
||||
<item> animation-timing-function </item>
|
||||
<item> background-size </item>
|
||||
<item> border-bottom-image </item>
|
||||
<item> border-bottom-left-image </item>
|
||||
<item> border-bottom-left-radius </item>
|
||||
<item> border-bottom-right-image </item>
|
||||
<item> border-bottom-right-radius </item>
|
||||
<item> border-collapse </item>
|
||||
<item> border-corner-image </item>
|
||||
<item> border-image </item>
|
||||
<item> border-left-image </item>
|
||||
<item> border-radius </item>
|
||||
<item> border-right-image </item>
|
||||
<item> border-top-image </item>
|
||||
<item> border-top-left-image </item>
|
||||
<item> border-top-left-radius </item>
|
||||
<item> border-top-right-image </item>
|
||||
<item> border-top-right-radius </item>
|
||||
<item> box-align </item>
|
||||
<item> box-direction </item>
|
||||
<item> box-flex </item>
|
||||
<item> box-shadow </item>
|
||||
<item> box-sizing </item>
|
||||
<item> column-count </item>
|
||||
<item> column-fill </item>
|
||||
<item> column-gap </item>
|
||||
<item> column-rule-color </item>
|
||||
<item> column-rule-style </item>
|
||||
<item> column-rule-width </item>
|
||||
<item> column-span </item>
|
||||
<item> column-wisth </item>
|
||||
<item> hyphens </item>
|
||||
<item> linear-gradient </item>
|
||||
<item> opacity </item>
|
||||
<item> outline </item>
|
||||
<item> outline-offset </item>
|
||||
<item> overflow-x </item>
|
||||
<item> overflow-y </item>
|
||||
<item> pointer-events </item>
|
||||
<item> resize </item>
|
||||
<item> rotation </item>
|
||||
<item> rotation-point </item>
|
||||
<item> table-layout </item>
|
||||
<item> text-overflow </item>
|
||||
<item> text-shadow </item>
|
||||
<item> text-wrap </item>
|
||||
<item> transform-origin </item>
|
||||
<item> transition </item>
|
||||
<item> transition-property </item>
|
||||
<item> transition-duration </item>
|
||||
<item> word-wrap </item>
|
||||
|
||||
<!-- Gecko rendering engine CSS property extensions -->
|
||||
<item> -moz-animation-name </item>
|
||||
<item> -moz-animation-duration </item>
|
||||
<item> -moz-animation-iteration </item>
|
||||
<item> -moz-animation-direction </item>
|
||||
<item> -moz-animation-delay </item>
|
||||
<item> -moz-animation-play-state </item>
|
||||
<item> -moz-animation-fill-mode </item>
|
||||
<item> -moz-background-size </item>
|
||||
<item> -moz-border-image </item>
|
||||
<item> -moz-border-bottom-colors </item>
|
||||
<item> -moz-border-left-colors </item>
|
||||
<item> -moz-border-radius </item>
|
||||
<item> -moz-border-radius-topleft </item>
|
||||
<item> -moz-border-radius-topright </item>
|
||||
<item> -moz-border-radius-bottomleft </item>
|
||||
<item> -moz-border-radius-bottomright </item>
|
||||
<item> -moz-border-right-colors </item>
|
||||
<item> -moz-border-top-colors </item>
|
||||
<item> -moz-box </item>
|
||||
<item> -moz-box-flex </item>
|
||||
<item> -moz-box-shadow </item>
|
||||
<item> -moz-box-sizing </item>
|
||||
<item> -moz-column-count </item>
|
||||
<item> -moz-column-gap </item>
|
||||
<item> -moz-hyphens </item>
|
||||
<item> -moz-linear-gradient </item>
|
||||
<item> -moz-opacity </item>
|
||||
<item> -moz-outline-style </item>
|
||||
<item> -moz-perspective </item>
|
||||
<item> -moz-radial-gradient </item>
|
||||
<item> -moz-resize </item>
|
||||
<item> -moz-transform </item>
|
||||
<item> -moz-transform-origin </item>
|
||||
<item> -moz-transform-style </item>
|
||||
<item> -moz-transition </item>
|
||||
<item> -moz-transition-property </item>
|
||||
<item> -moz-transition-duration </item>
|
||||
|
||||
<!-- Opera rendering engine CSS property extensions -->
|
||||
<item> -o-background-size </item>
|
||||
<item> -o-linear-gradient </item>
|
||||
<item> -o-text-overflow </item>
|
||||
<item> -o-transition </item>
|
||||
<item> -o-transform-origin </item>
|
||||
|
||||
<!-- konq specific -->
|
||||
<item> konq_bgpos_x </item>
|
||||
<item> konq_bgpos_y </item>
|
||||
<item> -khtml-background-size </item>
|
||||
<item> -khtml-border-top-left-radius </item>
|
||||
<item> -khtml-border-top-right-radius </item>
|
||||
<item> -khtml-border-bottom-left-radius </item>
|
||||
<item> -khtml-border-bottom-right-radius </item>
|
||||
<item> -khtml-border-radius </item>
|
||||
<item> -khtml-box-shadow </item>
|
||||
<item> -khtml-opacity </item>
|
||||
|
||||
<!-- Webkit rendering engine CSS property extensions -->
|
||||
<item> -webkit-appearance </item>
|
||||
<item> -webkit-animation-name </item>
|
||||
<item> -webkit-animation-duration </item>
|
||||
<item> -webkit-animation-iteration </item>
|
||||
<item> -webkit-animation-direction </item>
|
||||
<item> -webkit-animation-delay </item>
|
||||
<item> -webkit-animation-play-state </item>
|
||||
<item> -webkit-animation-fill-mode </item>
|
||||
<item> -webkit-background-size </item>
|
||||
<item> -webkit-border-image </item>
|
||||
<item> -webkit-border-bottom-colors </item>
|
||||
<item> -webkit-border-left-colors </item>
|
||||
<item> -webkit-border-radius </item>
|
||||
<item> -webkit-border-right-colors </item>
|
||||
<item> -webkit-border-top-colors </item>
|
||||
<item> -webkit-border-top-left-radius </item>
|
||||
<item> -webkit-border-top-right-radius </item>
|
||||
<item> -webkit-border-bottom-left-radius </item>
|
||||
<item> -webkit-border-bottom-right-radius </item>
|
||||
<item> -webkit-border-radius-bottomleft </item>
|
||||
<item> -webkit-border-radius-bottomright </item>
|
||||
<item> -webkit-box-flex </item>
|
||||
<item> -webkit-box-reflect</item>
|
||||
<item> -webkit-box-shadow </item>
|
||||
<item> -webkit-box-sizing </item>
|
||||
<item> -webkit-column-count </item>
|
||||
<item> -webkit-column-gap </item>
|
||||
<item> -webkit-hyphens </item>
|
||||
<item> -webkit-linear-gradient </item>
|
||||
<item> -webkit-gradient </item>
|
||||
<item> -webkit-perspective </item>
|
||||
<item> -webkit-text-fill-color </item>
|
||||
<item> -webkit-text-stroke-color </item>
|
||||
<item> -webkit-text-stroke-width </item>
|
||||
<item> -webkit-text-size-adjust </item>
|
||||
<item> -webkit-transform </item>
|
||||
<item> -webkit-transform-origin </item>
|
||||
<item> -webkit-transform-style </item>
|
||||
<item> -webkit-transition </item>
|
||||
<item> -webkit-transition-property </item>
|
||||
<item> -webkit-transition-duration </item>
|
||||
|
||||
<!-- Trident (a.k.a., MSHTML) CSS property extensions -->
|
||||
<item> filter </item>
|
||||
<item> zoom </item>
|
||||
<item> -ms-animation-name </item>
|
||||
<item> -ms-animation-duration </item>
|
||||
<item> -ms-animation-iteration </item>
|
||||
<item> -ms-animation-direction </item>
|
||||
<item> -ms-animation-delay </item>
|
||||
<item> -ms-animation-play-state </item>
|
||||
<item> -ms-animation-fill-mode </item>
|
||||
<item> -ms-box-sizing </item>
|
||||
<item> -ms-filter </item>
|
||||
<item> -ms-interpolation-mode </item>
|
||||
<item> -ms-linear-gradient </item>
|
||||
<item> -ms-text-size-adjust </item>
|
||||
<item> -ms-transform </item>
|
||||
<item> -ms-transition </item>
|
||||
|
||||
<!-- font properties in @font-face -->
|
||||
<item> font-family </item>
|
||||
<item> font-size </item>
|
||||
<item> font-stretch </item>
|
||||
<item> font-style </item>
|
||||
<item> font-variant </item>
|
||||
<item> font-weight </item>
|
||||
<item> unicode-range </item>
|
||||
<item> units-per-em </item>
|
||||
<item> src </item>
|
||||
<item> panose-1 </item>
|
||||
<item> stemv </item>
|
||||
<item> stemh </item>
|
||||
<item> slope </item>
|
||||
<item> cap-height </item>
|
||||
<item> x-height </item>
|
||||
<item> ascent </item>
|
||||
<item> descent </item>
|
||||
<item> widths </item>
|
||||
<item> bbox </item>
|
||||
<item> definition-src </item>
|
||||
<item> baseline </item>
|
||||
<item> centerline </item>
|
||||
<item> mathline </item>
|
||||
<item> topline </item>
|
||||
</list>
|
||||
|
||||
<list name="types">
|
||||
<item> inherit </item>
|
||||
<item> none </item>
|
||||
<item> hidden </item>
|
||||
<item> dotted </item>
|
||||
<item> dashed </item>
|
||||
<item> solid </item>
|
||||
<item> double </item>
|
||||
<item> groove </item>
|
||||
<item> ridge </item>
|
||||
<item> inset </item>
|
||||
<item> outset </item>
|
||||
<item> xx-small </item>
|
||||
<item> x-small </item>
|
||||
<item> small </item>
|
||||
<item> medium </item>
|
||||
<item> large </item>
|
||||
<item> x-large </item>
|
||||
<item> xx-large </item>
|
||||
<item> smaller </item>
|
||||
<item> larger </item>
|
||||
<item> italic </item>
|
||||
<item> oblique </item>
|
||||
<item> small-caps </item>
|
||||
<item> normal </item>
|
||||
<item> bold </item>
|
||||
<item> bolder </item>
|
||||
<item> lighter </item>
|
||||
<item> light </item>
|
||||
<item> 100 </item>
|
||||
<item> 200 </item>
|
||||
<item> 300 </item>
|
||||
<item> 400 </item>
|
||||
<item> 500 </item>
|
||||
<item> 600 </item>
|
||||
<item> 700 </item>
|
||||
<item> 800 </item>
|
||||
<item> 900 </item>
|
||||
<item> transparent </item>
|
||||
<item> repeat </item>
|
||||
<item> repeat-x </item>
|
||||
<item> repeat-y </item>
|
||||
<item> no-repeat </item>
|
||||
<item> baseline </item>
|
||||
<item> sub </item>
|
||||
<item> super </item>
|
||||
<item> top </item>
|
||||
<item> text-top </item>
|
||||
<item> middle </item>
|
||||
<item> bottom </item>
|
||||
<item> text-bottom </item>
|
||||
<item> left </item>
|
||||
<item> right </item>
|
||||
<item> center </item>
|
||||
<item> justify </item>
|
||||
<item> konq-center </item>
|
||||
<item> disc </item>
|
||||
<item> circle </item>
|
||||
<item> square </item>
|
||||
<item> box </item>
|
||||
<item> decimal </item>
|
||||
<item> decimal-leading-zero </item>
|
||||
<item> lower-roman </item>
|
||||
<item> upper-roman </item>
|
||||
<item> lower-greek </item>
|
||||
<item> lower-alpha </item>
|
||||
<item> lower-latin </item>
|
||||
<item> upper-alpha </item>
|
||||
<item> upper-latin </item>
|
||||
<item> hebrew </item>
|
||||
<item> armenian </item>
|
||||
<item> georgian </item>
|
||||
<item> cjk-ideographic </item>
|
||||
<item> hiragana </item>
|
||||
<item> katakana </item>
|
||||
<item> hiragana-iroha </item>
|
||||
<item> katakana-iroha </item>
|
||||
<item> inline </item>
|
||||
<item> inline-block </item>
|
||||
<item> block </item>
|
||||
<item> list-item </item>
|
||||
<item> run-in </item>
|
||||
<item> compact </item>
|
||||
<item> marker </item>
|
||||
<item> table </item>
|
||||
<item> inline-table </item>
|
||||
<item> table-row-group </item>
|
||||
<item> table-header-group </item>
|
||||
<item> table-footer-group </item>
|
||||
<item> table-row </item>
|
||||
<item> table-column-group </item>
|
||||
<item> table-column </item>
|
||||
<item> table-cell </item>
|
||||
<item> table-caption </item>
|
||||
<item> auto </item>
|
||||
<item> crosshair </item>
|
||||
<item> default </item>
|
||||
<item> pointer </item>
|
||||
<item> move </item>
|
||||
<item> e-resize </item>
|
||||
<item> ne-resize </item>
|
||||
<item> nw-resize </item>
|
||||
<item> n-resize </item>
|
||||
<item> se-resize </item>
|
||||
<item> sw-resize </item>
|
||||
<item> s-resize </item>
|
||||
<item> w-resize </item>
|
||||
<item> text </item>
|
||||
<item> wait </item>
|
||||
<item> help </item>
|
||||
<item> above </item>
|
||||
<item> absolute </item>
|
||||
<item> always </item>
|
||||
<item> avoid </item>
|
||||
<item> below </item>
|
||||
<item> bidi-override </item>
|
||||
<item> blink </item>
|
||||
<item> both </item>
|
||||
<item> capitalize </item>
|
||||
<item> caption </item>
|
||||
<item> clip </item>
|
||||
<item> close-quote </item>
|
||||
<item> collapse </item>
|
||||
<item> condensed </item>
|
||||
<item> crop </item>
|
||||
<item> cross </item>
|
||||
<item> ellipsis </item>
|
||||
<item> ellipsis-word </item>
|
||||
<item> embed </item>
|
||||
<item> expanded </item>
|
||||
<item> extra-condensed </item>
|
||||
<item> extra-expanded </item>
|
||||
<item> fixed </item>
|
||||
<item> hand </item>
|
||||
<item> hide </item>
|
||||
<item> higher </item>
|
||||
<item> icon </item>
|
||||
<item> inside </item>
|
||||
<item> invert </item>
|
||||
<item> landscape </item>
|
||||
<item> level </item>
|
||||
<item> line-through </item>
|
||||
<item> loud </item>
|
||||
<item> lower </item>
|
||||
<item> lowercase </item>
|
||||
<item> ltr </item>
|
||||
<item> menu </item>
|
||||
<item> message-box </item>
|
||||
<item> mix </item>
|
||||
<item> narrower </item>
|
||||
<item> no-close-quote </item>
|
||||
<item> no-open-quote </item>
|
||||
<item> nowrap </item>
|
||||
<item> open-quote </item>
|
||||
<item> outside </item>
|
||||
<item> overline </item>
|
||||
<item> portrait </item>
|
||||
<item> pre </item>
|
||||
<item> pre-line </item>
|
||||
<item> pre-wrap </item>
|
||||
<item> relative </item>
|
||||
<item> rtl </item>
|
||||
<item> scroll </item>
|
||||
<item> semi-condensed </item>
|
||||
<item> semi-expanded </item>
|
||||
<item> separate </item>
|
||||
<item> show </item>
|
||||
<item> small-caption </item>
|
||||
<item> static </item>
|
||||
<item> static-position </item>
|
||||
<item> status-bar </item>
|
||||
<item> thick </item>
|
||||
<item> thin </item>
|
||||
<item> ultra-condensed </item>
|
||||
<item> ultra-expanded </item>
|
||||
<item> underline </item>
|
||||
<item> uppercase </item>
|
||||
<item> visible </item>
|
||||
<item> wider </item>
|
||||
<item> break </item>
|
||||
<item> serif </item>
|
||||
<item> sans-serif </item>
|
||||
<item> cursive </item>
|
||||
<item> fantasy </item>
|
||||
<item> monospace </item>
|
||||
<item> border-box </item>
|
||||
<item> content-box </item>
|
||||
<item> -epub-hyphens </item>
|
||||
</list>
|
||||
|
||||
|
||||
<list name="colors">
|
||||
<item> aqua </item>
|
||||
<item> black </item>
|
||||
<item> blue </item>
|
||||
<item> cyan </item>
|
||||
<item> fuchsia </item>
|
||||
<item> gray </item>
|
||||
<item> green </item>
|
||||
<item> lime </item>
|
||||
<item> maroon </item>
|
||||
<item> navy </item>
|
||||
<item> olive </item>
|
||||
<item> purple </item>
|
||||
<item> red </item>
|
||||
<item> silver </item>
|
||||
<item> teal </item>
|
||||
<item> white </item>
|
||||
<item> yellow </item>
|
||||
<item> ActiveBorder </item>
|
||||
<item> ActiveCaption </item>
|
||||
<item> AppWorkspace </item>
|
||||
<item> Background </item>
|
||||
<item> ButtonFace </item>
|
||||
<item> ButtonHighlight </item>
|
||||
<item> ButtonShadow </item>
|
||||
<item> ButtonText </item>
|
||||
<item> CaptionText </item>
|
||||
<item> GrayText </item>
|
||||
<item> Highlight </item>
|
||||
<item> HighlightText </item>
|
||||
<item> InactiveBorder </item>
|
||||
<item> InactiveCaption </item>
|
||||
<item> InactiveCaptionText </item>
|
||||
<item> InfoBackground </item>
|
||||
<item> InfoText </item>
|
||||
<item> Menu </item>
|
||||
<item> MenuText </item>
|
||||
<item> Scrollbar </item>
|
||||
<item> ThreeDDarkShadow </item>
|
||||
<item> ThreeDFace </item>
|
||||
<item> ThreeDHighlight </item>
|
||||
<item> ThreeDLightShadow </item>
|
||||
<item> ThreeDShadow </item>
|
||||
<item> Window </item>
|
||||
<item> WindowFrame </item>
|
||||
<item> WindowText </item>
|
||||
</list>
|
||||
|
||||
<list name="paren">
|
||||
<item> url </item>
|
||||
<item> attr </item>
|
||||
<item> rect </item>
|
||||
<item> rgb </item>
|
||||
<item> rgba </item>
|
||||
<item> hsl </item>
|
||||
<item> hsla </item>
|
||||
<item> counter </item>
|
||||
<item> counters </item>
|
||||
|
||||
<!-- in @font-face -->
|
||||
<item> local </item>
|
||||
<item> format </item>
|
||||
|
||||
<!-- Trident (a.k.a., MSHTML) rendering engine functional notation extensions -->
|
||||
<item> expression </item>
|
||||
|
||||
</list>
|
||||
|
||||
<list name="mediatypes">
|
||||
<item> all </item>
|
||||
<item> aural </item>
|
||||
<item> braille </item>
|
||||
<item> embossed </item>
|
||||
<item> handheld </item>
|
||||
<item> print </item>
|
||||
<item> projection </item>
|
||||
<item> screen </item>
|
||||
<item> speech </item>
|
||||
<item> tty </item>
|
||||
<item> tv </item>
|
||||
</list>
|
||||
|
||||
<list name="mediatypes_op">
|
||||
<item> not </item>
|
||||
<item> only </item>
|
||||
</list>
|
||||
|
||||
<list name="media_features">
|
||||
<item> width </item>
|
||||
<item> min-width </item>
|
||||
<item> max-width</item>
|
||||
<item> height </item>
|
||||
<item> min-height </item>
|
||||
<item> max-height </item>
|
||||
<item> device-width </item>
|
||||
<item> min-device-width </item>
|
||||
<item> max-device-width </item>
|
||||
<item> device-height </item>
|
||||
<item> min-device-height </item>
|
||||
<item> max-device-height </item>
|
||||
<item> orientation </item>
|
||||
<item> aspect-ratio </item>
|
||||
<item> min-aspect-ratio </item>
|
||||
<item> max-aspect-ratio </item>
|
||||
<item> device-aspect-ratio </item>
|
||||
<item> min-device-aspect-ratio </item>
|
||||
<item> max-device-aspect-ratio </item>
|
||||
<item> color </item>
|
||||
<item> min-color </item>
|
||||
<item> max-color </item>
|
||||
<item> color-index </item>
|
||||
<item> min-color-index </item>
|
||||
<item> max-color-index </item>
|
||||
<item> monochrome </item>
|
||||
<item> min-monochrome </item>
|
||||
<item> max-monochrome </item>
|
||||
<item> resolution </item>
|
||||
<item> min-resolution </item>
|
||||
<item> max-resolution </item>
|
||||
<item> scan </item>
|
||||
<item> grid </item>
|
||||
</list>
|
||||
|
||||
<list name="pseudoclasses">
|
||||
<item> hover </item>
|
||||
<item> link </item>
|
||||
<item> visited </item>
|
||||
<item> active </item>
|
||||
<item> focus </item>
|
||||
<item> first-child </item>
|
||||
<item> last-child </item>
|
||||
<item> only-child </item>
|
||||
<item> first-of-type </item>
|
||||
<item> last-of-type </item>
|
||||
<item> only-of-type </item>
|
||||
<item> first-letter </item>
|
||||
<item> first-line </item>
|
||||
<item> before </item>
|
||||
<item> after </item>
|
||||
<item> selection </item>
|
||||
<item> root </item>
|
||||
<item> empty </item>
|
||||
<item> target </item>
|
||||
<item> enabled </item>
|
||||
<item> disabled </item>
|
||||
<item> checked </item>
|
||||
<item> indeterminate </item>
|
||||
<item> nth-child </item>
|
||||
<item> nth-last-child </item>
|
||||
<item> nth-of-type </item>
|
||||
<item> nth-last-of-type </item>
|
||||
<item> not </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Base">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<LineContinue/>
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="FindRuleSets" />
|
||||
</context>
|
||||
|
||||
<!-- to be included -->
|
||||
<!-- finds rules and detects nesting -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindRuleSets">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Media" context="Media" String="@media\b" />
|
||||
<RegExpr attribute="At Rule" context="Import" String="@import\b" />
|
||||
<RegExpr attribute="At Rule" context="#stay" String="@(font-face|charset)\b" />
|
||||
<DetectChar attribute="Property" context="RuleSet" char="{" beginRegion="ruleset" />
|
||||
<!--parse selectors-->
|
||||
<DetectChar attribute="Selector Attr" context="SelAttr" char="[" />
|
||||
<RegExpr attribute="Selector Id" context="#stay" String="#(-)?(&nmstart;)(&nmchar;)*" />
|
||||
<RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" />
|
||||
<RegExpr attribute="Selector Pseudo" context="#stay" String=":lang\([\w_-]+\)" />
|
||||
<DetectChar attribute="Selector Pseudo" context="SelPseudo" char=":" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<!-- finds arguments to properties -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindValues">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Value" context="#stay" String="[-+]?[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz)\b" />
|
||||
<RegExpr attribute="Value" context="#stay" String="[-+]?[0-9.]+[%]?" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[\w\-]+" />
|
||||
</context>
|
||||
|
||||
<!-- finds strings -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="String" context="StringDQ" char=""" />
|
||||
<DetectChar attribute="String" context="StringSQ" char="'" />
|
||||
</context>
|
||||
|
||||
<!-- finds comments -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindComments">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="/\*BEGIN.*\*/" beginRegion="UserDefined" />
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="/\*END.*\*/" endRegion="UserDefined" />
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" beginRegion="comment" />
|
||||
</context>
|
||||
|
||||
<!-- other contexts -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Media">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Media" context="Media2" char="{" beginRegion="media" />
|
||||
<DetectChar attribute="Media" context="MediaQueryExpression" char="(" />
|
||||
<keyword attribute="Media" context="MediaQueries" String="mediatypes"/>
|
||||
<keyword attribute="Media" context="MediaTypes" String="mediatypes_op" />
|
||||
<DetectChar attribute="Media" context="#stay" char="," />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S+" />
|
||||
</context>
|
||||
|
||||
<context attribute="Media" lineEndContext="#stay" name="MediaTypes">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<keyword attribute="Media" context="MediaQueries" String="mediatypes"/>
|
||||
<DetectChar attribute="Media" context="#pop" char= "{" lookAhead="true"/>
|
||||
<DetectChar attribute="Media" context="#pop" char= "," lookAhead="true"/>
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="FindComments"/>
|
||||
<RegExpr attribute="Error" context="#stay" String="\S+"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Media" lineEndContext="#stay" name="MediaQueries">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Media" context="MediaQueryExpression" String="\s+and\s+\("/>
|
||||
<DetectChar attribute="Media" context="#pop" char= "{" lookAhead="true"/>
|
||||
<DetectChar attribute="Media" context="#pop" char= "," lookAhead="true"/>
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="FindComments"/>
|
||||
<RegExpr attribute="Error" context="#stay" String="\S+"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Media" lineEndContext="#stay" name="MediaQueryExpression">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<keyword attribute="Media" context="MQEE" String="media_features"/>
|
||||
<IncludeRules context="FindComments"/>
|
||||
<RegExpr attribute="Error" context="#stay" String="\S+"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Media" lineEndContext="#stay" name="MQEE" fallthrough="true" fallthroughContext="#pop">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="FindComments"/>
|
||||
<DetectChar attribute="Media" context="MQEV" char=":"/>
|
||||
<RegExpr attribute="Media" context="#pop" String="\)\s+and\s+\("/>
|
||||
<DetectChar attribute="Media" context="#pop#pop" char=")"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Media" lineEndContext="#stay" name="MQEV">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<!-- this should be seperate for different features, for now it is all the same -->
|
||||
<DetectSpaces/>
|
||||
<RegExpr attribute="Value" context="#pop" String="[1-9][0-9.]*\s*/\s*[1-9][0-9.]*" />
|
||||
<RegExpr attribute="Value" context="#pop" String="[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz|dpi|dpcm)\b" />
|
||||
<RegExpr attribute="Value" context="#pop" String="[0-9.]+[%]?" />
|
||||
<RegExpr attribute="Value" context="#pop" String="(portrait|landscape)" />
|
||||
<RegExpr attribute="Error" context="#stay" String=".*"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Media2">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Media" context="#pop#pop" char="}" endRegion="media" />
|
||||
<IncludeRules context="FindRuleSets" />
|
||||
</context>
|
||||
|
||||
<context attribute="Selector Attr" lineEndContext="#stay" name="SelAttr">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Selector Attr" context="#pop" char="]" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
</context>
|
||||
|
||||
<context attribute="Selector Pseudo" lineEndContext="#pop" name="SelPseudo"
|
||||
fallthrough="true" fallthroughContext="#pop">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<keyword attribute="Selector Pseudo" context="#pop" String="pseudoclasses" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Import">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="At Rule" context="#pop" char=";" />
|
||||
<keyword attribute="Media" context="#stay" String="mediatypes" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<context attribute="Comment" lineEndContext="#stay" name="Comment">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="comment" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="RuleSet">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Property" context="#pop" char="}" endRegion="ruleset" />
|
||||
<keyword attribute="Property" context="Rule" String="properties" />
|
||||
<RegExpr attribute="Unknown Property" context="Rule" String="-?[A-Za-z_-]+(?=\s*:)" />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Rule">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Property" context="Rule2" char=":" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Rule2">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Property" context="#pop#pop" char=";" />
|
||||
<DetectChar attribute="Property" context="#pop#pop#pop" char="}" endRegion="ruleset" />
|
||||
<!-- parse property values -->
|
||||
<keyword attribute="Value" context="#stay" String="types" />
|
||||
<keyword attribute="Value" context="#stay" String="colors" />
|
||||
<RegExpr attribute="Value" context="#stay" String="#([0-9A-Fa-f]{3}){1,4}\b" />
|
||||
<keyword attribute="Value" context="PropParen" String="paren" />
|
||||
<RegExpr attribute="Important" context="#stay" String="!important\b" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="PropParen">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="PropParen2" char="(" />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="PropParen2">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="#pop#pop" char=")" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<!-- string contexts -->
|
||||
<context attribute="String" lineEndContext="#stay" name="StringDQ">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
<IncludeRules context="InsideString" />
|
||||
</context>
|
||||
|
||||
<context attribute="String" lineEndContext="#stay" name="StringSQ">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="String" context="#pop" char="'" />
|
||||
<IncludeRules context="InsideString" />
|
||||
</context>
|
||||
|
||||
<context attribute="String" lineEndContext="#stay" name="InsideString">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="String" context="#stay" String="\\["']" />
|
||||
<DetectIdentifier/>
|
||||
</context>
|
||||
|
||||
<context name="FindPHP">
|
||||
<RegExpr context="##PHP/PHP" String="<\?(?:=|php)?" lookAhead="true" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
|
||||
<itemData name="Property" defStyleNum="dsKeyword" spellChecking="false"/>
|
||||
<itemData name="Unknown Property" defStyleNum="dsKeyword" italic="1" spellChecking="false"/>
|
||||
<itemData name="Media" defStyleNum="dsDecVal" bold="1" spellChecking="false"/>
|
||||
<itemData name="At Rule" defStyleNum="dsDecVal" spellChecking="false"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Value" defStyleNum="dsDataType" spellChecking="false"/>
|
||||
<itemData name="Important" defStyleNum="dsKeyword" spellChecking="false"/>
|
||||
<itemData name="Selector Attr" defStyleNum="dsChar" spellChecking="false"/>
|
||||
<itemData name="Selector Id" defStyleNum="dsFloat" bold="1" spellChecking="false"/>
|
||||
<itemData name="Selector Class" defStyleNum="dsFloat" spellChecking="false"/>
|
||||
<itemData name="Selector Pseudo" defStyleNum="dsDecVal" spellChecking="false"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
|
||||
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="0" weakDeliminator="-%"/>
|
||||
<comments>
|
||||
<comment name="multiLine" start="/*" end="*/" />
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
|
@ -1,265 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY name "[A-Za-z_:][\w.:_-]*">
|
||||
<!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||
]>
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
||||
|
||||
|
||||
|
||||
<language name="PHP (HTML)" version="2.1" kateversion="2.4" section="Scripts" extensions="*.php;*.php3;*.wml;*.phtml;*.phtm;*.inc" mimetype="text/x-php4-src;text/x-php3-src;text/vnd.wap.wml;application/x-php" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<IncludeRules context="FindHTML" />
|
||||
</context>
|
||||
|
||||
<context name="FindHTML" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<StringDetect attribute="CDATA" context="CDATA" String="<![CDATA[" beginRegion="cdata" />
|
||||
<RegExpr attribute="Doctype" context="Doctype" String="<!DOCTYPE\s+" insensitive="TRUE" beginRegion="doctype" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" />
|
||||
<RegExpr attribute="Element" context="CSS" String="<style\b" insensitive="TRUE" beginRegion="style" />
|
||||
<RegExpr attribute="Element" context="JS" String="<script\b" insensitive="TRUE" beginRegion="script" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<pre\b" insensitive="TRUE" beginRegion="pre" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<div\b" insensitive="TRUE" beginRegion="div" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<table\b" insensitive="TRUE" beginRegion="table" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<ul\b" insensitive="TRUE" beginRegion="ul" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<ol\b" insensitive="TRUE" beginRegion="ol" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<dl\b" insensitive="TRUE" beginRegion="dl" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<article\b" insensitive="TRUE" beginRegion="article" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<aside\b" insensitive="TRUE" beginRegion="aside" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<details\b" insensitive="TRUE" beginRegion="details" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<figure\b" insensitive="TRUE" beginRegion="figure" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<footer\b" insensitive="TRUE" beginRegion="footer" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<header\b" insensitive="TRUE" beginRegion="header" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<main\b" insensitive="TRUE" beginRegion="main" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<nav\b" insensitive="TRUE" beginRegion="nav" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<section\b" insensitive="TRUE" beginRegion="section" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<&name;" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</pre\b" insensitive="TRUE" endRegion="pre" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</div\b" insensitive="TRUE" endRegion="div" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</table\b" insensitive="TRUE" endRegion="table" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</ul\b" insensitive="TRUE" endRegion="ul" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</ol\b" insensitive="TRUE" endRegion="ol" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</dl\b" insensitive="TRUE" endRegion="dl" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</article\b" insensitive="TRUE" endRegion="article" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</aside\b" insensitive="TRUE" endRegion="aside" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</details\b" insensitive="TRUE" endRegion="details" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</figure\b" insensitive="TRUE" endRegion="figure" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</footer\b" insensitive="TRUE" endRegion="footer" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</header\b" insensitive="TRUE" endRegion="header" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</main\b" insensitive="TRUE" endRegion="main" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</nav\b" insensitive="TRUE" endRegion="nav" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</section\b" insensitive="TRUE" endRegion="section" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</&name;" />
|
||||
<!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context="FindDTDRules" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&<" />
|
||||
</context>
|
||||
|
||||
<context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&%" />
|
||||
</context>
|
||||
|
||||
<context name="FindAttributes" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Attribute" context="#stay" String="&name;" column="0"/>
|
||||
<RegExpr attribute="Attribute" context="#stay" String="\s+&name;" />
|
||||
<DetectChar attribute="Attribute" context="Value" char="=" />
|
||||
</context>
|
||||
|
||||
<context name="FindDTDRules" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
|
||||
</context>
|
||||
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||
<RegExpr attribute="Error" context="#stay" String="-(-(?!->))+" />
|
||||
</context>
|
||||
|
||||
<context name="CDATA" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" />
|
||||
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" />
|
||||
</context>
|
||||
|
||||
<context name="PI" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" />
|
||||
<DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
|
||||
<IncludeRules context="FindDTDRules" />
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="#pop" char=""" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="#pop" char="'" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="El Open" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" />
|
||||
<DetectChar attribute="Element" context="#pop" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Element" context="#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close 2" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Element" context="#pop#pop#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close 3" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Element" context="#pop#pop#pop#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="CSS" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="style" />
|
||||
<DetectChar attribute="Element" context="CSS content" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="CSS content" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Element" context="El Close 2" String="</style\b" insensitive="TRUE" endRegion="style" />
|
||||
<IncludeRules context="##CSS/PHP" includeAttrib="true"/>
|
||||
</context>
|
||||
|
||||
<context name="JS" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" />
|
||||
<DetectChar attribute="Element" context="JS content" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="JS content" attribute="Other Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="TRUE" endRegion="script" />
|
||||
<RegExpr attribute="Comment" context="JS comment close" String="//(?=.*</script\b)" insensitive="TRUE" />
|
||||
<IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
|
||||
</context>
|
||||
|
||||
<context name="JS comment close" attribute="Comment" lineEndContext="#pop">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Element" context="El Close 3" String="</script\b" insensitive="TRUE" endRegion="script" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<context name="Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="Value DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Value SQ" char="'" />
|
||||
<DetectSpaces />
|
||||
</context>
|
||||
|
||||
<context name="Value NQ" attribute="Other Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
<RegExpr attribute="Value" context="#stay" String="/(?!>)" />
|
||||
<RegExpr attribute="Value" context="#stay" String="[^/><"'\s]" />
|
||||
</context>
|
||||
|
||||
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="#pop#pop" char=""" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Value SQ" attribute="Value" lineEndContext="#stay">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Value" context="#pop#pop" char="'" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="FindPHP">
|
||||
<RegExpr context="##PHP/PHP" String="<\?(?:=|php)?" lookAhead="true" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Other Text" defStyleNum="dsNormal" spellChecking="false" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" spellChecking="false" />
|
||||
<itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false" />
|
||||
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false" />
|
||||
<itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" />
|
||||
<itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
|
||||
<itemData name="Value" defStyleNum="dsString" color="#a00" spellChecking="false" />
|
||||
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
|
||||
<itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" />
|
||||
<itemData name="Error" defStyleNum="dsError" spellChecking="false" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="<!--" end="-->" />
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
|
@ -1,252 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!-- Author: Anders Lund <anders@alweb.dk> //-->
|
||||
<!-- Minor changes: Joseph Wenninger <jowenn@kde.org> //-->
|
||||
<!-- Full JavaScript 1.0 support by Whitehawk Stormchaser //-->
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
||||
|
||||
|
||||
|
||||
<language name="JavaScript/PHP" hidden="true" version="1.22" kateversion="2.4" section="Other" extensions=""
|
||||
mimetype="" indenter="cstyle"
|
||||
author="Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)" license="">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> break </item>
|
||||
<item> case </item>
|
||||
<item> catch </item>
|
||||
<item> const </item>
|
||||
<item> continue </item>
|
||||
<item> debugger </item>
|
||||
<item> default </item>
|
||||
<item> delete </item>
|
||||
<item> do </item>
|
||||
<item> else </item>
|
||||
<item> finally </item>
|
||||
<item> for </item>
|
||||
<item> function </item>
|
||||
<item> if </item>
|
||||
<item> in </item>
|
||||
<item> instanceof </item>
|
||||
<item> new </item>
|
||||
<item> return </item>
|
||||
<item> switch </item>
|
||||
<item> this </item>
|
||||
<item> throw </item>
|
||||
<item> try </item>
|
||||
<item> typeof </item>
|
||||
<item> var </item>
|
||||
<item> void </item>
|
||||
<item> while </item>
|
||||
<item> with </item>
|
||||
</list>
|
||||
<list name="reserved">
|
||||
<item> class </item>
|
||||
<item> enum </item>
|
||||
<item> export </item>
|
||||
<item> extends </item>
|
||||
<item> import </item>
|
||||
<item> super </item>
|
||||
|
||||
<!-- The following keywords are reserved only in strict-mode -->
|
||||
<item> implements </item>
|
||||
<item> interface </item>
|
||||
<item> let </item>
|
||||
<item> package </item>
|
||||
<item> private </item>
|
||||
<item> protected </item>
|
||||
<item> public </item>
|
||||
<item> static </item>
|
||||
<item> yield </item>
|
||||
</list>
|
||||
<list name="primitives">
|
||||
<item> Infinity </item>
|
||||
<item> NaN </item>
|
||||
<item> false </item>
|
||||
<item> null </item>
|
||||
<item> true </item>
|
||||
<item> undefined </item>
|
||||
</list>
|
||||
<contexts>
|
||||
|
||||
<!-- Shebang: ("#!") Detect shebang and fallthrough to Normal -->
|
||||
<!-- Based on the similar clause from prolog.xml, which notes the following BUG:
|
||||
If the file starts with whitespace and a shebang on a line other than the first line,
|
||||
this rule will still match it as a shebang, even tough the shebang is only valid on
|
||||
the very first line.
|
||||
-->
|
||||
<context name="Shebang" lineEndContext="Normal" attribute="Syntax Error" fallthrough="true" fallthroughContext="Normal" >
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars column="0" char="#" char1="!" context="Comment" attribute="Comment" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectSpaces/>
|
||||
<StringDetect attribute="Region Marker" context="region_marker" String="//BEGIN" beginRegion="Region1" />
|
||||
<StringDetect attribute="Region Marker" context="region_marker" String="//END" endRegion="Region1" />
|
||||
|
||||
<Float attribute="Float" context="NoRegExp" />
|
||||
<HlCOct attribute="Octal" context="NoRegExp" />
|
||||
<HlCHex attribute="Hex" context="NoRegExp" />
|
||||
<Int attribute="Decimal" context="NoRegExp" />
|
||||
<AnyChar context="NoRegExp" String="])" />
|
||||
|
||||
<keyword attribute="Keyword" String="keywords" />
|
||||
<keyword attribute="Reserved" String="reserved" />
|
||||
<keyword attribute="Keyword" context="NoRegExp" String="primitives" />
|
||||
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr attribute="Objects" context="Object Member" String="[a-zA-Z_$][\w$]*(?=\s*\.)" />
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr attribute="Object Member" context="NoRegExp" String="[a-zA-Z_$][\w$]*(?=\s*\()" />
|
||||
<DetectChar context="Object Member" char="." />
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr context="NoRegExp" String="[a-zA-Z_$][\w$]*" />
|
||||
|
||||
<DetectChar attribute="String" context="String" char=""" />
|
||||
<DetectChar attribute="String" context="String SQ" char="'" />
|
||||
|
||||
<IncludeRules context="##Doxygen" />
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="/" char1="/" />
|
||||
<Detect2Chars attribute="Comment" context="Multi/inline Comment" char="/" char1="*" beginRegion="Comment" />
|
||||
|
||||
<DetectChar attribute="Regular Expression" context="(regex caret first check)" char="/" />
|
||||
|
||||
<DetectChar attribute="Symbol" context="Object" char="{" beginRegion="Brace" />
|
||||
<DetectChar attribute="Symbol" context="Conditional Expression" char="?" />
|
||||
|
||||
<AnyChar attribute="Symbol" String=":!%&+,-/.*<=>?|~^;" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" name="Object Member">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar char="." />
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr attribute="Objects" context="Object Member" String="[a-zA-Z_$][\w$]*(?=\s*\.)" />
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr attribute="Object Member" String="[a-zA-Z_$][\w$]*" />
|
||||
<IncludeRules context="NoRegExp" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop" name="NoRegExp">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<Detect2Chars context="#pop" lookAhead="true" char="/" char1="/" />
|
||||
<Detect2Chars context="#pop" lookAhead="true" char="/" char1="*" />
|
||||
<DetectChar context="#pop" char="/" />
|
||||
<DetectSpaces/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Conditional Expression">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar context="#pop" char=":" />
|
||||
<IncludeRules context="Normal" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Object">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<!-- Mostly required for define: in switch blocks -->
|
||||
<keyword attribute="Keyword" String="keywords" />
|
||||
<!--DetectIdentifier-->
|
||||
<RegExpr attribute="JSON" String="[a-zA-Z_$][\w$]*\s*(?=:)" />
|
||||
<DetectChar attribute="Symbol" char="}" endRegion="Brace" context="#pop" />
|
||||
<IncludeRules context="Normal" />
|
||||
</context>
|
||||
|
||||
<context attribute="String" lineEndContext="#pop" name="String">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<HlCStringChar attribute="Char" />
|
||||
<LineContinue/>
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
</context>
|
||||
<context attribute="String" lineEndContext="#pop" name="String SQ">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<HlCStringChar attribute="Char" />
|
||||
<LineContinue/>
|
||||
<DetectChar attribute="String" context="#pop" char="'" />
|
||||
</context>
|
||||
|
||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<IncludeRules context="##Modelines" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#stay" name="Multi/inline Comment">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<IncludeRules context="##Modelines" />
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
|
||||
</context>
|
||||
|
||||
<context attribute="Regular Expression" lineEndContext="#stay" name="Regular Expression">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr attribute="Regular Expression" context="#pop#pop" String="/\w*" />
|
||||
<RegExpr attribute="Pattern Internal Operator" String="\{[\d, ]+\}" />
|
||||
<RegExpr attribute="Pattern Internal Operator" String="\\[bB]" />
|
||||
<RegExpr attribute="Pattern Character Class" String="\\[nrtvfDdSsWw]" />
|
||||
<DetectChar attribute="Pattern Character Class" context="(charclass caret first check)" char="[" />
|
||||
<RegExpr attribute="Pattern Internal Operator" String="\\." />
|
||||
<RegExpr attribute="Pattern Internal Operator" String="\$(?=/)" />
|
||||
<AnyChar attribute="Pattern Internal Operator" String="?+*()|" />
|
||||
</context>
|
||||
<context attribute="Pattern Character Class" lineEndContext="#stay" name="Regular Expression Character Class">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<RegExpr String="\\[\[\]]" />
|
||||
<RegExpr attribute="Pattern Internal Operator" String="\\." />
|
||||
<DetectChar attribute="Pattern Character Class" context="#pop#pop" char="]" />
|
||||
</context>
|
||||
<context attribute="Pattern Internal Operator" lineEndContext="#pop" name="(regex caret first check)" fallthrough="true" fallthroughContext="Regular Expression">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="Regular Expression" char="^" />
|
||||
</context>
|
||||
<context attribute="Pattern Internal Operator" lineEndContext="#pop" name="(charclass caret first check)" fallthrough="true" fallthroughContext="Regular Expression Character Class">
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="Regular Expression Character Class" char="^" />
|
||||
</context>
|
||||
|
||||
<context name="region_marker" attribute="Region Marker" lineEndContext="#pop" >
|
||||
<IncludeRules context="FindPHP" />
|
||||
<DetectIdentifier/>
|
||||
<DetectSpaces/>
|
||||
</context>
|
||||
<context name="FindPHP">
|
||||
<RegExpr context="##PHP/PHP" String="<\?(?:=|php)?" lookAhead="true" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
|
||||
<itemData name="Reserved" defStyleNum="dsKeyword" italic="true" spellChecking="false" />
|
||||
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false" />
|
||||
<itemData name="Objects" defStyleNum="dsOthers" spellChecking="false" />
|
||||
<itemData name="Object Member" defStyleNum="dsFunction" spellChecking="false" />
|
||||
|
||||
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
|
||||
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" />
|
||||
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" />
|
||||
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
|
||||
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false" />
|
||||
<itemData name="Regular Expression" defStyleNum="dsOthers" spellChecking="false" />
|
||||
<itemData name="Pattern Internal Operator" defStyleNum="dsFloat" spellChecking="false" />
|
||||
<itemData name="Pattern Character Class" defStyleNum="dsBaseN" spellChecking="false" />
|
||||
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" />
|
||||
<itemData name="JSON" defStyleNum="dsDataType" spellChecking="false" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="//" />
|
||||
<comment name="multiLine" start="/*" end="*/" />
|
||||
</comments>
|
||||
<keywords casesensitive="1" />
|
||||
</general>
|
||||
</language>
|
||||
|
||||
|
||||
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->
|
|
@ -67,16 +67,13 @@ class KateFactory : public KTextEditor::Factory
|
|||
// default to the kparts::* behavior of having one single widget() if the user don't requested a pure document
|
||||
bool bWantSingleView = (classname != "KTextEditor::Document");
|
||||
|
||||
// does user want browserview? not konqueror
|
||||
bool bWantBrowserView = false;
|
||||
|
||||
// should we be readonly?
|
||||
bool bWantReadOnly = (bWantBrowserView || ( classname == "KParts::ReadOnlyPart" ));
|
||||
// should be readonly?
|
||||
bool bWantReadOnly = (classname == "KParts::ReadOnlyPart");
|
||||
|
||||
// set simple mode on for read-only part per default
|
||||
KateGlobal::self ()->setSimpleMode (bWantReadOnly);
|
||||
|
||||
KParts::ReadWritePart *part = new KateDocument (bWantSingleView, bWantBrowserView, bWantReadOnly, parentWidget, parent);
|
||||
KParts::ReadWritePart *part = new KateDocument (bWantSingleView, bWantReadOnly, parentWidget, parent);
|
||||
part->setReadWrite( !bWantReadOnly );
|
||||
|
||||
return part;
|
||||
|
|
|
@ -221,7 +221,7 @@ KateGlobal::~KateGlobal()
|
|||
|
||||
KTextEditor::Document *KateGlobal::createDocument ( QObject *parent )
|
||||
{
|
||||
KateDocument *doc = new KateDocument (false, false, false, 0, parent);
|
||||
KateDocument *doc = new KateDocument (false, false, 0, parent);
|
||||
|
||||
emit documentCreated (this, doc);
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "katerenderer.h"
|
||||
#include "katedocument.h"
|
||||
#include "kateundomanager.h"
|
||||
#include "katedocumenthelpers.h"
|
||||
#include "kateglobal.h"
|
||||
#include "katehighlight.h"
|
||||
#include "katehighlightmenu.h"
|
||||
|
@ -330,12 +329,6 @@ void KateView::setupConnections()
|
|||
|
||||
connect( m_doc, SIGNAL(annotationModelChanged(KTextEditor::AnnotationModel*,KTextEditor::AnnotationModel*)),
|
||||
m_viewInternal->m_leftBorder, SLOT(annotationModelChanged(KTextEditor::AnnotationModel*,KTextEditor::AnnotationModel*)) );
|
||||
|
||||
if ( m_doc->browserView() )
|
||||
{
|
||||
connect( this, SIGNAL(dropEventPass(QDropEvent*)),
|
||||
this, SLOT(slotDropEventPass(QDropEvent*)) );
|
||||
}
|
||||
}
|
||||
|
||||
void KateView::setupActions()
|
||||
|
@ -902,7 +895,7 @@ void KateView::setupEditActions()
|
|||
m_editActions << a;
|
||||
|
||||
|
||||
// anders: shortcuts doing any changes should not be created in browserextension
|
||||
// anders: shortcuts doing any changes should not be created in part
|
||||
if ( !m_doc->readOnly() )
|
||||
{
|
||||
a = ac->addAction("transpose_char");
|
||||
|
@ -1194,26 +1187,6 @@ void KateView::slotUpdateUndo()
|
|||
m_editRedo->setEnabled(m_doc->isReadWrite() && m_doc->redoCount() > 0);
|
||||
}
|
||||
|
||||
void KateView::slotDropEventPass( QDropEvent * ev )
|
||||
{
|
||||
const KUrl::List lstDragURLs=KUrl::List::fromMimeData(ev->mimeData());
|
||||
bool ok = !lstDragURLs.isEmpty();
|
||||
|
||||
KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( doc() );
|
||||
if ( ok && ext )
|
||||
emit ext->openUrlRequest( lstDragURLs.first() );
|
||||
}
|
||||
|
||||
void KateView::contextMenuEvent( QContextMenuEvent *ev )
|
||||
{
|
||||
if ( !m_doc || !m_doc->browserExtension() )
|
||||
return;
|
||||
KParts::OpenUrlArguments args;
|
||||
args.setMimeType( QLatin1String("text/plain") );
|
||||
emit m_doc->browserExtension()->popupMenu( ev->globalPos(), m_doc->url(), S_IFREG, args );
|
||||
ev->accept();
|
||||
}
|
||||
|
||||
bool KateView::setCursorPositionInternal( const KTextEditor::Cursor& position, uint tabwidth, bool calledExternally )
|
||||
{
|
||||
Kate::TextLine l = m_doc->kateTextLine( position.line() );
|
||||
|
|
|
@ -567,13 +567,9 @@ class KATEPARTINTERFACES_EXPORT KateView : public KTextEditor::View,
|
|||
public:
|
||||
void slotTextInserted ( KTextEditor::View *view, const KTextEditor::Cursor &position, const QString &text);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent( QContextMenuEvent* );
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotGotFocus();
|
||||
void slotLostFocus();
|
||||
void slotDropEventPass( QDropEvent* ev );
|
||||
void slotSaveCanceled( const QString& error );
|
||||
void slotConfigDialog ();
|
||||
|
||||
|
|
|
@ -2423,12 +2423,6 @@ void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
|
|||
|
||||
QPoint p = e->pos();
|
||||
|
||||
if ( doc()->browserView() )
|
||||
{
|
||||
m_view->contextMenuEvent( e );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( e->reason() == QContextMenuEvent::Keyboard )
|
||||
{
|
||||
makeVisible( m_displayCursor, 0 );
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include <kmimetype.h>
|
||||
#include <kparts/part.h>
|
||||
#include <kparts/browserextension.h>
|
||||
#include <kmimetypetrader.h>
|
||||
|
||||
FavIconUpdater::FavIconUpdater(QObject *parent)
|
||||
|
|
|
@ -577,7 +577,7 @@ void KFindTreeView::contextMenuRequested( const QPoint & p)
|
|||
}
|
||||
}
|
||||
|
||||
KParts::BrowserExtension::PopupFlags flags = KParts::BrowserExtension::ShowProperties; // | KParts::BrowserExtension::ShowUrlOperations;
|
||||
KonqPopupMenu::PopupFlags flags = KonqPopupMenu::ShowProperties; // | KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
QList<QAction*> editActions;
|
||||
editActions.append(m_actionCollection->action("file_open"));
|
||||
|
@ -586,7 +586,7 @@ void KFindTreeView::contextMenuRequested( const QPoint & p)
|
|||
editActions.append(m_actionCollection->action("del"));
|
||||
editActions.append(m_actionCollection->action("trash"));
|
||||
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("editactions", editActions);
|
||||
|
||||
if( m_contextMenu )
|
||||
|
@ -595,7 +595,7 @@ void KFindTreeView::contextMenuRequested( const QPoint & p)
|
|||
delete m_contextMenu;
|
||||
m_contextMenu = 0;
|
||||
}
|
||||
m_contextMenu = new KonqPopupMenu( fileList, KUrl(), *m_actionCollection, new KNewFileMenu( m_actionCollection, "new_menu", this), 0, flags, this, 0, actionGroups);
|
||||
m_contextMenu = new KonqPopupMenu( fileList, KUrl(), *m_actionCollection, new KNewFileMenu( m_actionCollection, "new_menu", this), flags, this, 0, actionGroups);
|
||||
|
||||
m_contextMenu->exec( this->mapToGlobal( p ) );
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
KonqPopupMenuPrivate(KonqPopupMenu* qq, KActionCollection & actions, QWidget* parentWidget)
|
||||
: q(qq),
|
||||
m_parentWidget(parentWidget),
|
||||
m_itemFlags(KParts::BrowserExtension::DefaultPopupItems),
|
||||
m_itemFlags(KonqPopupMenu::DefaultPopupItems),
|
||||
m_pMenuNew(0),
|
||||
m_copyToMenu(parentWidget),
|
||||
m_bookmarkManager(0),
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
void addNamedAction(const QString& name);
|
||||
void addGroup(const QString& name);
|
||||
void addPlugins();
|
||||
void init(KonqPopupMenu::Flags kpf, KParts::BrowserExtension::PopupFlags itemFlags);
|
||||
void init(KonqPopupMenu::PopupFlags flags);
|
||||
|
||||
void slotPopupNewDir();
|
||||
void slotPopupNewView();
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
KonqPopupMenu* q;
|
||||
QWidget* m_parentWidget;
|
||||
QString m_urlTitle;
|
||||
KParts::BrowserExtension::PopupFlags m_itemFlags;
|
||||
KonqPopupMenu::PopupFlags m_itemFlags;
|
||||
KNewFileMenu *m_pMenuNew;
|
||||
KUrl m_sViewURL;
|
||||
KFileItemListProperties m_popupItemProperties;
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
KActionCollection &m_actions;
|
||||
KActionCollection m_ownActionCollection; // only used by plugins; KDE5: pass m_ownActions instead
|
||||
QList<KAction*> m_ownActions;
|
||||
KParts::BrowserExtension::ActionGroupMap m_actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap m_actionGroups;
|
||||
};
|
||||
|
||||
//////////////////
|
||||
|
@ -127,11 +127,10 @@ KonqPopupMenu::KonqPopupMenu(const KFileItemList &items,
|
|||
const KUrl& viewURL,
|
||||
KActionCollection &actions,
|
||||
KNewFileMenu *newMenu,
|
||||
Flags kpf,
|
||||
KParts::BrowserExtension::PopupFlags flags,
|
||||
KonqPopupMenu::PopupFlags flags,
|
||||
QWidget *parentWidget,
|
||||
KBookmarkManager *mgr,
|
||||
const KParts::BrowserExtension::ActionGroupMap& actionGroups)
|
||||
const KonqPopupMenu::ActionGroupMap &actionGroups)
|
||||
: KMenu(parentWidget),
|
||||
d(new KonqPopupMenuPrivate(this, actions, parentWidget))
|
||||
{
|
||||
|
@ -141,7 +140,7 @@ KonqPopupMenu::KonqPopupMenu(const KFileItemList &items,
|
|||
d->m_bookmarkManager = mgr;
|
||||
d->m_popupItemProperties.setItems(items);
|
||||
d->m_menuActions.setParentWidget(parentWidget);
|
||||
d->init(kpf, flags);
|
||||
d->init(flags);
|
||||
|
||||
KAcceleratorManager::manage(this);
|
||||
}
|
||||
|
@ -153,7 +152,7 @@ void KonqPopupMenuPrivate::addNamedAction(const QString& name)
|
|||
q->addAction(act);
|
||||
}
|
||||
|
||||
void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtension::PopupFlags flags)
|
||||
void KonqPopupMenuPrivate::init(KonqPopupMenu::PopupFlags flags)
|
||||
{
|
||||
m_itemFlags = flags;
|
||||
q->setFont(KGlobalSettings::menuFont());
|
||||
|
@ -176,7 +175,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
|
||||
const bool isDirectory = m_popupItemProperties.isDirectory();
|
||||
const bool sReading = m_popupItemProperties.supportsReading();
|
||||
bool sDeleting = (m_itemFlags & KParts::BrowserExtension::NoDeletion) == 0
|
||||
bool sDeleting = (m_itemFlags & KonqPopupMenu::NoDeletion) == 0
|
||||
&& m_popupItemProperties.supportsDeleting();
|
||||
const bool sWriting = m_popupItemProperties.supportsWriting();
|
||||
const bool sMoving = sDeleting && m_popupItemProperties.supportsMoving();
|
||||
|
@ -221,7 +220,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
|
||||
const bool isIntoTrash = (url.protocol() == "trash") && !isCurrentTrash; // trashed file, not trash:/ itself
|
||||
|
||||
const bool bIsLink = (m_itemFlags & KParts::BrowserExtension::IsLink);
|
||||
const bool bIsLink = (m_itemFlags & KonqPopupMenu::IsLink);
|
||||
|
||||
//kDebug() << "isLocal=" << isLocal << " url=" << url << " isCurrentTrash=" << isCurrentTrash << " isIntoTrash=" << isIntoTrash << " bTrashIncluded=" << bTrashIncluded;
|
||||
|
||||
|
@ -236,7 +235,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
// Either 'newview' is in the actions we're given (probably in the tabhandling group)
|
||||
// or we need to insert it ourselves (e.g. for the desktop).
|
||||
// In the first case, actNewWindow must remain 0.
|
||||
if ( ((kpf & KonqPopupMenu::ShowNewWindow) != 0) && sReading )
|
||||
if ( (m_itemFlags & KonqPopupMenu::ShowNewWindow) && sReading )
|
||||
{
|
||||
const QString openStr = i18n("&Open");
|
||||
actNewWindow = new KAction(m_parentWidget /*for status tips*/);
|
||||
|
@ -248,7 +247,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
|
||||
if ( isDirectory && sWriting && !isCurrentTrash ) // A dir, and we can create things into it
|
||||
{
|
||||
const bool mkdirRequested = m_itemFlags & KParts::BrowserExtension::ShowCreateDirectory;
|
||||
const bool mkdirRequested = m_itemFlags & KonqPopupMenu::ShowCreateDirectory;
|
||||
if ( (currentDir || mkdirRequested) && m_pMenuNew ) // Current dir -> add the "new" menu
|
||||
{
|
||||
// As requested by KNewFileMenu :
|
||||
|
@ -278,13 +277,13 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
q->addAction(act);
|
||||
}
|
||||
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowNavigationItems)
|
||||
if (m_itemFlags & KonqPopupMenu::ShowNavigationItems)
|
||||
{
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowUp)
|
||||
if (m_itemFlags & KonqPopupMenu::ShowUp)
|
||||
addNamedAction( "go_up" );
|
||||
addNamedAction( "go_back" );
|
||||
addNamedAction( "go_forward" );
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowReload)
|
||||
if (m_itemFlags & KonqPopupMenu::ShowReload)
|
||||
addNamedAction( "reload" );
|
||||
q->addSeparator();
|
||||
}
|
||||
|
@ -306,7 +305,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
}
|
||||
addGroup( "tabhandling" ); // includes a separator at the end
|
||||
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowUrlOperations) {
|
||||
if (m_itemFlags & KonqPopupMenu::ShowUrlOperations) {
|
||||
if ( !currentDir && sReading ) {
|
||||
if ( sDeleting ) {
|
||||
addNamedAction( "cut" );
|
||||
|
@ -346,7 +345,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
// and by DolphinPart (rename, trash, delete)
|
||||
addGroup( "editactions" );
|
||||
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowTextSelectionItems) {
|
||||
if (m_itemFlags & KonqPopupMenu::ShowTextSelectionItems) {
|
||||
// OK, we have to stop here.
|
||||
|
||||
// Anything else that is provided by the part
|
||||
|
@ -354,7 +353,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !isCurrentTrash && !isIntoTrash && (m_itemFlags & KParts::BrowserExtension::ShowBookmark))
|
||||
if ( !isCurrentTrash && !isIntoTrash && (m_itemFlags & KonqPopupMenu::ShowBookmark))
|
||||
{
|
||||
QString caption;
|
||||
if (currentDir)
|
||||
|
@ -414,7 +413,7 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
KSharedConfig::Ptr dolphin = KSharedConfig::openConfig("dolphinrc");
|
||||
|
||||
// CopyTo/MoveTo menus
|
||||
if (m_itemFlags & KParts::BrowserExtension::ShowUrlOperations &&
|
||||
if (m_itemFlags & KonqPopupMenu::ShowUrlOperations &&
|
||||
KConfigGroup(dolphin, "General").readEntry("ShowCopyMoveMenu", false)) {
|
||||
|
||||
m_copyToMenu.setItems(lstItems);
|
||||
|
@ -424,11 +423,11 @@ void KonqPopupMenuPrivate::init(KonqPopupMenu::Flags kpf, KParts::BrowserExtensi
|
|||
}
|
||||
|
||||
if (!isCurrentTrash && !isIntoTrash && sReading &&
|
||||
(kpf & KonqPopupMenu::NoPlugins) == 0) {
|
||||
!(m_itemFlags & KonqPopupMenu::NoPlugins)) {
|
||||
addPlugins(); // now it's time to add plugins
|
||||
}
|
||||
|
||||
if ( (m_itemFlags & KParts::BrowserExtension::ShowProperties) && KPropertiesDialog::canDisplay( lstItems ) ) {
|
||||
if ( (m_itemFlags & KonqPopupMenu::ShowProperties) && KPropertiesDialog::canDisplay( lstItems ) ) {
|
||||
act = new KAction(m_parentWidget);
|
||||
m_ownActions.append(act);
|
||||
act->setObjectName( QLatin1String("properties" )); // for unittest
|
||||
|
|
|
@ -21,22 +21,17 @@
|
|||
#ifndef KONQPOPUPMENU_H
|
||||
#define KONQPOPUPMENU_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <konq_export.h>
|
||||
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#include <KMenu>
|
||||
#include <QMap>
|
||||
#include <kmenu.h>
|
||||
#include <kaction.h>
|
||||
#include <kactioncollection.h>
|
||||
#include <kfileitem.h>
|
||||
#include <kparts/browserextension.h>
|
||||
#include <kservice.h>
|
||||
|
||||
#include <konq_export.h>
|
||||
|
||||
class KNewFileMenu;
|
||||
class KFileItemActions;
|
||||
|
||||
class KBookmarkManager;
|
||||
class KonqPopupMenuPrivate;
|
||||
|
||||
|
@ -51,29 +46,47 @@ class KONQ_EXPORT KonqPopupMenu : public KMenu
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Flags set by the calling application
|
||||
*/
|
||||
enum PopupFlag {
|
||||
DefaultPopupItems = 0x0000, /**< default value, no additional menu item */
|
||||
ShowNavigationItems = 0x0001, /**< show "back" and "forward" (usually done when clicking the background of the view, but not an item) */
|
||||
ShowUp = 0x0002, /**< show "up" (same thing, but not over e.g. HTTP). Requires ShowNavigationItems. */
|
||||
ShowReload = 0x0004, /**< show "reload" (usually done when clicking the background of the view, but not an item) */
|
||||
ShowBookmark = 0x0008, /**< show "add to bookmarks" (usually not done on the local filesystem) */
|
||||
ShowCreateDirectory = 0x0010, /**< show "create directory" (usually only done on the background of the view, or
|
||||
* in hierarchical views like directory trees, where the new dir would be visible) */
|
||||
ShowTextSelectionItems=0x0020, /**< set when selecting text, for a popup that only contains text-related items. */
|
||||
NoDeletion=0x0040, /**< deletion, trashing and renaming not allowed (e.g. parent dir not writeable).
|
||||
* (this is only needed if the protocol itself supports deletion, unlike e.g. HTTP) */
|
||||
IsLink = 0x0080, /**< show "Bookmark This Link" and other link-related actions (linkactions merging group) */
|
||||
ShowUrlOperations = 0x0100, /**< show copy, paste, as well as cut if NoDeletion is not set. */
|
||||
ShowProperties = 0x200, /**< show "Properties" action (usually done by directory views) */
|
||||
ShowNewWindow = 0x400,
|
||||
NoPlugins = 0x800 /**< for the unittest*/
|
||||
};
|
||||
Q_DECLARE_FLAGS(PopupFlags, PopupFlag)
|
||||
|
||||
/**
|
||||
* Flags set by the calling application (e.g. konqueror), unlike
|
||||
* KParts::BrowserExtension::PopupFlags, which are set by the calling part
|
||||
* Associates a list of actions with a predefined name known by the host's popupmenu:
|
||||
* "editactions" for actions related text editing,
|
||||
* "linkactions" for actions related to hyperlinks,
|
||||
* "partactions" for any other actions provided by the part
|
||||
*/
|
||||
typedef uint Flags;
|
||||
enum { NoFlags = 0,
|
||||
ShowNewWindow = 1,
|
||||
NoPlugins = 2 /*for the unittest*/ };
|
||||
// WARNING: bitfield. Next item is 4
|
||||
typedef QMap<QString, QList<QAction*>> ActionGroupMap;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param manager the bookmark manager for the "add to bookmark" action
|
||||
* Only used if KParts::BrowserExtension::ShowBookmark is set
|
||||
* Only used if KonqPopupMenu::ShowBookmark is set
|
||||
* @param items the list of file items the popupmenu should be shown for
|
||||
* @param viewURL the URL shown in the view, to test for RMB click on view background
|
||||
* @param actions list of actions the caller wants to see in the menu
|
||||
* @param newMenu "New" menu, shared with the File menu, in konqueror
|
||||
* @param parentWidget the widget we're showing this popup for. Helps destroying
|
||||
* the popup if the widget is destroyed before the popup.
|
||||
* @param appFlags flags from the KonqPopupMenu::Flags enum, set by the calling application
|
||||
* @param partFlags flags from the BrowserExtension enum, set by the calling part
|
||||
* @param popupFlags flags from the KonqPopupMenu::PopupFlags enum, set by the calling application
|
||||
*
|
||||
* The actions to pass in include :
|
||||
* showmenubar, go_back, go_forward, go_up, cut, copy, paste, pasteto
|
||||
|
@ -85,12 +98,10 @@ public:
|
|||
const KUrl& viewURL,
|
||||
KActionCollection & actions,
|
||||
KNewFileMenu * newMenu,
|
||||
Flags appFlags,
|
||||
KParts::BrowserExtension::PopupFlags partFlags /*= KParts::BrowserExtension::DefaultPopupItems*/,
|
||||
PopupFlags popupFlags /*= NoFlags*/,
|
||||
QWidget *parentWidget,
|
||||
KBookmarkManager *manager = 0,
|
||||
const KParts::BrowserExtension::ActionGroupMap& actionGroups = KParts::BrowserExtension::ActionGroupMap()
|
||||
);
|
||||
const ActionGroupMap& actionGroups = ActionGroupMap());
|
||||
|
||||
/**
|
||||
* Don't forget to destroy the object
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
#define KONQ_POPUPMENUPLUGIN_H
|
||||
|
||||
#include "konq_export.h"
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include <QObject>
|
||||
#include <QMenu>
|
||||
|
||||
class KActionCollection;
|
||||
class KonqPopupMenuInformation;
|
||||
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#define KONQMIMEDATA_H
|
||||
|
||||
#include <konq_export.h>
|
||||
#include <kurl.h>
|
||||
|
||||
#include <QMimeData>
|
||||
#include <kurl.h>
|
||||
|
||||
/**
|
||||
* This class provides functions for creating and decoding clipboard/drag-n-drop data
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <assert.h>
|
||||
#include "qtest_kde.h"
|
||||
#include <QDir>
|
||||
#include <kparts/browserextension.h>
|
||||
#include <knewfilemenu.h>
|
||||
#include <kdebug.h>
|
||||
#include <kfileitemlistproperties.h>
|
||||
|
@ -34,7 +33,6 @@ QTEST_KDEMAIN(KonqPopupMenuTest, GUI)
|
|||
KonqPopupMenuTest::KonqPopupMenuTest()
|
||||
: m_actionCollection(this)
|
||||
{
|
||||
m_appFlags = KonqPopupMenu::NoPlugins;
|
||||
}
|
||||
|
||||
static QStringList extractActionNames(const QMenu& menu)
|
||||
|
@ -161,15 +159,17 @@ void KonqPopupMenuTest::testFile()
|
|||
KFileItemList itemList;
|
||||
itemList << m_fileItem;
|
||||
KUrl viewUrl = QDir::currentPath();
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowProperties
|
||||
| KParts::BrowserExtension::ShowReload
|
||||
| KParts::BrowserExtension::ShowUrlOperations;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
beflags |= KonqPopupMenu::ShowReload;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
actionGroups.insert("editactions", m_fileEditActions->actions());
|
||||
actionGroups.insert("preview", QList<QAction *>() << m_preview1);
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -205,17 +205,19 @@ void KonqPopupMenuTest::testFileInReadOnlyDirectory()
|
|||
QVERIFY(!capabilities.supportsMoving());
|
||||
|
||||
KUrl viewUrl("/etc");
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowProperties
|
||||
| KParts::BrowserExtension::ShowReload
|
||||
| KParts::BrowserExtension::ShowUrlOperations;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
beflags |= KonqPopupMenu::ShowReload;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
// DolphinPart doesn't add rename/trash when supportsMoving is false
|
||||
// Maybe we should test dolphinpart directly :)
|
||||
//actionGroups.insert("editactions", m_fileEditActions->actions());
|
||||
actionGroups.insert("preview", QList<QAction *>() << m_preview1);
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -239,15 +241,17 @@ void KonqPopupMenuTest::testFilePreviewSubMenu()
|
|||
KFileItemList itemList;
|
||||
itemList << m_fileItem;
|
||||
KUrl viewUrl = QDir::currentPath();
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowProperties
|
||||
| KParts::BrowserExtension::ShowReload
|
||||
| KParts::BrowserExtension::ShowUrlOperations;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
beflags |= KonqPopupMenu::ShowReload;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
actionGroups.insert("editactions", m_fileEditActions->actions());
|
||||
actionGroups.insert("preview", m_previewActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -271,14 +275,16 @@ void KonqPopupMenuTest::testSubDirectory()
|
|||
KFileItemList itemList;
|
||||
itemList << m_subDirItem;
|
||||
KUrl viewUrl = QDir::currentPath();
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowProperties
|
||||
| KParts::BrowserExtension::ShowUrlOperations;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
actionGroups.insert("editactions", m_fileEditActions->actions());
|
||||
actionGroups.insert("preview", m_previewActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
QStringList actions = extractActionNames(popup);
|
||||
actions.removeAll("services_submenu");
|
||||
|
@ -301,17 +307,19 @@ void KonqPopupMenuTest::testViewDirectory()
|
|||
KFileItemList itemList;
|
||||
itemList << m_thisDirectoryItem;
|
||||
KUrl viewUrl = m_thisDirectoryItem.url();
|
||||
KParts::BrowserExtension::PopupFlags beflags =
|
||||
KParts::BrowserExtension::ShowNavigationItems |
|
||||
KParts::BrowserExtension::ShowUp |
|
||||
KParts::BrowserExtension::ShowCreateDirectory |
|
||||
KParts::BrowserExtension::ShowUrlOperations |
|
||||
KParts::BrowserExtension::ShowProperties;
|
||||
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowNavigationItems;
|
||||
beflags |= KonqPopupMenu::ShowUp;
|
||||
beflags |= KonqPopupMenu::ShowCreateDirectory;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
|
||||
// KonqMainWindow says: doTabHandling = !openedForViewURL && ... So we don't add tabhandling here
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("preview", m_previewActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -343,17 +351,19 @@ void KonqPopupMenuTest::testViewReadOnlyDirectory()
|
|||
KFileItemList itemList;
|
||||
itemList << rootItem;
|
||||
KUrl viewUrl = rootItem.url();
|
||||
KParts::BrowserExtension::PopupFlags beflags =
|
||||
KParts::BrowserExtension::ShowNavigationItems |
|
||||
KParts::BrowserExtension::ShowUp |
|
||||
KParts::BrowserExtension::ShowCreateDirectory |
|
||||
KParts::BrowserExtension::ShowUrlOperations |
|
||||
KParts::BrowserExtension::ShowProperties;
|
||||
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowNavigationItems;
|
||||
beflags |= KonqPopupMenu::ShowUp;
|
||||
beflags |= KonqPopupMenu::ShowCreateDirectory;
|
||||
beflags |= KonqPopupMenu::ShowUrlOperations;
|
||||
beflags |= KonqPopupMenu::ShowProperties;
|
||||
|
||||
// KonqMainWindow says: doTabHandling = !openedForViewURL && ... So we don't add tabhandling here
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("preview", m_previewActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, 0 /*bookmark manager*/, actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -378,17 +388,20 @@ void KonqPopupMenuTest::testHtmlLink()
|
|||
itemList << m_linkItem;
|
||||
//KUrl viewUrl = m_fileItem.url();
|
||||
KUrl viewUrl("http://www.kde.org");
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowBookmark
|
||||
| KParts::BrowserExtension::ShowReload
|
||||
| KParts::BrowserExtension::IsLink;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowBookmark;
|
||||
beflags |= KonqPopupMenu::ShowReload;
|
||||
beflags |= KonqPopupMenu::IsLink;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
actionGroups.insert("preview", m_previewActions->actions());
|
||||
actionGroups.insert("editactions", m_htmlEditActions->actions());
|
||||
actionGroups.insert("linkactions", m_linkActions->actions());
|
||||
actionGroups.insert("partactions", m_partActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, KBookmarkManager::userBookmarksManager(), actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
@ -410,10 +423,13 @@ void KonqPopupMenuTest::testHtmlPage()
|
|||
KFileItemList itemList;
|
||||
itemList << m_linkItem;
|
||||
KUrl viewUrl = m_linkItem.url();
|
||||
KParts::BrowserExtension::PopupFlags beflags = KParts::BrowserExtension::ShowBookmark
|
||||
| KParts::BrowserExtension::ShowReload
|
||||
| KParts::BrowserExtension::ShowNavigationItems;
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
|
||||
KonqPopupMenu::PopupFlags beflags = KonqPopupMenu::NoPlugins;
|
||||
beflags |= KonqPopupMenu::ShowBookmark;
|
||||
beflags |= KonqPopupMenu::ShowReload;
|
||||
beflags |= KonqPopupMenu::ShowNavigationItems;
|
||||
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
// KonqMainWindow says: doTabHandling = !openedForViewURL && ... So we don't add tabhandling here
|
||||
// TODO we could just move that logic to KonqPopupMenu...
|
||||
//actionGroups.insert("tabhandling", m_tabHandlingActions->actions());
|
||||
|
@ -426,7 +442,7 @@ void KonqPopupMenuTest::testHtmlPage()
|
|||
m_actionCollection.addAction("setEncoding", setEncoding);
|
||||
actionGroups.insert("partactions", m_partActions->actions());
|
||||
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, m_appFlags, beflags,
|
||||
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, m_newMenu, beflags,
|
||||
0 /*parent*/, KBookmarkManager::userBookmarksManager(), actionGroups);
|
||||
|
||||
QStringList actions = extractActionNames(popup);
|
||||
|
|
|
@ -45,8 +45,6 @@ private slots:
|
|||
void testHtmlPage();
|
||||
|
||||
private:
|
||||
KonqPopupMenu::Flags m_appFlags;
|
||||
|
||||
KFileItem m_fileItem;
|
||||
KFileItem m_linkItem;
|
||||
KFileItem m_subDirItem;
|
||||
|
|
|
@ -2159,15 +2159,16 @@ void FolderView::showContextMenu(QWidget *widget, const QPoint &pos, const QMode
|
|||
editActions.append(m_actionCollection.action("del"));
|
||||
}
|
||||
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("editactions", editActions);
|
||||
|
||||
KParts::BrowserExtension::PopupFlags flags = KParts::BrowserExtension::ShowProperties;
|
||||
flags |= KParts::BrowserExtension::ShowUrlOperations;
|
||||
KonqPopupMenu::PopupFlags flags = KonqPopupMenu::ShowNewWindow;
|
||||
flags |= KonqPopupMenu::ShowProperties;
|
||||
flags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
// m_newMenu can be NULL here but KonqPopupMenu does handle this.
|
||||
KonqPopupMenu *contextMenu = new KonqPopupMenu(items, m_url, m_actionCollection, m_newMenu,
|
||||
KonqPopupMenu::ShowNewWindow, flags, widget,
|
||||
flags, widget,
|
||||
KBookmarkManager::userBookmarksManager(),
|
||||
actionGroups);
|
||||
|
||||
|
|
|
@ -367,15 +367,16 @@ void PopupView::showContextMenu(QWidget *widget, const QPoint &screenPos, const
|
|||
editActions.append(m_actionCollection.action("del"));
|
||||
}
|
||||
|
||||
KParts::BrowserExtension::ActionGroupMap actionGroups;
|
||||
KonqPopupMenu::ActionGroupMap actionGroups;
|
||||
actionGroups.insert("editactions", editActions);
|
||||
|
||||
KParts::BrowserExtension::PopupFlags flags = KParts::BrowserExtension::ShowProperties;
|
||||
flags |= KParts::BrowserExtension::ShowUrlOperations;
|
||||
KonqPopupMenu::PopupFlags flags = KonqPopupMenu::ShowProperties;
|
||||
flags |= KonqPopupMenu::ShowNewWindow;
|
||||
flags |= KonqPopupMenu::ShowUrlOperations;
|
||||
|
||||
// m_newMenu can be NULL here but KonqPopupMenu does handle this.
|
||||
KonqPopupMenu *contextMenu = new KonqPopupMenu(items, m_url, m_actionCollection, m_newMenu,
|
||||
KonqPopupMenu::ShowNewWindow, flags,
|
||||
flags,
|
||||
QApplication::desktop(),
|
||||
KBookmarkManager::userBookmarksManager(),
|
||||
actionGroups);
|
||||
|
|
Loading…
Add table
Reference in a new issue