Commit 1f8f8907 authored by Marco Martin's avatar Marco Martin

close and home buttons fixed

parent 08601943
......@@ -24,12 +24,22 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0
Item {
Rectangle {
anchors.fill: parent
//TODO: decide what color we want applets
color: theme.backgroundColor
width: 600
height: 40
property Item toolBox
PlasmaComponents.ToolButton {
anchors.horizontalCenter: parent.horizontalCenter
iconSource: "go-home"
onClicked: plasmoid.nativeInterface.executeScript("showdesktop");
}
PlasmaComponents.ToolButton {
anchors.right: parent.right
iconSource: "window-close"
......
......@@ -41,10 +41,10 @@ TaskPanel::~TaskPanel()
void TaskPanel::executeScript(const QString &script)
{
//Plasma::Package p =
package().filePath("scripts", script + ".js");
qWarning()<<"AAAAAA"<<package().filePath("scripts", script + ".js")<<package().path();
QDBusMessage message = QDBusMessage::createMethodCall(s_kwinService, "/Scripting", QString(), "loadScript");
QList<QVariant> arguments;
arguments << QVariant("/opt/kde5qt5/share/plasma/plasmoids/org.kde.phone.taskpanel/code/close.js");
arguments << QVariant(package().filePath("scripts", script + ".js"));
message.setArguments(arguments);
QDBusMessage reply = QDBusConnection::sessionBus().call(message);
if (reply.type() == QDBusMessage::ErrorMessage) {
......
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