Commit c8b1efd0 authored by Michael Abrahams's avatar Michael Abrahams
Browse files

Rename weird "Factory_ID and FactoryId" uses (NOTE)

Summary:
Fixes like "ArtisticTextToolFactoryID" -> "ArtisticTextTool"
Making sure every tool has a sensible name for the .actions files

This means several files in share/krita/actions have been renamed.
Please clean out this folder after applying the patch.

Reviewers: rempt

Differential Revision: https://phabricator.kde.org/D477
parent 53d89752
<?xml version="1.0" encoding="UTF-8"?>
<Actions version="2" name="ArtisticTextToolFactoryID">
<Actions version="2" name="ArtisticTextTool">
<Action name="artistictext_subscript">
<iconText>Subscript</iconText>
<shortcut></shortcut>
......
install( FILES
ArtisticTextToolFactoryID.action
ArtisticTextTool.action
InteractionTool.action
PathToolFactoryId.action
TextToolFactory_ID.action
PathTool.action
TextTool.action
DESTINATION ${DATA_INSTALL_DIR}/krita/actions)
<?xml version="1.0" encoding="UTF-8"?>
<Actions version="2" name="PathToolFactoryId">
<Actions version="2" name="PathTool">
<Action name="convert-to-path">
<iconText>To Path</iconText>
<shortcut>P</shortcut>
......
......@@ -3036,7 +3036,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="ReferencesToolFactory_ID">
<Action name="ReferencesTool">
<icon></icon>
<text>References</text>
<whatsThis></whatsThis>
......@@ -3091,7 +3091,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="TextToolFactory_ID">
<Action name="TextTool">
<icon></icon>
<text>Text editing</text>
<whatsThis></whatsThis>
......@@ -3113,7 +3113,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="ArtisticTextToolFactoryID">
<Action name="ArtisticTextTool">
<icon></icon>
<text>Artistic text editing</text>
<whatsThis></whatsThis>
......@@ -3256,7 +3256,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="ReviewToolFactory_ID">
<Action name="ReviewTool">
<icon></icon>
<text>Review</text>
<whatsThis></whatsThis>
......@@ -3333,7 +3333,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="VectorToolFactoryId">
<Action name="VectorTool">
<icon></icon>
<text>Vector Image (EMF/WMF/SVM/SVG) tool</text>
<whatsThis></whatsThis>
......@@ -3355,7 +3355,7 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="PathToolFactoryId">
<Action name="PathTool">
<icon></icon>
<text>Path editing</text>
<whatsThis></whatsThis>
......
......@@ -117,7 +117,7 @@ void KisCanvasWidgetBase::drawDecorations(QPainter & gc, const QRect &updateWidg
// Draw text shape over canvas while editing it, that's needs to show the text selection correctly
QString toolId = KoToolManager::instance()->activeToolId();
if (toolId == "ArtisticTextToolFactoryID" || toolId == "TextToolFactory_ID") {
if (toolId == "ArtisticTextTool" || toolId == "TextTool") {
gc.save();
gc.setPen(Qt::NoPen);
gc.setBrush(Qt::NoBrush);
......
......@@ -456,7 +456,7 @@ QTouchEvent *KisInputManager::lastTouchEvent() const
void KisInputManager::slotToolChanged()
{
QString toolId = KoToolManager::instance()->activeToolId();
if (toolId == "ArtisticTextToolFactoryID" || toolId == "TextToolFactory_ID") {
if (toolId == "ArtisticTextTool" || toolId == "TextTool") {
d->forwardAllEventsToTool = true;
d->matcher.suppressAllActions(true);
} else {
......
......@@ -572,7 +572,7 @@ void KisNodeManager::slotUiActivatedNode(KisNodeSP node)
<< "KarbonGradientTool"
<< "KarbonCalligraphyTool"
<< "CreateShapesTool"
<< "PathToolFactoryId";
<< "PathTool";
QStringList pixelTools = QStringList()
<< "KritaShape/KisToolBrush"
......
......@@ -25,7 +25,7 @@
#include <klocalizedstring.h>
KoPathToolFactory::KoPathToolFactory()
: KoToolFactoryBase("PathToolFactoryId")
: KoToolFactoryBase("PathTool")
{
setToolTip(i18n("Path editing"));
setToolType(dynamicToolType());
......
......@@ -25,7 +25,7 @@
#include <klocalizedstring.h>
KoZoomToolFactory::KoZoomToolFactory()
: KoToolFactoryBase("KoZoomToolId")
: KoToolFactoryBase("ZoomTool")
{
setToolTip(i18n("Zoom"));
setToolType(navigationToolType());
......
......@@ -1330,7 +1330,7 @@ bool KoRuler::removeHotSpot(int id)
void KoRuler::createGuideToolConnection(KoCanvasBase *canvas)
{
Q_ASSERT(canvas);
KoToolBase *tool = KoToolManager::instance()->toolById(canvas, QLatin1String("GuidesTool_ID"));
KoToolBase *tool = KoToolManager::instance()->toolById(canvas, QLatin1String("GuidesTool"));
if (!tool) return; // It's perfectly fine to have no guides tool, we don't have to warn the user about it
connect(this, SIGNAL(guideLineCreated(Qt::Orientation,qreal)),
tool, SLOT(createGuideLine(Qt::Orientation,qreal)));
......
......@@ -25,7 +25,7 @@
#include <klocalizedstring.h>
ArtisticTextToolFactory::ArtisticTextToolFactory()
: KoToolFactoryBase("ArtisticTextToolFactoryID")
: KoToolFactoryBase("ArtisticTextTool")
{
setToolTip( i18n("Artistic text editing") );
setToolType( dynamicToolType() );
......
......@@ -548,7 +548,7 @@ void DefaultTool::mouseMoveEvent(KoPointerEvent *event)
m_mouseWasInsideHandles = false;
if (m_guideLine->isSelected()) {
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId));
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID));
if (guidesTool) {
guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index());
activateTemporary(guidesTool->toolId());
......@@ -559,7 +559,7 @@ void DefaultTool::mouseMoveEvent(KoPointerEvent *event)
}
} else {
if (m_guideLine->isSelected()) {
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId));
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID));
if (guidesTool) {
guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index());
activateTemporary(guidesTool->toolId());
......@@ -641,7 +641,7 @@ void DefaultTool::mouseDoubleClickEvent(KoPointerEvent *event)
if (shape) {
shapes.append(shape);
} else if (m_guideLine->isSelected()) {
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId));
GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID));
if (guidesTool) {
guidesTool->editGuideLine(m_guideLine->orientation(), m_guideLine->index());
activateTool(guidesTool->toolId());
......
......@@ -240,7 +240,7 @@ void GuidesTool::createGuideLine(Qt::Orientation orientation, qreal position)
m_position = position;
m_mode = AddGuide;
KoToolManager::instance()->switchToolRequested(GuidesToolId);
KoToolManager::instance()->switchToolRequested(GuidesTool_ID);
// grab the mouse so we get mouse events as the dragging started on a ruler
canvas()->canvasWidget()->grabMouse();
......
......@@ -22,7 +22,7 @@
#include <klocalizedstring.h>
GuidesToolFactory::GuidesToolFactory()
: KoToolFactoryBase(GuidesToolId)
: KoToolFactoryBase(GuidesTool_ID)
{
setToolTip(i18n("Edit guidelines"));
setToolType("never");
......
......@@ -23,7 +23,7 @@
#include <KoToolFactoryBase.h>
// Warn; used in KoRuler.cpp too, keep in sync.
#define GuidesToolId "GuidesTool_ID"
#define GuidesTool_ID "GuidesTool"
/// The factory for the KoGuidesTool
class GuidesToolFactory : public KoToolFactoryBase
......
......@@ -27,7 +27,7 @@
#include <klocalizedstring.h>
ReferencesToolFactory::ReferencesToolFactory()
: KoToolFactoryBase("ReferencesToolFactory_ID")
: KoToolFactoryBase("ReferencesTool")
{
setToolTip(i18n("References"));
setToolType("calligrawords,calligraauthor");
......
......@@ -32,7 +32,7 @@
#include <QDebug>
ReviewToolFactory::ReviewToolFactory()
: KoToolFactoryBase("ReviewToolFactory_ID")
: KoToolFactoryBase("ReviewTool")
{
setToolTip(i18n("Review"));
setToolType(dynamicToolType()+",calligrawords,calligraauthor");
......
......@@ -26,7 +26,7 @@
#include <klocalizedstring.h>
TextToolFactory::TextToolFactory()
: KoToolFactoryBase("TextToolFactory_ID")
: KoToolFactoryBase("TextTool")
{
setToolTip(i18n("Text editing"));
setToolType(dynamicToolType()+",calligrawords,calligraauthor");
......
......@@ -28,7 +28,7 @@
VectorToolFactory::VectorToolFactory()
: KoToolFactoryBase("VectorToolFactoryId")
: KoToolFactoryBase("VectorTool")
{
setToolTip(i18n("Vector Image (EMF/WMF/SVM/SVG) tool"));
setIconName(koIconNameCStrNeededWithSubs("a generic vector image icon", "x-shape-vectorimage", "application-x-wmf"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment