Commit 3bdf6be7 authored by Laurent Montel's avatar Laurent Montel 😁

improve externalscript support

parent 0102f11b
......@@ -43,7 +43,6 @@ ViewerPluginExternalscriptInterface::~ViewerPluginExternalscriptInterface()
void ViewerPluginExternalscriptInterface::setMessage(const KMime::Message::Ptr &msg)
{
mMessage = msg;
//TODO
}
QList<QAction *> ViewerPluginExternalscriptInterface::actions() const
......@@ -93,12 +92,11 @@ void ViewerPluginExternalscriptInterface::createAction(KActionCollection *ac)
}
ac->addAction(QStringLiteral("externalscript_%1").arg(info.name()), act);
QStringList actionInfo;
//TODO adapt command line
actionInfo.append(info.commandLine());
const QString newCommandLine = adaptArguments(info.commandLine());
actionInfo.append(newCommandLine);
actionInfo.append(info.executable());
act->setData(actionInfo);
//TODO add info.
mAction.append(act);
grp->addAction(act);
}
......@@ -114,6 +112,8 @@ void ViewerPluginExternalscriptInterface::slotScriptActivated(QAction *act)
QString ViewerPluginExternalscriptInterface::adaptArguments(const QString &scriptArguments)
{
//TODO
//TODO %s => subject
// %cc => cc
// etc. Look at parsing in kmkernel.
return {};
}
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