From ca3fd6f06c87a6294590408f853eec06f058454b Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Fri, 8 Apr 2011 18:13:20 +0200 Subject: [PATCH 01/82] Merge Data management service into nepomuk/datamanagement From 89c468c7a472929a8672c8935157e912ff8fa0ac Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 21 Apr 2011 16:57:57 +0200 Subject: [PATCH 02/82] remove what can't still be merged --- declarativeimports/CMakeLists.txt | 1 - .../plasmacomponents/BusyWidget.qml | 65 ----------- .../plasmacomponents/FlashingLabel.qml | 76 ------------- declarativeimports/plasmacomponents/Frame.qml | 47 -------- .../plasmacomponents/IconWidget.qml | 97 ---------------- .../plasmacomponents/PushButton.qml | 95 ---------------- .../plasmacomponents/ScrollBar.qml | 107 ------------------ .../plasmacomponents/ToolButton.qml | 79 ------------- declarativeimports/plasmacomponents/qmldir | 7 -- declarativeimports/test/CMakeLists.txt | 29 ----- declarativeimports/test/gallery.qml | 79 ------------- declarativeimports/test/test.cpp | 55 --------- declarativeimports/test/testobject_p.h | 49 -------- 13 files changed, 786 deletions(-) delete mode 100644 declarativeimports/plasmacomponents/BusyWidget.qml delete mode 100644 declarativeimports/plasmacomponents/FlashingLabel.qml delete mode 100644 declarativeimports/plasmacomponents/Frame.qml delete mode 100644 declarativeimports/plasmacomponents/IconWidget.qml delete mode 100644 declarativeimports/plasmacomponents/PushButton.qml delete mode 100644 declarativeimports/plasmacomponents/ScrollBar.qml delete mode 100644 declarativeimports/plasmacomponents/ToolButton.qml delete mode 100644 declarativeimports/plasmacomponents/qmldir delete mode 100644 declarativeimports/test/CMakeLists.txt delete mode 100644 declarativeimports/test/gallery.qml delete mode 100644 declarativeimports/test/test.cpp delete mode 100644 declarativeimports/test/testobject_p.h diff --git a/declarativeimports/CMakeLists.txt b/declarativeimports/CMakeLists.txt index 5e2e20e2e..45b732160 100644 --- a/declarativeimports/CMakeLists.txt +++ b/declarativeimports/CMakeLists.txt @@ -3,4 +3,3 @@ add_subdirectory(graphicslayouts) add_subdirectory(graphicswidgets) add_subdirectory(qtextracomponents) -install(DIRECTORY plasmacomponents/ DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/components) \ No newline at end of file diff --git a/declarativeimports/plasmacomponents/BusyWidget.qml b/declarativeimports/plasmacomponents/BusyWidget.qml deleted file mode 100644 index 3e076dba9..000000000 --- a/declarativeimports/plasmacomponents/BusyWidget.qml +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Copyright (C) 2010 by Artur Duque de Souza -* -* This program 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, or -* (at your option) any later version. -* -* This program 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 General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - id: root - width: 100; height: 100 - - property bool running: true - property string label: "" - - PlasmaCore.Theme { - id: theme - } - - PlasmaCore.SvgItem { - id: widget - width: root.width - height: root.height - anchors.horizontalCenter: root.horizontalCenter - smooth: true - svg: PlasmaCore.Svg { imagePath: ("widgets/busywidget") } - - RotationAnimation on rotation { - from: 0 - to: 360 - target: widget - duration: 1500 - running: root.running - loops: Animation.Infinite - } - - // if you need to do anything while repainting - // do it inside this slot - function update() { - } - } - - Text { - id: label - text: root.label - color: theme.textColor - anchors.verticalCenter: root.verticalCenter - anchors.horizontalCenter: root.horizontalCenter - } - -} diff --git a/declarativeimports/plasmacomponents/FlashingLabel.qml b/declarativeimports/plasmacomponents/FlashingLabel.qml deleted file mode 100644 index 47e7f4446..000000000 --- a/declarativeimports/plasmacomponents/FlashingLabel.qml +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2010 by Anselmo Lacerda Silveira de Melo - * - * This program 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, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - id: root - width: 200 - height: 100 - - //API - property bool autohide: false - //### get font from theme when available - //### deal with QFont stuff in a proper way - property string font: "Arial" - property string color: theme.textColor - property int duration: 3000 - - /*### actually the FlashingLabel in C++ doesn't have - this as part of its API, either text or pixmap is - set only when flash is called.*/ - property string text: "" - - //### - PlasmaCore.Theme { - id: theme - } - - Text { - id: label - text: root.text - color: root.color - font.family: root.font - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - anchors.verticalCenter: root.verticalCenter - anchors.horizontalCenter: root.horizontalCenter - } - - PropertyAnimation { - id: fade - target: label; - property: "opacity"; - duration: root.duration; - to: 0 - } - - function flash(text, duration, alignment) { - if (text) - root.text = text - if (duration) - root.duration = duration - if (alignment) - label.horizontalAlignment = alignment - fade.start() - } - - //###TODO: flash pixmap -} diff --git a/declarativeimports/plasmacomponents/Frame.qml b/declarativeimports/plasmacomponents/Frame.qml deleted file mode 100644 index c33558115..000000000 --- a/declarativeimports/plasmacomponents/Frame.qml +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2010 Marco Martin - * - * This program 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, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -PlasmaCore.FrameSvgItem { - id : background - imagePath: "widgets/frame" - prefix: "plain" - - width: childrenRect.width - height: childrenRect.height - - property alias padding: paddingRectangle; - signal clicked; - - Item { - id: paddingRectangle - anchors.fill: parent - anchors.leftMargin: background.margins.left - anchors.topMargin: background.margins.top - anchors.rightMargin: background.margins.right - anchors.bottomMargin: background.margins.bottom - } - - MouseArea { - id: itemMouse - anchors.fill: background - onClicked: background.clicked() - } -} diff --git a/declarativeimports/plasmacomponents/IconWidget.qml b/declarativeimports/plasmacomponents/IconWidget.qml deleted file mode 100644 index ca26ad1de..000000000 --- a/declarativeimports/plasmacomponents/IconWidget.qml +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Copyright (C) 2010 by Artur Duque de Souza -* -* This program 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, or -* (at your option) any later version. -* -* This program 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 General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - id: root - width: 100; height: 100 - - property string text: "" - property string infoText: "" - - property string svg: "" - property string icon: "" - - property bool drawBackground: true - property int numDisplayLines: 1 - //property QColor textBackgroundColor: "" - - signal pressed(bool down) - signal clicked() - signal doubleClicked() - signal activated() - signal changed() - - PlasmaCore.Theme { - id: theme - } - - PlasmaCore.FrameSvgItem { - id: background - visible: root.drawBackground - anchors.fill: root - - imagePath: "widgets/viewitem" - prefix: mainMouseArea.pressed == true ? "selected" : "hover" - } - - - PlasmaCore.SvgItem { - id: svg - visible: root.svg != "" - width: root.width - label.height - height: root.height - label.height - anchors.horizontalCenter: root.horizontalCenter - svg: PlasmaCore.Svg { imagePath: root.svg } - - // if you need to do anything while repainting - // do it inside this slot - function update() { - } - } - - Image { - id: icon - visible: root.icon != "" - width: root.width - label.height - height: root.height - label.height - } - - Text { - id: label - text: root.text - color: theme.textColor - anchors.top: icon.bottom - anchors.horizontalCenter: root.horizontalCenter - } - - MouseArea { - id: mainMouseArea - hoverEnabled: true - anchors.fill: parent - - onEntered: { - } - - onExited: { - } - } -} diff --git a/declarativeimports/plasmacomponents/PushButton.qml b/declarativeimports/plasmacomponents/PushButton.qml deleted file mode 100644 index 2452faf4a..000000000 --- a/declarativeimports/plasmacomponents/PushButton.qml +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Copyright (C) 2010 by Marco Martin -* -* This program 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, or -* (at your option) any later version. -* -* This program 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 General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - width: 50 - height:20 - - property string text - signal clicked - - id: button - PlasmaCore.FrameSvgItem { - id: hover - anchors.fill: parent - opacity: 0 - anchors.leftMargin: -margins.left - anchors.topMargin: -margins.top - anchors.rightMargin: -margins.right - anchors.bottomMargin: -margins.bottom - imagePath: "widgets/button" - prefix: "hover" - Behavior on opacity { - PropertyAnimation { duration: 250 } - } - } - PlasmaCore.FrameSvgItem { - id: shadow - anchors.fill: parent - anchors.leftMargin: -margins.left - anchors.topMargin: -margins.top - anchors.rightMargin: -margins.right - anchors.bottomMargin: -margins.bottom - imagePath: "widgets/button" - prefix: "shadow" - Behavior on opacity { - PropertyAnimation { duration: 250 } - } - } - - PlasmaCore.FrameSvgItem { - id: surface - anchors.fill: parent - imagePath: "widgets/button" - prefix: "normal" - } - - Text { - text: button.text - anchors.fill: parent - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - - onPressed: { - surface.prefix = "pressed" - } - onReleased: { - surface.prefix = "normal" - button.clicked() - } - onEntered: { - shadow.opacity = 0 - hover.opacity = 1 - } - onExited: { - shadow.opacity = 1 - hover.opacity = 0 - } - } - -} - diff --git a/declarativeimports/plasmacomponents/ScrollBar.qml b/declarativeimports/plasmacomponents/ScrollBar.qml deleted file mode 100644 index 16084d8b4..000000000 --- a/declarativeimports/plasmacomponents/ScrollBar.qml +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright (C) 2010 by Marco Martin -* -* This program 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, or -* (at your option) any later version. -* -* This program 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 General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - - -PlasmaCore.FrameSvgItem { - id: scrollBar - width: orientation==Qt.Horizontal?200:22 - height: orientation==Qt.Horizontal?22:200 - - property int minimum: 0 - property int maximum: 100 - property int value: 0 - property string orientation: Qt.Horizontal - - onValueChanged: { - if (drag.state != "dragging") { - if (orientation == Qt.Horizontal) { - drag.x = (value/(maximum-minimum))*(scrollBar.width - drag.width) - } else { - drag.y = (value/(maximum-minimum))*(scrollBar.height - drag.height) - } - } - } - - imagePath: "widgets/scrollbar" - prefix: orientation==Qt.Horizontal?"background-horizontal":"background-vertical" - - PlasmaCore.FrameSvgItem { - id: drag - anchors.top: orientation==Qt.Horizontal?parent.top:null - anchors.bottom: orientation==Qt.Horizontal?parent.bottom:null - anchors.left: orientation==Qt.Horizontal?null:parent.left - anchors.right: orientation==Qt.Horizontal?null:parent.right - state: "normal" - width: (orientation == Qt.Horizontal)?Math.max(12, (parent.width*1/(scrollBar.maximum-scrollBar.minimum))):0 - height: (orientation != Qt.Horizontal)?Math.max(12, (parent.height*1/(scrollBar.maximum-scrollBar.minimum))):0 - x: 0 - y: 0 - onXChanged: { - if (orientation == Qt.Horizontal && state == "dragging") { - value = (maximum - minimum)*(x/(scrollBar.width-width)) - } - } - onYChanged: { - if (orientation != Qt.Horizontal && state == "dragging") { - value = (maximum - minimum)*(x/(scrollBar.height-height)) - } - } - - Behavior on x { - NumberAnimation { - duration: 200 - } - } - Behavior on y { - NumberAnimation { - duration: 200 - } - } - - imagePath: "widgets/scrollbar" - prefix: "slider" - MouseArea { - anchors.fill: parent - hoverEnabled: true - - drag.target: parent; - drag.axis: orientation == Qt.Horizontal?"XAxis":"YAxis" - drag.minimumX: 0; - drag.maximumX: scrollBar.width-drag.width; - drag.minimumY: 0; - drag.maximumY: scrollBar.height-drag.height; - - onEntered: drag.prefix = "mouseover-slider" - onExited: drag.prefix = "slider" - onPressed: { - drag.prefix = "sunken-slider" - drag.state = "dragging" - } - onReleased: { - containsMouse?drag.prefix = "mouseover-slider":drag.prefix = "slider" - drag.state = "normal" - } - } - } -} - - diff --git a/declarativeimports/plasmacomponents/ToolButton.qml b/declarativeimports/plasmacomponents/ToolButton.qml deleted file mode 100644 index 86e51ec8c..000000000 --- a/declarativeimports/plasmacomponents/ToolButton.qml +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright (C) 2010 by Marco Martin -* -* This program 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, or -* (at your option) any later version. -* -* This program 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 General Public License for more details -* -* You should have received a copy of the GNU Library General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -import Qt 4.7 -import org.kde.plasma.core 0.1 as PlasmaCore - -Item { - width: 50 - height:20 - - property string text - property bool down: false - signal clicked - - id: button - - PlasmaCore.FrameSvgItem { - id: surface - anchors.fill: parent - imagePath: "widgets/button" - prefix: down?"pressed":"normal" - opacity: down?1:0 - Behavior on opacity { - PropertyAnimation { duration: 250 } - } - } - - Text { - text: button.text - anchors.fill: parent - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - - onPressed: { - if (!down) { - surface.prefix = "pressed" - } - } - onReleased: { - if (!down) { - surface.prefix = "normal" - } - button.clicked() - } - onEntered: { - if (!down) { - surface.opacity = 1 - } - } - onExited: { - if (!down) { - surface.opacity = 0 - } - } - } - -} - diff --git a/declarativeimports/plasmacomponents/qmldir b/declarativeimports/plasmacomponents/qmldir deleted file mode 100644 index f2d175092..000000000 --- a/declarativeimports/plasmacomponents/qmldir +++ /dev/null @@ -1,7 +0,0 @@ -BusyWidget 0.1 BusyWidget.qml -FlashingLabel 0.1 FlashingLabel.qml -Frame 0.1 Frame.qml -IconWidget 0.1 IconWidget.qml -PushButton 0.1 PushButton.qml -ScrollBar 0.1 ScrollBar.qml -ToolButton 0.1 ToolButton.qml diff --git a/declarativeimports/test/CMakeLists.txt b/declarativeimports/test/CMakeLists.txt deleted file mode 100644 index 7925e2d59..000000000 --- a/declarativeimports/test/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -project(components_test) - -find_package(KDE4 REQUIRED) - -include(KDE4Defaults) - -add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) - -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${KDE4_INCLUDES} - ) - - -set(components_test_TEST_SRCS - test.cpp) - -kde4_add_executable(components_test ${components_test_TEST_SRCS}) - -target_link_libraries(components_test kdeclarative ${KDE4_KDECORE_LIBS} ${QT_QTDECLARATIVE_LIBRARY}) - -## install - - -install(TARGETS components_test EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) - - -install(FILES "gallery.qml" DESTINATION ${CMAKE_BINARY_DIR}/widgets/components) \ No newline at end of file diff --git a/declarativeimports/test/gallery.qml b/declarativeimports/test/gallery.qml deleted file mode 100644 index 19b524b53..000000000 --- a/declarativeimports/test/gallery.qml +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 by Anselmo Lacerda Silveira de Melo - * - * This program 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, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -import Qt 4.7 -import org.kde.plasma.components 0.1 as PlasmaComponents -import org.kde.plasma.core 0.1 as PlasmaCore -import org.kde.qtextracomponents 0.1 as QtExtraComponents - -Rectangle { - id: test - width: 400 - height: 500 - color: "tomato" - - Column { - x: 10 - anchors.fill: parent - spacing: 5 - - PlasmaComponents.FlashingLabel { - id: label - font: "Times" - } - - Row { - id: busyRow - - Repeater { - model: 8 - PlasmaComponents.BusyWidget { - width: 50 - height: 50 - } - } - } - - PlasmaComponents.PushButton { - text: "Ok" - onClicked: {print("Clicked!"); scrollBar.value=35} - } - PlasmaComponents.ScrollBar { - id: scrollBar - } - PlasmaComponents.ScrollBar { - id: scrollBarV - orientation: Qt.Vertical - } - QtExtraComponents.QPixmapItem { - width:200 - height:100 - id: pixmapTest - } - } - - PlasmaCore.Svg { - id: svgTest - imagePath: "widgets/clock" - } - Component.onCompleted: { - label.flash("I am a FlashingLabel!!!"); - pixmapTest.pixmap = svgTest.pixmap(); - } -} diff --git a/declarativeimports/test/test.cpp b/declarativeimports/test/test.cpp deleted file mode 100644 index 792f4144a..000000000 --- a/declarativeimports/test/test.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2011 Marco Martin - * - * This program 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, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include - -#include - - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QDeclarativeView view; - QDeclarativeContext *context = view.rootContext(); - context->setContextProperty("backgroundColor", - QColor(Qt::yellow)); - - KDeclarative kdeclarative; - kdeclarative.setDeclarativeEngine(view.engine()); - kdeclarative.initialize(); - //binds things like kconfig and icons - kdeclarative.setupBindings(); - - //If all gone well, the QScriptEngine has been extracted - QScriptEngine *scriptEngine = kdeclarative.scriptEngine(); - Q_ASSERT(scriptEngine); - - QScriptValue global = scriptEngine->globalObject(); - - view.setSource(QUrl::fromLocalFile("gallery.qml")); - view.show(); - - return app.exec(); -} - -#include "testobject_p.moc" diff --git a/declarativeimports/test/testobject_p.h b/declarativeimports/test/testobject_p.h deleted file mode 100644 index 005e10584..000000000 --- a/declarativeimports/test/testobject_p.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2011 Marco Martin - * - * This program 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, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef TESTOBJECT_P_H -#define TESTOBJECT_P_H - -#include - -class TestObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString prop READ prop WRITE setProp NOTIFY propChanged) - -public: - void setProp(const QString &prop) - { - m_prop = prop; - emit propChanged(); - } - - QString prop() const - { - return m_prop; - } - -Q_SIGNALS: - void propChanged(); - -private: - QString m_prop; -}; - -#endif From add8249568220f3ed2a199d396a0f5129e80e71b Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Sun, 24 Apr 2011 19:17:25 -0300 Subject: [PATCH 03/82] Do not allow the adition of a source that is already connected If you try to connect a source that is already connected, it should return and not create a duplicate of that source. Signed-off-by: Artur Duque de Souza --- declarativeimports/core/datasource.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/declarativeimports/core/datasource.cpp b/declarativeimports/core/datasource.cpp index 9d5a914f6..598c41c37 100644 --- a/declarativeimports/core/datasource.cpp +++ b/declarativeimports/core/datasource.cpp @@ -193,6 +193,10 @@ Plasma::Service *DataSource::serviceForSource(const QString &source) void DataSource::connectSource(const QString &source) { + if (m_connectedSources.contains(source)) { + return; + } + m_newSources.append(source); m_connectedSources.append(source); m_changes |= SourcesChanged; From d54f9bbb5aba99bb530febd7d2c681b8cc91ef94 Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Tue, 26 Apr 2011 10:11:43 -0300 Subject: [PATCH 04/82] Export more properties of the Plasma's theme We should export name, font, windowTranslucencyEnabled and homepage as well. Later we will just put all the properties on the Plasma::Theme itself and export it. Signed-off-by: Artur Duque de Souza --- declarativeimports/core/theme.cpp | 20 ++++++++++++++++++++ declarativeimports/core/theme_p.h | 13 +++++++++++++ 2 files changed, 33 insertions(+) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index b793c5ff5..0735a9c89 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -31,6 +31,26 @@ ThemeProxy::~ThemeProxy() { } +QString ThemeProxy::name() const +{ + return Plasma::Theme::defaultTheme()->themeName(); +} + +QFont ThemeProxy::font() const +{ + return Plasma::Theme::defaultTheme()->font(Plasma::Theme::DefaultFont); +} + +bool ThemeProxy::windowTranslucencyEnabled() const +{ + return Plasma::Theme::defaultTheme()->windowTranslucencyEnabled(); +} + +QUrl ThemeProxy::homepage() const +{ + return Plasma::Theme::defaultTheme()->homepage(); +} + QColor ThemeProxy::textColor() const { return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index 86b6def12..e2a86612c 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -21,12 +21,20 @@ #include +#include +#include #include class ThemeProxy : public QObject { Q_OBJECT + Q_PROPERTY(QString name READ name NOTIFY themeChanged) + Q_PROPERTY(QFont font READ font NOTIFY themeChanged) + Q_PROPERTY(bool translucent READ windowTranslucencyEnabled NOTIFY themeChanged) + Q_PROPERTY(QUrl homepage READ homepage NOTIFY themeChanged) + + // colors Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChanged) Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY themeChanged) Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY themeChanged) @@ -46,6 +54,11 @@ public: ThemeProxy(QObject *parent = 0); ~ThemeProxy(); + QString name() const; + QFont font() const; + bool windowTranslucencyEnabled() const; + QUrl homepage() const; + QColor textColor() const; QColor highlightColor() const; QColor backgroundColor() const; From 5364a3bd5089c5182f504a7ace1af19d86f6d4ea Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 26 Apr 2011 20:22:34 +0200 Subject: [PATCH 05/82] pretty output for the package roots. for sebas. with luvs. --- tools/plasmapkg/main.cpp | 45 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/tools/plasmapkg/main.cpp b/tools/plasmapkg/main.cpp index a113a1b74..d65995f22 100644 --- a/tools/plasmapkg/main.cpp +++ b/tools/plasmapkg/main.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -90,10 +91,50 @@ void listTypes() if (!offers.isEmpty()) { std::cout << std::endl; output(i18n("Provided by plugins:")); + const QString pluginHeader = i18n("Plugin Name"); + const QString nameHeader = i18n("Type"); + const QString pathHeader = i18n("Install Root"); + int pluginWidth = pluginHeader.length(); + int nameWidth = nameHeader.length(); + int pathWidth = pathHeader.length(); + + QMap plugins; foreach (const KService::Ptr service, offers) { KPluginInfo info(service); - output(i18nc("Plugin name and the kind of Plasma related content it provides, both from the plugin's desktop file", - " %1: %2", info.pluginName(), info.name())); + Plasma::PackageStructure::Ptr structure = Plasma::PackageStructure::load(info.pluginName()); + QString name = info.name(); + QString plugin = info.pluginName(); + QString path = structure->defaultPackageRoot(); + + if (name.length() > nameWidth) { + nameWidth = name.length(); + } + + if (plugin.length() > pluginWidth) { + pluginWidth = plugin.length(); + } + + if (path.length() > pathWidth) { + pathWidth = path.length(); + } + + plugins.insert(name, QStringList() << plugin << path); + } + + + std::cout << nameHeader.toLocal8Bit().constData() << std::setw(nameWidth - nameHeader.length() + 2) << ' ' + << pluginHeader.toLocal8Bit().constData() << std::setw(pluginWidth - pluginHeader.length() + 2) << ' ' + << pathHeader.toLocal8Bit().constData() << std::endl; + std::cout << std::setfill('-') << std::setw(nameWidth) << '-' << " " + << std::setw(pluginWidth) << '-' << " " + << std::setw(pathWidth) << '-' << std::endl; + QMapIterator pluginIt(plugins); + std::cout << std::setfill(' '); + while (pluginIt.hasNext()) { + pluginIt.next(); + std::cout << pluginIt.key().toLocal8Bit().constData() << std::setw(nameWidth - pluginIt.key().length() + 2) << ' ' + << pluginIt.value()[0].toLocal8Bit().constData() << std::setw(pluginWidth - pluginIt.value()[0].length() + 2) << ' ' + << pluginIt.value()[1].toLocal8Bit().constData() << std::endl; } } From e5dbbdc8f1054303bef88cab2446d7b9db2e3127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sun, 24 Apr 2011 04:04:01 +0200 Subject: [PATCH 06/82] bind Plasma::Theme::styleSheet() in declarative imports --- declarativeimports/core/theme.cpp | 5 +++++ declarativeimports/core/theme_p.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index 0735a9c89..3fe5fbc97 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -116,6 +116,11 @@ QColor ThemeProxy::viewFocusColor() const return Plasma::Theme::defaultTheme()->color(Plasma::Theme::ViewFocusColor); } +QString ThemeProxy::styleSheet() const +{ + return Plasma::Theme::defaultTheme()->styleSheet(QString()); +} + #include "theme_p.moc" diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index e2a86612c..c83c330ce 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -49,6 +49,7 @@ class ThemeProxy : public QObject Q_PROPERTY(QColor viewBackgroundColor READ viewBackgroundColor NOTIFY themeChanged) Q_PROPERTY(QColor viewHoverColor READ viewHoverColor NOTIFY themeChanged) Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY themeChanged) + Q_PROPERTY(QString styleSheet READ styleSheet NOTIFY themeChanged) public: ThemeProxy(QObject *parent = 0); @@ -72,6 +73,7 @@ public: QColor viewBackgroundColor() const; QColor viewHoverColor() const; QColor viewFocusColor() const; + QString styleSheet() const; Q_SIGNALS: void themeChanged(); From ecba1f6d3b3d243fc35a0fd8ba5316e6283b653f Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 26 Apr 2011 20:53:51 +0200 Subject: [PATCH 07/82] do all three types nicely --- tools/plasmapkg/main.cpp | 98 ++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/tools/plasmapkg/main.cpp b/tools/plasmapkg/main.cpp index d65995f22..b4241eceb 100644 --- a/tools/plasmapkg/main.cpp +++ b/tools/plasmapkg/main.cpp @@ -75,28 +75,67 @@ void listPackages(const QStringList& types) } } +void renderTypeTable(const QMap &plugins) +{ + const QString nameHeader = i18n("Addon Name"); + const QString pluginHeader = i18n("Service Type"); + const QString pathHeader = i18n("Path"); + int nameWidth = nameHeader.length(); + int pluginWidth = pluginHeader.length(); + int pathWidth = pathHeader.length(); + + QMapIterator pluginIt(plugins); + while (pluginIt.hasNext()) { + pluginIt.next(); + if (pluginIt.key().length() > nameWidth) { + nameWidth = pluginIt.key().length(); + } + + if (pluginIt.value()[0].length() > pluginWidth) { + pluginWidth = pluginIt.value()[0].length(); + } + + if (pluginIt.value()[1].length() > pathWidth) { + pathWidth = pluginIt.value()[1].length(); + } + } + + std::cout << nameHeader.toLocal8Bit().constData() << std::setw(nameWidth - nameHeader.length() + 2) << ' ' + << pluginHeader.toLocal8Bit().constData() << std::setw(pluginWidth - pluginHeader.length() + 2) << ' ' + << pathHeader.toLocal8Bit().constData() << std::endl; + std::cout << std::setfill('-') << std::setw(nameWidth) << '-' << " " + << std::setw(pluginWidth) << '-' << " " + << std::setw(pathWidth) << '-' << std::endl; + std::cout << std::setfill(' '); + + pluginIt.toFront(); + while (pluginIt.hasNext()) { + pluginIt.next(); + std::cout << pluginIt.key().toLocal8Bit().constData() << std::setw(nameWidth - pluginIt.key().length() + 2) << ' ' + << pluginIt.value()[0].toLocal8Bit().constData() << std::setw(pluginWidth - pluginIt.value()[0].length() + 2) << ' ' + << pluginIt.value()[1].toLocal8Bit().constData() << std::endl; + } +} + void listTypes() { output(i18n("Package types that are installable with this tool:")); output(i18n("Built in:")); - output(i18n(" dataengine: Plasma DataEngine plugin")); - output(i18n(" layout-template: Plasma containment and widget layout script")); - output(i18n(" plasmoid: Plasma widget")); - output(i18n(" runner: Search plugin (KRunner, etc)")); - output(i18n(" theme: Plasma SVG theme")); - output(i18n(" wallpaper: Image pack for use with wallpaper backgrounds")); - output(i18n(" wallpaperplugin: Wallpaper plugin")); + + QMap builtIns; + builtIns.insert(i18n("DataEngine"), QStringList() << "Plasma/DataEngine" << "plasma/dataengines/"); + builtIns.insert(i18n("Layout Template"), QStringList() << "Plasma/LayoutTemplate" << "plasma/layout-templates/"); + builtIns.insert(i18n("Plasmoid"), QStringList() << "Plasma/Applet" << "plasma/plasmoids/"); + builtIns.insert(i18n("Runner"), QStringList() << "Plasma/Runner" << "plasma/runners/"); + builtIns.insert(i18n("Theme"), QStringList() << "" << "desktoptheme/"); + builtIns.insert(i18n("Wallpaper Images"), QStringList() << "" << "wallpapers/"); + builtIns.insert(i18n("Wallpaper Plugin"), QStringList() << "Plasma/Wallpaper" << "plasma/wallpapers/"); + renderTypeTable(builtIns); KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure"); if (!offers.isEmpty()) { std::cout << std::endl; output(i18n("Provided by plugins:")); - const QString pluginHeader = i18n("Plugin Name"); - const QString nameHeader = i18n("Type"); - const QString pathHeader = i18n("Install Root"); - int pluginWidth = pluginHeader.length(); - int nameWidth = nameHeader.length(); - int pathWidth = pathHeader.length(); QMap plugins; foreach (const KService::Ptr service, offers) { @@ -105,51 +144,24 @@ void listTypes() QString name = info.name(); QString plugin = info.pluginName(); QString path = structure->defaultPackageRoot(); - - if (name.length() > nameWidth) { - nameWidth = name.length(); - } - - if (plugin.length() > pluginWidth) { - pluginWidth = plugin.length(); - } - - if (path.length() > pathWidth) { - pathWidth = path.length(); - } - plugins.insert(name, QStringList() << plugin << path); } - - std::cout << nameHeader.toLocal8Bit().constData() << std::setw(nameWidth - nameHeader.length() + 2) << ' ' - << pluginHeader.toLocal8Bit().constData() << std::setw(pluginWidth - pluginHeader.length() + 2) << ' ' - << pathHeader.toLocal8Bit().constData() << std::endl; - std::cout << std::setfill('-') << std::setw(nameWidth) << '-' << " " - << std::setw(pluginWidth) << '-' << " " - << std::setw(pathWidth) << '-' << std::endl; - QMapIterator pluginIt(plugins); - std::cout << std::setfill(' '); - while (pluginIt.hasNext()) { - pluginIt.next(); - std::cout << pluginIt.key().toLocal8Bit().constData() << std::setw(nameWidth - pluginIt.key().length() + 2) << ' ' - << pluginIt.value()[0].toLocal8Bit().constData() << std::setw(pluginWidth - pluginIt.value()[0].length() + 2) << ' ' - << pluginIt.value()[1].toLocal8Bit().constData() << std::endl; - } + renderTypeTable(plugins); } QStringList desktopFiles = KGlobal::dirs()->findAllResources("data", "plasma/packageformats/*rc", KStandardDirs::NoDuplicates); if (!desktopFiles.isEmpty()) { output(i18n("Provided by .desktop files:")); Plasma::PackageStructure structure; + QMap plugins; foreach (const QString &file, desktopFiles) { // extract the type KConfig config(file, KConfig::SimpleConfig); structure.read(&config); // get the name based on the rc file name, just as Plasma::PackageStructure does const QString name = file.left(file.length() - 2); - output(i18nc("Plugin name and the kind of Plasma related content it provides, both from the plugin's desktop file", - " %1: %2", name, structure.type())); + plugins.insert(name, QStringList() << structure.type() << structure.defaultPackageRoot()); } } } From 3dbe535deca66f2d4241cd4ef69daaa05cd9ed03 Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Tue, 26 Apr 2011 16:46:14 -0300 Subject: [PATCH 08/82] Last bits to theme bindings We are going to need a proxy for the theme anyway, so we need this guy complete anyway. Let's forget about the idea of exporting Plasma::Theme directly. Signed-off-by: Artur Duque de Souza --- declarativeimports/core/theme.cpp | 19 +++++++++++++++++-- declarativeimports/core/theme_p.h | 18 ++++++++++++------ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index 0735a9c89..1e640d1b2 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -31,7 +31,7 @@ ThemeProxy::~ThemeProxy() { } -QString ThemeProxy::name() const +QString ThemeProxy::themeName() const { return Plasma::Theme::defaultTheme()->themeName(); } @@ -46,11 +46,26 @@ bool ThemeProxy::windowTranslucencyEnabled() const return Plasma::Theme::defaultTheme()->windowTranslucencyEnabled(); } -QUrl ThemeProxy::homepage() const +KUrl ThemeProxy::homepage() const { return Plasma::Theme::defaultTheme()->homepage(); } +bool ThemeProxy::useGlobalSettings() const +{ + return Plasma::Theme::defaultTheme()->useGlobalSettings(); +} + +QString ThemeProxy::styleSheet() const +{ + return Plasma::Theme::defaultTheme()->styleSheet(); +} + +QString ThemeProxy::wallpaperPath() const +{ + return Plasma::Theme::defaultTheme()->wallpaperPath(); +} + QColor ThemeProxy::textColor() const { return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index e2a86612c..820df1da5 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -29,10 +29,13 @@ class ThemeProxy : public QObject { Q_OBJECT - Q_PROPERTY(QString name READ name NOTIFY themeChanged) + Q_PROPERTY(QString themeName READ themeName NOTIFY themeChanged) Q_PROPERTY(QFont font READ font NOTIFY themeChanged) - Q_PROPERTY(bool translucent READ windowTranslucencyEnabled NOTIFY themeChanged) - Q_PROPERTY(QUrl homepage READ homepage NOTIFY themeChanged) + Q_PROPERTY(bool windowTranslucentEnabled READ windowTranslucencyEnabled NOTIFY themeChanged) + Q_PROPERTY(KUrl homepage READ homepage NOTIFY themeChanged) + Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged) + Q_PROPERTY(QString styleSheet READ styleSheet NOTIFY themeChanged) + Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged) // colors Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChanged) @@ -54,10 +57,13 @@ public: ThemeProxy(QObject *parent = 0); ~ThemeProxy(); - QString name() const; + QString themeName() const; QFont font() const; bool windowTranslucencyEnabled() const; - QUrl homepage() const; + KUrl homepage() const; + bool useGlobalSettings() const; + QString styleSheet() const; + QString wallpaperPath() const; QColor textColor() const; QColor highlightColor() const; From 0aaa04c2dc6c26150f09b8f4ab9966aea6f4abed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Wed, 27 Apr 2011 03:49:03 +0200 Subject: [PATCH 09/82] build++ --- declarativeimports/core/theme.cpp | 5 ----- declarativeimports/core/theme_p.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index 64e41ed00..fd9e15895 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -56,11 +56,6 @@ bool ThemeProxy::useGlobalSettings() const return Plasma::Theme::defaultTheme()->useGlobalSettings(); } -QString ThemeProxy::styleSheet() const -{ - return Plasma::Theme::defaultTheme()->styleSheet(); -} - QString ThemeProxy::wallpaperPath() const { return Plasma::Theme::defaultTheme()->wallpaperPath(); diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index 4ff53f918..008264991 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -34,7 +34,6 @@ class ThemeProxy : public QObject Q_PROPERTY(bool windowTranslucentEnabled READ windowTranslucencyEnabled NOTIFY themeChanged) Q_PROPERTY(KUrl homepage READ homepage NOTIFY themeChanged) Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged) - Q_PROPERTY(QString styleSheet READ styleSheet NOTIFY themeChanged) Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged) // colors @@ -63,7 +62,6 @@ public: bool windowTranslucencyEnabled() const; KUrl homepage() const; bool useGlobalSettings() const; - QString styleSheet() const; QString wallpaperPath() const; QColor textColor() const; From 436fd7e7626916349ca83d6f7413d9c305f5983c Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Wed, 27 Apr 2011 19:27:52 -0300 Subject: [PATCH 10/82] Separate the DeclarativeItemContainer so it can be used by others We are going to need the declarative container for the tooltips, so it makes sense to put this guy in it's own files. Signed-off-by: Artur Duque de Souza --- declarativeimports/core/CMakeLists.txt | 1 + .../core/declarativeitemcontainer.cpp | 66 +++++++++++++++++++ .../core/declarativeitemcontainer_p.h | 46 +++++++++++++ declarativeimports/core/dialog.cpp | 50 +------------- 4 files changed, 114 insertions(+), 49 deletions(-) create mode 100644 declarativeimports/core/declarativeitemcontainer.cpp create mode 100644 declarativeimports/core/declarativeitemcontainer_p.h diff --git a/declarativeimports/core/CMakeLists.txt b/declarativeimports/core/CMakeLists.txt index 2485ee8bc..9ca40d806 100644 --- a/declarativeimports/core/CMakeLists.txt +++ b/declarativeimports/core/CMakeLists.txt @@ -1,6 +1,7 @@ project(corebindings) set(corebindings_SRCS + declarativeitemcontainer.cpp corebindingsplugin.cpp dataengineconsumer.cpp theme.cpp diff --git a/declarativeimports/core/declarativeitemcontainer.cpp b/declarativeimports/core/declarativeitemcontainer.cpp new file mode 100644 index 000000000..c71f13f4b --- /dev/null +++ b/declarativeimports/core/declarativeitemcontainer.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright 2011 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "declarativeitemcontainer_p.h" + +DeclarativeItemContainer::DeclarativeItemContainer(QGraphicsItem *parent) + : QGraphicsWidget(parent) +{ +} + +DeclarativeItemContainer::~DeclarativeItemContainer() +{ +} + +void DeclarativeItemContainer::setDeclarativeItem(QDeclarativeItem *item, bool reparent) +{ + if (m_declarativeItem) { + m_declarativeItem.data()->removeSceneEventFilter(this); + } + m_declarativeItem = item; + if (reparent) { + static_cast(item)->setParentItem(this); + } + setMinimumWidth(item->implicitWidth()); + setMinimumHeight(item->implicitHeight()); + resize(item->width(), item->height()); + item->installSceneEventFilter(this); +} + +QDeclarativeItem *DeclarativeItemContainer::declarativeItem() const +{ + return m_declarativeItem.data(); +} + +void DeclarativeItemContainer::resizeEvent(QGraphicsSceneResizeEvent *event) +{ + if (m_declarativeItem) { + m_declarativeItem.data()->setProperty("width", event->newSize().width()); + m_declarativeItem.data()->setProperty("height", event->newSize().height()); + } +} + +bool DeclarativeItemContainer::sceneEventFilter(QGraphicsItem *watched, QEvent *event) +{ + if (event->type() == QEvent::GraphicsSceneResize) { + resize(watched->boundingRect().size()); + } + + return QGraphicsWidget::sceneEventFilter(watched, event); +} diff --git a/declarativeimports/core/declarativeitemcontainer_p.h b/declarativeimports/core/declarativeitemcontainer_p.h new file mode 100644 index 000000000..1cbef3d22 --- /dev/null +++ b/declarativeimports/core/declarativeitemcontainer_p.h @@ -0,0 +1,46 @@ +/*************************************************************************** + * Copyright 2011 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef DECLARATIVEITEMCONTAINER_P +#define DECLARATIVEITEMCONTAINER_P + +#include +#include +#include +#include + + +class DeclarativeItemContainer : public QGraphicsWidget +{ +public: + DeclarativeItemContainer(QGraphicsItem *parent = 0); + ~DeclarativeItemContainer(); + + void setDeclarativeItem(QDeclarativeItem *item, bool reparent = true); + QDeclarativeItem *declarativeItem() const; + +protected: + void resizeEvent(QGraphicsSceneResizeEvent *event); + bool sceneEventFilter(QGraphicsItem *watched, QEvent *event); + +private: + QWeakPointer m_declarativeItem; +}; + +#endif diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 4ce4690e8..ac900806d 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -18,6 +18,7 @@ ***************************************************************************/ #include "dialog.h" +#include "declarativeitemcontainer_p.h" #include #include @@ -27,55 +28,6 @@ #include #include -class DeclarativeItemContainer : public QGraphicsWidget -{ -public: - DeclarativeItemContainer(QGraphicsItem *parent = 0) - : QGraphicsWidget(parent) - {} - - ~DeclarativeItemContainer() - {} - - void setDeclarativeItem(QDeclarativeItem *item) - { - if (m_declarativeItem) { - m_declarativeItem.data()->removeSceneEventFilter(this); - } - m_declarativeItem = item; - static_cast(item)->setParentItem(this); - setMinimumWidth(item->implicitWidth()); - setMinimumHeight(item->implicitHeight()); - resize(item->width(), item->height()); - item->installSceneEventFilter(this); - } - - QDeclarativeItem *declarativeItem() const - { - return m_declarativeItem.data(); - } - -protected: - void resizeEvent(QGraphicsSceneResizeEvent *event) - { - if (m_declarativeItem) { - m_declarativeItem.data()->setProperty("width", event->newSize().width()); - m_declarativeItem.data()->setProperty("height", event->newSize().height()); - } - } - - bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) - { - if (event->type() == QEvent::GraphicsSceneResize) { - resize(watched->boundingRect().size()); - } - - return QGraphicsWidget::sceneEventFilter(watched, event); - } - -private: - QWeakPointer m_declarativeItem; -}; DialogProxy::DialogProxy(QObject *parent) : QObject(parent) From f1e61647b6fdb0c52c1a98ad8939e62cb4a00df1 Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Wed, 27 Apr 2011 19:33:29 -0300 Subject: [PATCH 11/82] QML Bindings for Plasma::ToolTips Implementation of a proxy to make it easy to declare tooltips in QML, that will use Plasma::ToolTipManager to display tooltips in any item that is declared in QML. The syntax is: import org.kde.plasma.core 0.1 as PlasmaCore PlasmaCore.ToolTip { target: id_of_the_target mainText: "hello" subText: "world" image: "konqueror" } The syntax looks pretty straightforward and simple. "id_of_the_target" is the id of the element which will show the tooltip in case it's hovered. If the target is a QGraphicsWidget, the code path is really simple but if it's a QDeclarativeItem, then we create a wrapper (that is a QGraphicsWidget) and setup that in a way that we set this wrapper as the target on Plasma's API. For libplasma2 we may want to change this so it's more generic (and also put this together with the components). Right now there is two open issues for me: 1) we should use "image" or "icon"? Allowing the use of a image that is a string that identifies the icon for KIconLoader seems simpler and more beautiful to me, but it would be nice to specify a random QPixmap. Besides being able to use the bindings for QIcon it doesn't look very good. Marco, do you have any thoughts on this issue? 2) for touch oriented UIs, the tooltip as it is right now is not very useful. Is there any "touch" scenario where we may want to use them? CCMAIL:mart@kde.org Signed-off-by: Artur Duque de Souza --- declarativeimports/core/tooltip.cpp | 168 ++++++++++++++++++++++++++++ declarativeimports/core/tooltip.h | 76 +++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 declarativeimports/core/tooltip.cpp create mode 100644 declarativeimports/core/tooltip.h diff --git a/declarativeimports/core/tooltip.cpp b/declarativeimports/core/tooltip.cpp new file mode 100644 index 000000000..ee04af81d --- /dev/null +++ b/declarativeimports/core/tooltip.cpp @@ -0,0 +1,168 @@ +/*************************************************************************** + * Copyright 2011 Marco Martin * + * Copyright 2011 Artur Duque de Souza * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "tooltip.h" +#include "declarativeitemcontainer_p.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +ToolTipProxy::ToolTipProxy(QObject *parent) + : QObject(parent), m_mainText(""), m_subText(""), + m_declarativeItemContainer(0), m_widget(0) +{ + connect(this, SIGNAL(targetChanged()), this, SLOT(updateToolTip())); + connect(this, SIGNAL(mainTextChanged()), this, SLOT(updateToolTip())); + connect(this, SIGNAL(subTextChanged()), this, SLOT(updateToolTip())); + connect(this, SIGNAL(imageChanged()), this, SLOT(updateToolTip())); +} + +ToolTipProxy::~ToolTipProxy() +{ + delete m_declarativeItemContainer; +} + +QGraphicsObject *ToolTipProxy::target() const +{ + return m_target.data(); +} + +void ToolTipProxy::setTarget(QGraphicsObject *target) +{ + if (m_target.data() != target) { + m_target = target; + + m_widget = qobject_cast(m_target.data()); + if (!m_widget) { + // if this is called in Compenent.onCompleted we have to + // wait a loop for the item to be added to a scene + QTimer::singleShot(0, this, SLOT(syncTarget())); + return; + } + emit targetChanged(); + } +} + +void ToolTipProxy::syncTarget() +{ + // find the scene + QGraphicsScene *scene = m_target.data()->scene(); + if (!scene) { + QObject *parent = m_target.data(); + while ((parent = parent->parent())) { + QGraphicsObject *qo = qobject_cast(parent); + if (qo) { + scene = qo->scene(); + scene->addItem(m_target.data()); + break; + } + } + } + + QDeclarativeItem *item = qobject_cast(m_target.data()); + if (!item) { + return; + } + + if (!m_declarativeItemContainer) { + m_declarativeItemContainer = new DeclarativeItemContainer(); + m_declarativeItemContainer->setObjectName("DIContainer"); + scene->addItem(m_declarativeItemContainer); + } + + m_target.data()->setObjectName("Original Item"); + m_declarativeItemContainer->setDeclarativeItem(item, false); + m_declarativeItemContainer->setAcceptHoverEvents(true); + m_declarativeItemContainer->setParentItem(m_target.data()); + m_widget = m_declarativeItemContainer; + emit targetChanged(); +} + +QString ToolTipProxy::mainText() const +{ + return m_mainText; +} + +void ToolTipProxy::setMainText(const QString &text) +{ + if (text == m_mainText) { + return; + } + + m_mainText = text; + emit mainTextChanged(); +} + +QString ToolTipProxy::subText() const +{ + return m_subText; +} + +void ToolTipProxy::setSubText(const QString &text) +{ + if (text == m_subText) { + return; + } + + m_subText = text; + emit subTextChanged(); +} + +// ###TODO: SHOULD BE PIXMAP OR QICON?? +QString ToolTipProxy::image() const +{ + return m_image; +} + +void ToolTipProxy::setImage(const QString &name) +{ + if (name == m_image) { + return; + } + + m_image = name; + emit imageChanged(); +} + +void ToolTipProxy::updateToolTip() +{ + if (!m_widget) { + return; + } + + Plasma::ToolTipContent data; + data.setMainText(m_mainText); + data.setSubText(m_subText); + data.setImage(KIcon(m_image).pixmap(IconSize(KIconLoader::Desktop))); + Plasma::ToolTipManager::self()->setContent(m_widget, data); +} + +#include "tooltip.moc" + diff --git a/declarativeimports/core/tooltip.h b/declarativeimports/core/tooltip.h new file mode 100644 index 000000000..fca207436 --- /dev/null +++ b/declarativeimports/core/tooltip.h @@ -0,0 +1,76 @@ +/*************************************************************************** + * Copyright 2011 Marco Martin * + * Copyright 2011 Artur Duque de Souza * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef TOOLTIP_PROXY_P +#define TOOLTIP_PROXY_P + +#include +#include + +class QGraphicsObject; +class QGraphicsWidget; +class DeclarativeItemContainer; + +class ToolTipProxy : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QGraphicsObject *target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QString mainText READ mainText WRITE setMainText NOTIFY mainTextChanged) + Q_PROPERTY(QString subText READ subText WRITE setSubText NOTIFY subTextChanged) + Q_PROPERTY(QString image READ image WRITE setImage NOTIFY imageChanged) + +public: + ToolTipProxy(QObject *parent = 0); + ~ToolTipProxy(); + + QGraphicsObject *target() const; + void setTarget(QGraphicsObject *target); + + QString mainText() const; + void setMainText(const QString &text); + + QString subText() const; + void setSubText(const QString &text); + + // SHOULD BE PIXMAP OR QICON + QString image() const; + void setImage(const QString &name); + +Q_SIGNALS: + void targetChanged(); + void mainTextChanged(); + void subTextChanged(); + void imageChanged(); + +protected Q_SLOTS: + void syncTarget(); + void updateToolTip(); + +private: + QString m_mainText; + QString m_subText; + QString m_image; + DeclarativeItemContainer *m_declarativeItemContainer; + QGraphicsWidget *m_widget; + QWeakPointer m_target; +}; + +#endif From e3db04f3ff0134dfa0357ceb953a67dd5f185e52 Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Wed, 27 Apr 2011 19:44:50 -0300 Subject: [PATCH 12/82] Add Tooltip to the build system Let's compile the tooltip and also export it to our QML plugin. Signed-off-by: Artur Duque de Souza --- declarativeimports/core/CMakeLists.txt | 1 + declarativeimports/core/corebindingsplugin.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/declarativeimports/core/CMakeLists.txt b/declarativeimports/core/CMakeLists.txt index 9ca40d806..64254ac8d 100644 --- a/declarativeimports/core/CMakeLists.txt +++ b/declarativeimports/core/CMakeLists.txt @@ -10,6 +10,7 @@ set(corebindings_SRCS svgitem.cpp framesvgitem.cpp dialog.cpp + tooltip.cpp ) INCLUDE_DIRECTORIES( diff --git a/declarativeimports/core/corebindingsplugin.cpp b/declarativeimports/core/corebindingsplugin.cpp index d263d6250..d6ab7e617 100644 --- a/declarativeimports/core/corebindingsplugin.cpp +++ b/declarativeimports/core/corebindingsplugin.cpp @@ -32,6 +32,7 @@ #include "svgitem_p.h" #include "theme_p.h" #include "dialog.h" +#include "tooltip.h" void CoreBindingsPlugin::registerTypes(const char *uri) { @@ -49,6 +50,7 @@ void CoreBindingsPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 0, 1, "SortFilterModel"); qmlRegisterType(uri, 0, 1, "Dialog"); + qmlRegisterType(uri, 0, 1, "ToolTip"); qmlRegisterInterface("Service"); qRegisterMetaType("Service"); From fecc197de074a0c53e32273d0609c2068dfb0141 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 29 Apr 2011 09:32:15 +0200 Subject: [PATCH 13/82] SVN_SILENT made messages (.desktop file) --- scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index 86e8d32a2..2a99e29fe 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -34,6 +34,7 @@ Name[pl]=Dodatek dla JavaScript Name[pt]=Extensão de JavaScript do Plasma Name[pt_BR]=Complementos de JavaScript do Plasma Name[ro]=Supliment JavaScript Plasma +Name[ru]=Расширение Plasma, использующее JavaScript Name[sk]=Doplnok JavaScript pre plasmu Name[sl]=Dodatek za JavaScript za Plasmo Name[sr]=Плазма јаваскриптни додатак diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 2fe01e25f..4e54c229a 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -35,6 +35,7 @@ Name[pl]=Dodatek dla JavaScript Name[pt]=Extensão de JavaScript Name[pt_BR]=Complementos de JavaScript Name[ro]=Supliment Javascript +Name[ru]=Дополнение, использующее JavaScript Name[sk]=Doplnok JavaScript Name[sl]=Dodatek za JavaScript Name[sr]=Јаваскриптни додатак @@ -80,7 +81,7 @@ Comment[pl]=Dodatki dla wtyczek Plazmy w JavaScript Comment[pt]=Extras para os 'plugins' do Plasma em JavaScript Comment[pt_BR]=Complementos para os plug-ins do Plasma em JavaScript Comment[ro]=Suplimente pentru module JavaScript Plasma -Comment[ru]=Модули, обеспечивающие поддержку JavaScript в расширениях Plasma +Comment[ru]=Модули поддержки дополнений Plasma, использующих JavaScript Comment[sk]=Doplnky pre Javascriptové moduly plasmy Comment[sl]=Dodatki za vstavke JavaScript za Plasmo Comment[sr]=Додаци за јаваскриптне плазма прикључке From 80b71fe2f46bc0d5ff866963898517a12b29a467 Mon Sep 17 00:00:00 2001 From: Diego Casella Date: Fri, 29 Apr 2011 11:22:44 +0200 Subject: [PATCH 14/82] check m_declarativeItemContainer before deleting it --- declarativeimports/core/tooltip.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/tooltip.cpp b/declarativeimports/core/tooltip.cpp index ee04af81d..c09cfc3f7 100644 --- a/declarativeimports/core/tooltip.cpp +++ b/declarativeimports/core/tooltip.cpp @@ -46,7 +46,9 @@ ToolTipProxy::ToolTipProxy(QObject *parent) ToolTipProxy::~ToolTipProxy() { - delete m_declarativeItemContainer; + if (!m_declarativeItemContainer) { + delete m_declarativeItemContainer; + } } QGraphicsObject *ToolTipProxy::target() const From 97bfbf07a5347975a8922f80285b12e4db9292e7 Mon Sep 17 00:00:00 2001 From: Diego Casella Date: Fri, 29 Apr 2011 12:50:18 +0200 Subject: [PATCH 15/82] use QWeakPointer for m_declarativeItemContainer --- declarativeimports/core/tooltip.cpp | 30 ++++++++++++++--------------- declarativeimports/core/tooltip.h | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/declarativeimports/core/tooltip.cpp b/declarativeimports/core/tooltip.cpp index c09cfc3f7..966450ce5 100644 --- a/declarativeimports/core/tooltip.cpp +++ b/declarativeimports/core/tooltip.cpp @@ -35,8 +35,7 @@ ToolTipProxy::ToolTipProxy(QObject *parent) - : QObject(parent), m_mainText(""), m_subText(""), - m_declarativeItemContainer(0), m_widget(0) + : QObject(parent), m_mainText(""), m_subText(""), m_widget(0) { connect(this, SIGNAL(targetChanged()), this, SLOT(updateToolTip())); connect(this, SIGNAL(mainTextChanged()), this, SLOT(updateToolTip())); @@ -46,9 +45,6 @@ ToolTipProxy::ToolTipProxy(QObject *parent) ToolTipProxy::~ToolTipProxy() { - if (!m_declarativeItemContainer) { - delete m_declarativeItemContainer; - } } QGraphicsObject *ToolTipProxy::target() const @@ -94,17 +90,19 @@ void ToolTipProxy::syncTarget() } if (!m_declarativeItemContainer) { - m_declarativeItemContainer = new DeclarativeItemContainer(); - m_declarativeItemContainer->setObjectName("DIContainer"); - scene->addItem(m_declarativeItemContainer); - } - - m_target.data()->setObjectName("Original Item"); - m_declarativeItemContainer->setDeclarativeItem(item, false); - m_declarativeItemContainer->setAcceptHoverEvents(true); - m_declarativeItemContainer->setParentItem(m_target.data()); - m_widget = m_declarativeItemContainer; - emit targetChanged(); + m_declarativeItemContainer = QWeakPointer(new DeclarativeItemContainer()); + m_declarativeItemContainer.data()->setObjectName("DIContainer"); + scene->addItem(m_declarativeItemContainer.data()); + } + + if (m_declarativeItemContainer) { + m_target.data()->setObjectName("Original Item"); + m_declarativeItemContainer.data()->setDeclarativeItem(item, false); + m_declarativeItemContainer.data()->setAcceptHoverEvents(true); + m_declarativeItemContainer.data()->setParentItem(m_target.data()); + m_widget = m_declarativeItemContainer.data(); + emit targetChanged(); + } } QString ToolTipProxy::mainText() const diff --git a/declarativeimports/core/tooltip.h b/declarativeimports/core/tooltip.h index fca207436..59658582e 100644 --- a/declarativeimports/core/tooltip.h +++ b/declarativeimports/core/tooltip.h @@ -68,8 +68,8 @@ private: QString m_mainText; QString m_subText; QString m_image; - DeclarativeItemContainer *m_declarativeItemContainer; QGraphicsWidget *m_widget; + QWeakPointer m_declarativeItemContainer; QWeakPointer m_target; }; From bc5304306491a5267ec9d5e9484d1df076882292 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Fri, 29 Apr 2011 16:52:53 +0200 Subject: [PATCH 16/82] Implement a CLI tool allowing to add remote plasmoids Use the D-Bus call on the Plasma Desktop shell to create a cli helper tool allowing you to add a remote widgets based on its URL. So something like "plasma-remote-helper plasma://host:port/name" will add the plasmoid "name" exported from "host" to your current activity. --- tools/CMakeLists.txt | 1 + tools/plasma-remote-helper/CMakeLists.txt | 10 +++ tools/plasma-remote-helper/Messages.sh | 2 + tools/plasma-remote-helper/main.cpp | 81 +++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 tools/plasma-remote-helper/CMakeLists.txt create mode 100755 tools/plasma-remote-helper/Messages.sh create mode 100644 tools/plasma-remote-helper/main.cpp diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 575dea7b8..555096d88 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(plasmapkg) +add_subdirectory(plasma-remote-helper) diff --git a/tools/plasma-remote-helper/CMakeLists.txt b/tools/plasma-remote-helper/CMakeLists.txt new file mode 100644 index 000000000..c2eddb20a --- /dev/null +++ b/tools/plasma-remote-helper/CMakeLists.txt @@ -0,0 +1,10 @@ +set(plasma_remote_helper_SRCS + main.cpp +) + +kde4_add_executable(plasma-remote-helper ${plasma_remote_helper_SRCS}) + +target_link_libraries(plasma-remote-helper ${KDE4_KDEUI_LIBS}) + +install(TARGETS plasma-remote-helper ${INSTALL_TARGETS_DEFAULT_ARGS}) + diff --git a/tools/plasma-remote-helper/Messages.sh b/tools/plasma-remote-helper/Messages.sh new file mode 100755 index 000000000..7b98af468 --- /dev/null +++ b/tools/plasma-remote-helper/Messages.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +$XGETTEXT *.cpp -o $podir/plasma-remote-helper.pot diff --git a/tools/plasma-remote-helper/main.cpp b/tools/plasma-remote-helper/main.cpp new file mode 100644 index 000000000..a1d3d0cc0 --- /dev/null +++ b/tools/plasma-remote-helper/main.cpp @@ -0,0 +1,81 @@ +/* Copyright 2011 Kevin Ottens + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, + or (at your option) any later version. + + This program 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 General Public License for more details + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include + +#include +#include +#include + +static const char description[] = I18N_NOOP("Trigger the installation of a remove Plasma Widget"); +static const char version[] = "0.1"; + +int addRemotePlasmoidToShell(const QString &shellName, const QString &url) +{ + QString serviceName = "org.kde." + shellName; + QDBusInterface iface(serviceName, "/App"); + + if (!iface.isValid()) { + std::cerr << "Error: Couldn't contact " + << shellName.toLocal8Bit().constData() << std::endl; + return 1; + } else { + QDBusReply reply = iface.call("addRemotePlasmoid", url); + if (!reply.isValid()) { + std::cerr << "Error: Couldn't call addRemotePlasmoid on " + << shellName.toLocal8Bit().constData() << std::endl; + return 1; + } + } + + return 0; +} + +int main(int argc, char **argv) +{ + KAboutData aboutData("plasma-remote-helper", 0, ki18n("Plasma Remote Widget Helper"), + version, ki18n(description), KAboutData::License_GPL, + ki18n("(C) 2011 Kevin Ottens")); + aboutData.addAuthor( ki18n("Kevin Ottens"), + ki18n("Original author"), + "ervin@kde.org" ); + + KComponentData componentData(aboutData); + + KCmdLineArgs::init( argc, argv, &aboutData ); + + KCmdLineOptions options; + options.add("+", ki18n("URL to the Plasma Remote Widget.")); + KCmdLineArgs::addCmdLineOptions( options ); + + KApplication app; + + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + if (args->count()<1) { + KCmdLineArgs::usageError(i18n("Syntax Error: Not enough arguments")); + } else if (args->count()>1) { + KCmdLineArgs::usageError(i18n("Syntax Error: Too many arguments")); + } + + QString url = args->arg(0); + return addRemotePlasmoidToShell("plasma-desktop", url); +} + From 5b77ea2fab80883e3fe89f34190de1d9c2279574 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Sat, 30 Apr 2011 09:36:02 +0300 Subject: [PATCH 17/82] fix typo: remove->remote --- tools/plasma-remote-helper/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/plasma-remote-helper/main.cpp b/tools/plasma-remote-helper/main.cpp index a1d3d0cc0..cda83ab0c 100644 --- a/tools/plasma-remote-helper/main.cpp +++ b/tools/plasma-remote-helper/main.cpp @@ -25,7 +25,7 @@ #include #include -static const char description[] = I18N_NOOP("Trigger the installation of a remove Plasma Widget"); +static const char description[] = I18N_NOOP("Trigger the installation of a remote Plasma Widget"); static const char version[] = "0.1"; int addRemotePlasmoidToShell(const QString &shellName, const QString &url) From 4a906d4ed4f0a7079ec96ff91706fe1ccbed3ba8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 30 Apr 2011 14:36:16 +0200 Subject: [PATCH 18/82] dataengine bindings are in DeclarativeWidget now --- scriptengines/javascript/plasmoid/declarativeappletscript.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index b7d676f10..f3f88574e 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -393,7 +393,6 @@ void DeclarativeAppletScript::setupObjects() } registerSimpleAppletMetaTypes(m_engine); - registerDataEngineMetaTypes(m_engine); QTimer::singleShot(0, this, SLOT(configChanged())); } From cb9bd829c353b120f76467471561504e6b874b0d Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 11 May 2011 09:16:16 +0200 Subject: [PATCH 19/82] SVN_SILENT made messages (.desktop file) --- remotewidgetshelper/kcm_remotewidgets.actions | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 1 + .../data/plasma-scriptengine-applet-declarative.desktop | 1 + .../data/plasma-scriptengine-applet-simple-javascript.desktop | 1 + .../data/plasma-scriptengine-runner-javascript.desktop | 1 + 5 files changed, 5 insertions(+) diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 105ce88ce..00a9af78f 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -55,6 +55,7 @@ Name[zh_TW]=儲存遠端元件政策 Description=Prevents the system from saving remote plasma widgets' policies Description[ar]=يمنع النظام من حفظ سياسات ودجات بلازما البعيدة Description[ast]=Impide que'l sistema guarde polítiques d'elementos gráficos Plasma remotos +Description[bs]=Sprečava sistem da sačuva smjernice udaljenih plazma grafičkih kontrola Description[ca]=Evita al sistema de desar polítiques d'estris remots del plasma Description[ca@valencia]=Evita al sistema d'alçar polítiques d'estris remots del plasma Description[cs]=Zabrání systému ukládat zásady vzdálených widgetů plasmy diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 4e54c229a..1b7dc0b25 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -51,6 +51,7 @@ Name[zh_TW]=Javascript Addon Comment=Addons for Javascript Plasma plugins Comment[ast]=Amestaos pa complementos de JavaScript pa Plasma Comment[bg]=Добавки за приставките за Javascript на Plasma +Comment[bs]=Dodaci za javaskriptne plazma priključke Comment[ca]=Complements pels connectors Javascript del Plasma Comment[ca@valencia]=Complements pels connectors Javascript del Plasma Comment[cs]=Doplňky pro javascriptové zásuvné moduly plasmy diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index f25f738e9..07926e270 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -42,6 +42,7 @@ Name[x-test]=xxDeclarative widgetxx Name[zh_TW]=宣告元件 Comment=Native Plasma widget written in QML and JavaScript Comment[ast]=Elementu gráficu nativu de Plasma escritu en QML y JavaScript +Comment[bs]=Samosvojni plazma grafičkih kontrola napisana u QML‑u i javaskriptu Comment[ca]=Estri nadiu del Plasma escrit en QML i JavaScript Comment[ca@valencia]=Estri nadiu del Plasma escrit en QML i JavaScript Comment[cs]=Nativní Plasma widget napsaný v QML a JavaScriptu diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index 1d0947518..8c0085235 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -76,6 +76,7 @@ Comment[ar]=ودجة بلازما أصلية كتبت بجافا سكربت Comment[ast]=Elementu gráficu nativu de Plasma escritu en JavaScript Comment[be@latin]=Widžet systemy „Plasma”, napisany ŭ movie „JavaScript” Comment[bg]=Оригинална джаджа за Plasma, написана с JavaScript +Comment[bs]=Samosvojni plazma grafička kontrola napisana u javaskriptu Comment[ca]=Estri nadiu del Plasma escrit en JavaScript Comment[ca@valencia]=Estri nadiu del Plasma escrit en JavaScript Comment[cs]=Nativní Plasma widget napsaný v JavaScriptu diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index f752d4c8a..6d3298ea6 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -78,6 +78,7 @@ Comment[ast]=Motor de javascript Comment[be@latin]=Uklučeńnie „JavaScript”. Comment[bg]=Изпълнение на JavaScript Comment[bn_IN]=JavaScript Runner +Comment[bs]=Javascript izvođač Comment[ca]=Executor de JavaScript Comment[ca@valencia]=Executor de JavaScript Comment[cs]=Spouštěč JavaScriptu From a79fea0eb812aef45fac6e341cd5c22bdb586731 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 17 May 2011 10:48:38 +0200 Subject: [PATCH 20/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 1 + remotewidgetshelper/kcm_remotewidgets.actions | 1 + scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 1 + .../data/plasma-scriptengine-applet-declarative.desktop | 1 + .../data/plasma-scriptengine-applet-simple-javascript.desktop | 1 + .../data/plasma-scriptengine-dataengine-javascript.desktop | 1 + .../data/plasma-scriptengine-runner-javascript.desktop | 1 + 8 files changed, 8 insertions(+) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index 4c53733c7..1f19959cd 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Name=plasma-kpart Name[ast]=plasma-kpart +Name[bs]=plasma-kpart Name[ca]=plasma-kpart Name[ca@valencia]=plasma-kpart Name[cs]=plasma-kpart diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 00a9af78f..f4ff7a9bb 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -2,6 +2,7 @@ Name=Save remote widgets' policies Name[ar]=احفظ سياسات الودجات البعيدة Name[ast]=Guardáu de polítiques d'elementos gráficos remotos +Name[bs]=Sačuvaj smjernice za udaljene grafičke kontrole Name[ca]=Desa les polítiques d'estris remots Name[ca@valencia]=Alça les polítiques d'estris remots Name[cs]=Uložit zásady vzdálených widgetů diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index 2a99e29fe..b292d3fa0 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -2,6 +2,7 @@ Name=Plasma JavaScript Addon Name[ast]=Complementu de JavaScript pa Plasma Name[bg]=Добавка за JavaScript на Plasma +Name[bs]=Plazma javaskriptni dodatak Name[ca]=Complement del JavaScript pel Plasma Name[ca@valencia]=Complement del JavaScript pel Plasma Name[cs]=Doplněk Plasmy JavaScript diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 1b7dc0b25..108a8eb57 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -2,6 +2,7 @@ Name=Javascript Addon Name[ast]=Complementu de JavaScript Name[bg]=Добавка за JavaScript +Name[bs]=Javaskriptni dodatak Name[ca]=Complement del Javascript Name[ca@valencia]=Complement del Javascript Name[cs]=Doplněk JavaScript diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 07926e270..af624b908 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Name=Declarative widget Name[ast]=Elementu gráficu declarativu +Name[bs]=Deklarativna grafička kontrola Name[ca]=Estri declaratiu Name[ca@valencia]=Estri declaratiu Name[cs]=Deklarativní widget diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index 8c0085235..bfd08c9f3 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -5,6 +5,7 @@ Name[ast]=Elementu gráficu JavaScript Name[be@latin]=Widžet „JavaScript” Name[bg]=Джаджа JavaScript Name[bn_IN]=JavaScript Widget +Name[bs]=Javascript grafička kontrola Name[ca]=Estri del JavaScript Name[ca@valencia]=Estri del JavaScript Name[cs]=JavaScript Widget diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index fa57a8651..b4f34919c 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -2,6 +2,7 @@ Name=JavaScript DataEngine Name[ar]=مشغل جافا سكربت Name[ast]=Motor de datos JavaScript +Name[bs]=Javascript pogon podataka Name[ca]=Motor de dades de JavaScript Name[ca@valencia]=Motor de dades de JavaScript Name[cs]=Datový nástroj JavaScript diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index 6d3298ea6..212aaa7a8 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -5,6 +5,7 @@ Name[ast]=Motor de javascript Name[be@latin]=Uklučeńnie „JavaScript” Name[bg]=Изпълнение на JavaScript Name[bn_IN]=JavaScript Runner +Name[bs]=Javascript izvođač Name[ca]=Executor de JavaScript Name[ca@valencia]=Executor de JavaScript Name[cs]=Spouštěč JavaScriptu From ff47808ef281acff37da09ce701b3b29419e76ad Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 17 May 2011 16:39:15 +0200 Subject: [PATCH 21/82] check against a null qscriptengine --- .../plasmoid/declarativeappletscript.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index f3f88574e..a33f38850 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -135,6 +135,9 @@ bool DeclarativeAppletScript::init() void DeclarativeAppletScript::collectGarbage() { + if (!m_engine) { + return; + } m_engine->collectGarbage(); } @@ -195,6 +198,9 @@ QScriptValue DeclarativeAppletScript::newPlasmaSvg(QScriptContext *context, QScr QScriptValue DeclarativeAppletScript::variantToScriptValue(QVariant var) { + if (!m_engine) { + return QScriptValue(); + } return m_engine->newVariant(var); } @@ -297,6 +303,9 @@ void DeclarativeAppletScript::popupEvent(bool popped) void DeclarativeAppletScript::dataUpdated(const QString &name, const Plasma::DataEngine::Data &data) { + if (!m_engine) { + return; + } QScriptValueList args; args << m_engine->toScriptValue(name) << m_engine->toScriptValue(data); @@ -308,6 +317,9 @@ void DeclarativeAppletScript::extenderItemRestored(Plasma::ExtenderItem* item) if (!m_env) { return; } + if (!m_engine) { + return; + } QScriptValueList args; args << m_engine->newQObject(item, QScriptEngine::AutoOwnership, QScriptEngine::PreferExistingWrapperObject); @@ -347,6 +359,10 @@ ScriptEnv *DeclarativeAppletScript::scriptEnv() void DeclarativeAppletScript::setupObjects() { m_engine = m_declarativeWidget->scriptEngine(); + if (!m_engine) { + return; + } + connect(m_engine, SIGNAL(signalHandlerException(const QScriptValue &)), this, SLOT(signalHandlerException(const QScriptValue &))); From 9003c18a0e31c882974138f5a8aef5dc5f6838ab Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 20 May 2011 09:10:19 +0200 Subject: [PATCH 22/82] SVN_SILENT made messages (.desktop file) --- scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 2 ++ .../data/plasma-scriptengine-runner-javascript.desktop | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index b292d3fa0..14a0d3d59 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -13,6 +13,7 @@ Name[en_GB]=Plasma JavaScript Addon Name[es]=Complemento de JavaScript para Plasma Name[et]=Plasma JavaScripti lisa Name[eu]=Plasma JavaScript gehigarria +Name[fi]=Plasma JavaScript -lisäosa Name[fr]=Module complémentaire Javascript de Plasma Name[he]=תוסף עבור JavaScript של Plasma Name[hi]=प्लाज़मा जावा-स्क्रिप्ट एडोन diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 108a8eb57..8bd43958b 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -13,6 +13,7 @@ Name[en_GB]=Javascript Addon Name[es]=Complemento de JavaScript Name[et]=JavaScripti lisa Name[eu]=Javascript gehigarria +Name[fi]=Javascript-lisäosa Name[fr]=Module complémentaire Javascript Name[he]=תוסף JavaScript Name[hi]=जावास्क्रिप्ट एडोन @@ -63,6 +64,7 @@ Comment[en_GB]=Addons for Javascript Plasma plugins Comment[es]=Añadidos para complementos de JavaScript para Plasma Comment[et]=JavaScripti Plasma pluginate lisad Comment[eu]=Javascript Plasma pluginentzako gehigarriak +Comment[fi]=Lisäosia JavaScript Plasma -liitännäisille Comment[fr]=Module complémentaire pour les modules externes en Javascript de Plasma Comment[he]=תוספים לתוספי JavaScript של Plasma Comment[hr]=Dodaci za priključke za Javascript Plasma diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index 212aaa7a8..ba3b470de 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -18,7 +18,7 @@ Name[eo]=Ĝavaskripta ruligilo Name[es]=Motor de javascript Name[et]=JavaScripti käivitaja Name[eu]=JavaScript abiarazlea -Name[fi]=JavaScript-suorittaja +Name[fi]=JavaScript-suoritusohjelma Name[fr]=Lanceur JavaScript Name[fy]=JavaSkript rinner Name[ga]=Feidhmitheoir JavaScript @@ -92,7 +92,7 @@ Comment[eo]=Ĝavaskripta ruligilo Comment[es]=Motor de javascript Comment[et]=JavaScripti käivitaja Comment[eu]=JavaScript abiarazlea -Comment[fi]=JavaScript-suorittaja +Comment[fi]=JavaScript-suoritusohjelma Comment[fr]=Lanceur JavaScript Comment[fy]=JavaSkript rinner Comment[ga]=Feidhmitheoir JavaScript From 3aeded5802d66e85b5a121f7d4bd554cc80f9a38 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 27 May 2011 09:00:54 +0200 Subject: [PATCH 23/82] SVN_SILENT made messages (.desktop file) --- .../data/plasma-scriptengine-runner-javascript.desktop | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index ba3b470de..b6f5804e5 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -68,6 +68,7 @@ Name[te]=జావాస్క్రిప్‍ట్ నడుపునది Name[tg]=Иҷрогари JavaScript Name[th]=ตัวประมวลผลจาวาสคริปต์ Name[tr]=JavaScript Çalıştırıcı +Name[ug]=JavaScript ئىجراچىسى Name[uk]=Механізм запуску JavaScript Name[wa]=Enondeu JavaScript Name[x-test]=xxJavaScript Runnerxx @@ -142,6 +143,7 @@ Comment[te]=జావాస్క్రిప్‍ట్ నడుపునద Comment[tg]=Иҷрогари JavaScript Comment[th]=ตัวประมวลผลจาวาสคริปต์ Comment[tr]=JavaScript Çalıştırıcı +Comment[ug]=JavaScript ئىجراچىسى Comment[uk]=Механізм запуску JavaScript Comment[x-test]=xxJavaScript Runnerxx Comment[zh_CN]=JavaScript 运行器 From 6924341329f586af5303aee67928fc3347f162d1 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 27 May 2011 11:33:41 +0200 Subject: [PATCH 24/82] tidy up the sources and put the app finding code from desktopscripting here * better name for jsscriptenv (it's about adding gui, as declarative is about add qml) * break extension code out to their own sources for clarity --- scriptengines/javascript/CMakeLists.txt | 10 +- .../javascript/common/extension_io.cpp | 126 +++++++++ .../javascript/common/extension_launchapp.cpp | 253 ++++++++++++++++++ .../{jsscriptenv.cpp => guiscriptenv.cpp} | 0 scriptengines/javascript/common/scriptenv.cpp | 113 +------- scriptengines/javascript/common/scriptenv.h | 4 + 6 files changed, 393 insertions(+), 113 deletions(-) create mode 100644 scriptengines/javascript/common/extension_io.cpp create mode 100644 scriptengines/javascript/common/extension_launchapp.cpp rename scriptengines/javascript/common/{jsscriptenv.cpp => guiscriptenv.cpp} (100%) diff --git a/scriptengines/javascript/CMakeLists.txt b/scriptengines/javascript/CMakeLists.txt index 1451e164b..8b62d6816 100644 --- a/scriptengines/javascript/CMakeLists.txt +++ b/scriptengines/javascript/CMakeLists.txt @@ -8,8 +8,10 @@ if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION) endif(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION) set(simple_javascript_engine_SRCS + common/extension_launchapp.cpp + common/extension_io.cpp + common/guiscriptenv.cpp common/javascriptaddonpackagestructure.cpp - common/jsscriptenv.cpp plasmoid/abstractjsappletscript.cpp plasmoid/appletauthorization.cpp plasmoid/jsappletinterface.cpp @@ -62,6 +64,8 @@ install(FILES data/plasma-scriptengine-applet-simple-javascript.desktop DESTINAT # RUNNER set(javascript_runner_engine_SRCS + common/extension_launchapp.cpp + common/extension_io.cpp common/javascriptaddonpackagestructure.cpp common/scriptenv.cpp runner/javascriptrunner.cpp @@ -83,6 +87,8 @@ install(FILES data/plasma-scriptengine-runner-javascript.desktop DESTINATION ${S # DATAENGINE set(javascript_dataengine_engine_SRCS + common/extension_launchapp.cpp + common/extension_io.cpp common/javascriptaddonpackagestructure.cpp common/scriptenv.cpp dataengine/javascriptdataengine.cpp @@ -119,6 +125,8 @@ install(FILES data/plasma-javascriptaddon.desktop DESTINATION ${SERVICETYPES_INS #DECLARATIVE APPLET set(declarative_appletscript_SRCS + common/extension_launchapp.cpp + common/extension_io.cpp common/javascriptaddonpackagestructure.cpp common/declarativescriptenv.cpp declarative/packageaccessmanager.cpp diff --git a/scriptengines/javascript/common/extension_io.cpp b/scriptengines/javascript/common/extension_io.cpp new file mode 100644 index 000000000..aa8e2393a --- /dev/null +++ b/scriptengines/javascript/common/extension_io.cpp @@ -0,0 +1,126 @@ +/* + * Copyright 2011 Aaron Seigo + * + * This program 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, or + * (at your option) any later version. + * + * This program 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 General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "scriptenv.h" + +#include + +#include +#include +#include +#include + +QScriptValue ScriptEnv::openUrl(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return false; + } + + QScriptValue v = context->argument(0); + KUrl url = v.isString() ? KUrl(v.toString()) : qscriptvalue_cast(v); + + if (!url.isValid()) { + return false; + } + + ScriptEnv *env = ScriptEnv::findScriptEnv(engine); + if (!env) { + return false; + } + + if (!(env->m_allowedUrls & AppLaunching) && + !((env->m_allowedUrls & HttpUrls) && (url.protocol() == "http" || url.protocol() == "https"))) { + return false; + } + + new KRun(url, 0); + return true; +} + +// TODO these should throw an exception +QScriptValue ScriptEnv::getUrl(QScriptContext *context, QScriptEngine *engine) +{ + if (context->argumentCount() == 0) { + return engine->undefinedValue(); + } + + QScriptValue v = context->argument(0); + KUrl url = v.isString() ? KUrl(v.toString()) : qscriptvalue_cast(v); + + if (!url.isValid()) { + return engine->undefinedValue(); + } + + ScriptEnv *env = ScriptEnv::findScriptEnv(engine); + if (!env) { + //kDebug() << "findScriptEnv failed"; + return engine->undefinedValue(); + } + + if (url.isLocalFile()) { + if (!(env->m_allowedUrls & LocalUrls)) { + return engine->undefinedValue(); + } + } else if (!(env->m_allowedUrls & NetworkUrls) && + !((env->m_allowedUrls & HttpUrls) && (url.protocol() == "http" || url.protocol() == "https"))) { + return engine->undefinedValue(); + } + + KIO::Job *job = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo); + return engine->newQObject(job); +} + +QScriptValue ScriptEnv::userDataPath(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return QDir::homePath(); + } + + const QString type = context->argument(0).toString(); + if (type.isEmpty()) { + return QDir::homePath(); + } + + if (context->argumentCount() > 1) { + const QString filename = context->argument(1).toString(); + return KStandardDirs::locateLocal(type.toLatin1(), filename); + } + + if (type.compare("desktop", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::desktopPath(); + } else if (type.compare("autostart", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::autostartPath(); + } else if (type.compare("documents", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::documentPath(); + } else if (type.compare("music", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::musicPath(); + } else if (type.compare("video", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::videosPath(); + } else if (type.compare("downloads", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::downloadPath(); + } else if (type.compare("pictures", Qt::CaseInsensitive) == 0) { + return KGlobalSettings::picturesPath(); + } + + return QString(); +} + + diff --git a/scriptengines/javascript/common/extension_launchapp.cpp b/scriptengines/javascript/common/extension_launchapp.cpp new file mode 100644 index 000000000..93b7c29ca --- /dev/null +++ b/scriptengines/javascript/common/extension_launchapp.cpp @@ -0,0 +1,253 @@ +/* + * Copyright 2011 Aaron Seigo + * + * This program 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, or + * (at your option) any later version. + * + * This program 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 General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "scriptenv.h" + +#include +#include +#include +#include +#include +#include + +QScriptValue ScriptEnv::runApplication(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return false; + } + + KUrl::List urls; + if (context->argumentCount() > 1) { + urls = qscriptvalue_cast(context->argument(1)); + } + + const QString app = context->argument(0).toString(); + + const QString exec = KGlobal::dirs()->findExe(app); + if (!exec.isEmpty()) { + return KRun::run(exec, urls, 0); + } + + KService::Ptr service = KService::serviceByStorageId(app); + if (service) { + return KRun::run(*service, urls, 0); + } + + return false; +} + +QScriptValue ScriptEnv::runCommand(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine); + + if (context->argumentCount() == 0) { + return false; + } + + const QString exec = KGlobal::dirs()->findExe(context->argument(0).toString()); + if (!exec.isEmpty()) { + QString args; + if (context->argumentCount() > 1) { + const QStringList argList = qscriptvalue_cast(context->argument(1)); + if (!argList.isEmpty()) { + args = ' ' + KShell::joinArgs(argList); + } + } + + return KRun::runCommand(exec + args, 0); + } + + return false; +} + +QScriptValue ScriptEnv::applicationExists(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return false; + } + + const QString application = context->argument(0).toString(); + if (application.isEmpty()) { + return false; + } + + // first, check for it in $PATH + if (!KStandardDirs::findExe(application).isEmpty()) { + return true; + } + + if (KService::serviceByStorageId(application)) { + return true; + } + + if (application.contains("'")) { + // apostrophes just screw up the trader lookups below, so check for it + return false; + } + + // next, consult ksycoca for an app by that name + if (!KServiceTypeTrader::self()->query("Application", QString("Name =~ '%1'").arg(application)).isEmpty()) { + return true; + } + + // next, consult ksycoca for an app by that generic name + if (!KServiceTypeTrader::self()->query("Application", QString("GenericName =~ '%1'").arg(application)).isEmpty()) { + return true; + } + + return false; +} + +QScriptValue ScriptEnv::defaultApplication(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return false; + } + + const QString application = context->argument(0).toString(); + if (application.isEmpty()) { + return false; + } + + const bool storageId = context->argumentCount() < 2 ? false : context->argument(1).toBool(); + + // FIXME: there are some pretty horrible hacks below, in the sense that they assume a very + // specific implementation system. there is much room for improvement here. see + // kdebase-runtime/kcontrol/componentchooser/ for all the gory details ;) + if (application.compare("mailer", Qt::CaseInsensitive) == 0) { + KEMailSettings settings; + + // in KToolInvocation, the default is kmail; but let's be friendlier :) + QString command = settings.getSetting(KEMailSettings::ClientProgram); + if (command.isEmpty()) { + if (KService::Ptr kontact = KService::serviceByStorageId("kontact")) { + return storageId ? kontact->storageId() : kontact->exec(); + } else if (KService::Ptr kmail = KService::serviceByStorageId("kmail")) { + return storageId ? kmail->storageId() : kmail->exec(); + } + } + + if (!command.isEmpty()) { + if (settings.getSetting(KEMailSettings::ClientTerminal) == "true") { + KConfigGroup confGroup(KGlobal::config(), "General"); + const QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", + QString::fromLatin1("konsole")); + command = preferredTerminal + QString::fromLatin1(" -e ") + command; + } + + return command; + } + } else if (application.compare("browser", Qt::CaseInsensitive) == 0) { + KConfigGroup config(KGlobal::config(), "General"); + QString browserApp = config.readPathEntry("BrowserApplication", QString()); + if (browserApp.isEmpty()) { + const KService::Ptr htmlApp = KMimeTypeTrader::self()->preferredService(QLatin1String("text/html")); + if (htmlApp) { + browserApp = storageId ? htmlApp->storageId() : htmlApp->exec(); + } + } else if (browserApp.startsWith('!')) { + browserApp = browserApp.mid(1); + } + + return browserApp; + } else if (application.compare("terminal", Qt::CaseInsensitive) == 0) { + KConfigGroup confGroup(KGlobal::config(), "General"); + return confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole")); + } else if (application.compare("filemanager", Qt::CaseInsensitive) == 0) { + KService::Ptr service = KMimeTypeTrader::self()->preferredService("inode/directory"); + if (service) { + return storageId ? service->storageId() : service->exec(); + } + } else if (application.compare("windowmanager", Qt::CaseInsensitive) == 0) { + KConfig cfg("ksmserverrc", KConfig::NoGlobals); + KConfigGroup confGroup(&cfg, "General"); + return confGroup.readEntry("windowManager", QString::fromLatin1("konsole")); + } else if (KService::Ptr service = KMimeTypeTrader::self()->preferredService(application)) { + return storageId ? service->storageId() : service->exec(); + } else { + // try the files in share/apps/kcm_componentchooser/ + const QStringList services = KGlobal::dirs()->findAllResources("data","kcm_componentchooser/*.desktop", KStandardDirs::NoDuplicates); + //kDebug() << "ok, trying in" << services.count(); + foreach (const QString &service, services) { + KConfig config(service, KConfig::SimpleConfig); + KConfigGroup cg = config.group(QByteArray()); + const QString type = cg.readEntry("valueName", QString()); + //kDebug() << " checking" << service << type << application; + if (type.compare(application, Qt::CaseInsensitive) == 0) { + KConfig store(cg.readPathEntry("storeInFile", "null")); + KConfigGroup storeCg(&store, cg.readEntry("valueSection", QString())); + const QString exec = storeCg.readPathEntry(cg.readEntry("valueName", "kcm_componenchooser_null"), + cg.readEntry("defaultImplementation", QString())); + if (!exec.isEmpty()) { + return exec; + } + + break; + } + } + } + + return false; +} + +QScriptValue ScriptEnv::applicationPath(QScriptContext *context, QScriptEngine *engine) +{ + Q_UNUSED(engine) + if (context->argumentCount() == 0) { + return false; + } + + const QString application = context->argument(0).toString(); + if (application.isEmpty()) { + return false; + } + + // first, check for it in $PATH + const QString path = KStandardDirs::findExe(application); + if (!path.isEmpty()) { + return path; + } + + if (KService::Ptr service = KService::serviceByStorageId(application)) { + return KStandardDirs::locate("apps", service->entryPath()); + } + + if (application.contains("'")) { + // apostrophes just screw up the trader lookups below, so check for it + return QString(); + } + + // next, consult ksycoca for an app by that name + KService::List offers = KServiceTypeTrader::self()->query("Application", QString("Name =~ '%1'").arg(application)); + if (offers.isEmpty()) { + // next, consult ksycoca for an app by that generic name + offers = KServiceTypeTrader::self()->query("Application", QString("GenericName =~ '%1'").arg(application)); + } + + if (!offers.isEmpty()) { + KService::Ptr offer = offers.first(); + return KStandardDirs::locate("apps", offer->entryPath()); + } + + return QString(); +} + diff --git a/scriptengines/javascript/common/jsscriptenv.cpp b/scriptengines/javascript/common/guiscriptenv.cpp similarity index 100% rename from scriptengines/javascript/common/jsscriptenv.cpp rename to scriptengines/javascript/common/guiscriptenv.cpp diff --git a/scriptengines/javascript/common/scriptenv.cpp b/scriptengines/javascript/common/scriptenv.cpp index d976a9f82..d0061f6d7 100644 --- a/scriptengines/javascript/common/scriptenv.cpp +++ b/scriptengines/javascript/common/scriptenv.cpp @@ -153,118 +153,6 @@ bool ScriptEnv::checkForErrors(bool fatal) return false; } -QScriptValue ScriptEnv::runApplication(QScriptContext *context, QScriptEngine *engine) -{ - Q_UNUSED(engine) - if (context->argumentCount() == 0) { - return false; - } - - KUrl::List urls; - if (context->argumentCount() > 1) { - urls = qscriptvalue_cast(context->argument(1)); - } - - const QString app = context->argument(0).toString(); - - const QString exec = KGlobal::dirs()->findExe(app); - if (!exec.isEmpty()) { - return KRun::run(exec, urls, 0); - } - - KService::Ptr service = KService::serviceByStorageId(app); - if (service) { - return KRun::run(*service, urls, 0); - } - - return false; -} - -QScriptValue ScriptEnv::runCommand(QScriptContext *context, QScriptEngine *engine) -{ - Q_UNUSED(engine); - - if (context->argumentCount() == 0) { - return false; - } - - const QString exec = KGlobal::dirs()->findExe(context->argument(0).toString()); - if (!exec.isEmpty()) { - QString args; - if (context->argumentCount() > 1) { - const QStringList argList = qscriptvalue_cast(context->argument(1)); - if (!argList.isEmpty()) { - args = ' ' + KShell::joinArgs(argList); - } - } - - return KRun::runCommand(exec + args, 0); - } - - return false; -} - -QScriptValue ScriptEnv::openUrl(QScriptContext *context, QScriptEngine *engine) -{ - Q_UNUSED(engine) - if (context->argumentCount() == 0) { - return false; - } - - QScriptValue v = context->argument(0); - KUrl url = v.isString() ? KUrl(v.toString()) : qscriptvalue_cast(v); - - if (!url.isValid()) { - return false; - } - - ScriptEnv *env = ScriptEnv::findScriptEnv(engine); - if (!env) { - return false; - } - - if (!(env->m_allowedUrls & AppLaunching) && - !((env->m_allowedUrls & HttpUrls) && (url.protocol() == "http" || url.protocol() == "https"))) { - return false; - } - - new KRun(url, 0); - return true; -} - -// TODO these should throw an exception -QScriptValue ScriptEnv::getUrl(QScriptContext *context, QScriptEngine *engine) -{ - if (context->argumentCount() == 0) { - return engine->undefinedValue(); - } - - QScriptValue v = context->argument(0); - KUrl url = v.isString() ? KUrl(v.toString()) : qscriptvalue_cast(v); - - if (!url.isValid()) { - return engine->undefinedValue(); - } - - ScriptEnv *env = ScriptEnv::findScriptEnv(engine); - if (!env) { - //kDebug() << "findScriptEnv failed"; - return engine->undefinedValue(); - } - - if (url.isLocalFile()) { - if (!(env->m_allowedUrls & LocalUrls)) { - return engine->undefinedValue(); - } - } else if (!(env->m_allowedUrls & NetworkUrls) && - !((env->m_allowedUrls & HttpUrls) && (url.protocol() == "http" || url.protocol() == "https"))) { - return engine->undefinedValue(); - } - - KIO::Job *job = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo); - return engine->newQObject(job); -} - void ScriptEnv::registerGetUrl(QScriptValue &obj) { QScriptValue get = obj.property("getUrl"); @@ -307,6 +195,7 @@ bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &o } else if ("localio" == extension) { m_allowedUrls |= LocalUrls; registerGetUrl(obj); + obj.setProperty("", m_engine->newFunction(ScriptEnv::runCommand)); return true; } diff --git a/scriptengines/javascript/common/scriptenv.h b/scriptengines/javascript/common/scriptenv.h index a60e687bd..4ec7202d8 100644 --- a/scriptengines/javascript/common/scriptenv.h +++ b/scriptengines/javascript/common/scriptenv.h @@ -82,8 +82,12 @@ private: static QScriptValue print(QScriptContext *context, QScriptEngine *engine); static QScriptValue runApplication(QScriptContext *context, QScriptEngine *engine); static QScriptValue runCommand(QScriptContext *context, QScriptEngine *engine); + static QScriptValue defaultApplication(QScriptContext *context, QScriptEngine *engine); + static QScriptValue applicationPath(QScriptContext *context, QScriptEngine *engine); + static QScriptValue applicationExists(QScriptContext *context, QScriptEngine *engine); static QScriptValue openUrl(QScriptContext *context, QScriptEngine *engine); static QScriptValue getUrl(QScriptContext *context, QScriptEngine *engine); + static QScriptValue userDataPath(QScriptContext *context, QScriptEngine *engine); static QScriptValue listAddons(QScriptContext *context, QScriptEngine *engine); static QScriptValue loadAddon(QScriptContext *context, QScriptEngine *engine); static QScriptValue registerAddon(QScriptContext *context, QScriptEngine *engine); From c02557ffa694c1c476b5ab5747686ed93eed2c34 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 27 May 2011 11:35:14 +0200 Subject: [PATCH 25/82] moves the registration helper methods for io related extensions into extension_io.cpp --- scriptengines/javascript/common/extension_io.cpp | 16 ++++++++++++++++ scriptengines/javascript/common/scriptenv.cpp | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scriptengines/javascript/common/extension_io.cpp b/scriptengines/javascript/common/extension_io.cpp index aa8e2393a..c25688153 100644 --- a/scriptengines/javascript/common/extension_io.cpp +++ b/scriptengines/javascript/common/extension_io.cpp @@ -123,4 +123,20 @@ QScriptValue ScriptEnv::userDataPath(QScriptContext *context, QScriptEngine *eng return QString(); } +void ScriptEnv::registerGetUrl(QScriptValue &obj) +{ + QScriptValue get = obj.property("getUrl"); + if (!get.isValid()) { + obj.setProperty("getUrl", m_engine->newFunction(ScriptEnv::getUrl)); + } +} + +void ScriptEnv::registerOpenUrl(QScriptValue &obj) +{ + QScriptValue value = obj.property("openUrl"); + if (!value.isValid()) { + obj.setProperty("openUrl", m_engine->newFunction(ScriptEnv::openUrl)); + } +} + diff --git a/scriptengines/javascript/common/scriptenv.cpp b/scriptengines/javascript/common/scriptenv.cpp index d0061f6d7..1544fa027 100644 --- a/scriptengines/javascript/common/scriptenv.cpp +++ b/scriptengines/javascript/common/scriptenv.cpp @@ -153,22 +153,6 @@ bool ScriptEnv::checkForErrors(bool fatal) return false; } -void ScriptEnv::registerGetUrl(QScriptValue &obj) -{ - QScriptValue get = obj.property("getUrl"); - if (!get.isValid()) { - obj.setProperty("getUrl", m_engine->newFunction(ScriptEnv::getUrl)); - } -} - -void ScriptEnv::registerOpenUrl(QScriptValue &obj) -{ - QScriptValue value = obj.property("openUrl"); - if (!value.isValid()) { - obj.setProperty("openUrl", m_engine->newFunction(ScriptEnv::openUrl)); - } -} - bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &obj) { kDebug() << extension; From 84bb43942d7132ce62fc272e7e7c81f7b4fc143d Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 29 May 2011 10:09:07 +0200 Subject: [PATCH 26/82] SVN_SILENT made messages (.desktop file) --- remotewidgetshelper/kcm_remotewidgets.actions | 4 ++-- .../data/plasma-scriptengine-applet-declarative.desktop | 4 ++-- .../data/plasma-scriptengine-applet-simple-javascript.desktop | 4 ++-- .../data/plasma-scriptengine-dataengine-javascript.desktop | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index f4ff7a9bb..0b569e6a2 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -14,7 +14,7 @@ Name[es]=Guardado de políticas de elementos gráficos remotos Name[et]=Välisvidinate reeglite salvestamine Name[eu]=Gorde urruneko trepeten politikak Name[fi]=Tallenna etäkäyttöliittymäkomponenttien menettelytavat -Name[fr]=Enregistrer la stratégie des gadgets distants +Name[fr]=Enregistrer la politique des composants graphiques distants Name[ga]=Sábháil polasaithe um giuirléidí cianda Name[he]=שמירת מדיניות של ווידג׳טים מרוחקים Name[hr]=Spremi pravila za udaljene widgete @@ -68,7 +68,7 @@ Description[es]=Impide que el sistema guarde políticas de elementos gráficos P Description[et]=Takistab süsteemil salvestamast Plasma välisvidinate reegleid Description[eu]=Sistemak urruneko plasma trepeten politikak gorde ditzan galarazten du Description[fi]=Estää järjestelmää tallentamasta etäplasmakäyttöliittymäkomponenttien menettelytapoja -Description[fr]=Empêche le système d'enregistrer la stratégie des gadgets distant +Description[fr]=Empêche le système d'enregistrer la politique des composants graphiques distants Description[ga]=Ná lig don chóras polasaithe um giuirléidí cianda plasma a shábháil Description[he]=מונע מהמערכת מלשמור מדיניות של ווידג׳טים מרוחקים Description[hr]=Brani sustavu spremanje pravila za udaljene widgete Plasme diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index af624b908..d9e0b0dd1 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -12,7 +12,7 @@ Name[en_GB]=Declarative widget Name[es]=Elemento gráfico declarativo Name[et]=Deklaratiivne vidin Name[eu]=Trepeta ezagutarazlea -Name[fr]=Élément graphique « Declarative » +Name[fr]=Composant graphique « Declarative » Name[he]=ווידג׳ט מוצהר Name[hr]=Deklarativni widget Name[hu]=Deklaratív widget @@ -55,7 +55,7 @@ Comment[es]=Elemento gráfico nativo de Plasma escrito en QML y JavaScript Comment[et]=QML-is ja JavaScriptis kirjutatud Plasma vidin Comment[eu]=Plasma jatorrizko trepeta QML eta JavaScript-en idatzia Comment[fi]=Natiivi, QML-pohjainen Plasma-sovelma -Comment[fr]=Plasmoïde natif Plasma écrit en QML et JavaScript +Comment[fr]=Composant graphique natif de Plasma écrit en QML et JavaScript Comment[he]=ווידג׳טים של Plasma הנכתבים ב־QML וב־JavaScript Comment[hr]=Izvorni Plasma widget napisan u QML-u i JavaScriptu Comment[hu]=QML-ben és JavaScriptben írt natív Plazma-widget diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index bfd08c9f3..432b344f2 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -19,7 +19,7 @@ Name[es]=Elemento gráfico JavaScript Name[et]=JavaScripti vidin Name[eu]=JavaScript trepeta Name[fi]=JavaScript-sovelma -Name[fr]=Plasmoïde JavaScript +Name[fr]=Composant graphique JavaScript Name[fy]=JavaSkript Widget Name[ga]=Giuirléid JavaScript Name[gl]=Widget de JavaScript @@ -91,7 +91,7 @@ Comment[es]=Elemento gráfico nativo de Plasma escrito en JavaScript Comment[et]=JavaScriptis kirjutatud Plasma vidin Comment[eu]=Plasma jatorrizko trepeta JavaScript-en idatzia Comment[fi]=Natiivi, JavaScript-pohjainen Plasma-sovelma -Comment[fr]=Plasmoïde natif Plasma écrit en JavaScript +Comment[fr]=Composant graphique natif de Plasma écrit en JavaScript Comment[fy]=Plasma widget skreaun yn JavaSkript Comment[ga]=Giuirléid dhúchasach Plasma, scríofa i JavaScript Comment[gl]=Widget nativo de Plasma escrito en JavaScript diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index b4f34919c..a6e637afa 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -16,7 +16,7 @@ Name[es]=Motor de datos JavaScript Name[et]=JavaScripti andmemootor Name[eu]=JavaScript datu-motorea Name[fi]=JavaScript-datakone -Name[fr]=Moteur de donnée JavaScript +Name[fr]=Moteur de données JavaScript Name[fy]=JavaSkript gegevens motor Name[ga]=Inneall Sonraí JavaScript Name[gl]=Motor de datos de JavaScript From be2cf974a000407d0e73e9a6d87c2f9c70f6f72f Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 3 Jun 2011 11:20:43 +0200 Subject: [PATCH 27/82] stip geometry information from applet config in newspaper From 5759af35d11f98777b01beb9b7eb39b04beb069c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 3 Jun 2011 22:03:39 +0200 Subject: [PATCH 28/82] duplicated from libplasma now --- declarativeimports/core/corebindingsplugin.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/declarativeimports/core/corebindingsplugin.h b/declarativeimports/core/corebindingsplugin.h index 6b452f827..d0a61517a 100644 --- a/declarativeimports/core/corebindingsplugin.h +++ b/declarativeimports/core/corebindingsplugin.h @@ -26,8 +26,6 @@ #include -Q_DECLARE_METATYPE(Plasma::Service*) - class CoreBindingsPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT From b52fe46573cacd368397dd66259a78961d6af010 Mon Sep 17 00:00:00 2001 From: Anne-Marie Mahfouf Date: Sat, 4 Jun 2011 09:10:59 +0200 Subject: [PATCH 29/82] fix build, duplicated from libplasma --- scriptengines/javascript/simplebindings/dataengine.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/scriptengines/javascript/simplebindings/dataengine.h b/scriptengines/javascript/simplebindings/dataengine.h index 2774ee9a8..df906984d 100644 --- a/scriptengines/javascript/simplebindings/dataengine.h +++ b/scriptengines/javascript/simplebindings/dataengine.h @@ -30,8 +30,6 @@ using namespace Plasma; -Q_DECLARE_METATYPE(Service*) -Q_DECLARE_METATYPE(ServiceJob*) #ifndef DECLARATIVE_BINDING Q_DECLARE_METATYPE(QVariant) #endif From d3610438c1bc3b4f45249d0f8587b9c16354c657 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sat, 4 Jun 2011 16:23:16 +0200 Subject: [PATCH 30/82] fix compile; nasty little hack to support QMap --- .../javascript/simplebindings/dataengine.cpp | 6 ++++- .../javascript/simplebindings/dataengine.h | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/scriptengines/javascript/simplebindings/dataengine.cpp b/scriptengines/javascript/simplebindings/dataengine.cpp index 98837b2ea..bc3f467d3 100644 --- a/scriptengines/javascript/simplebindings/dataengine.cpp +++ b/scriptengines/javascript/simplebindings/dataengine.cpp @@ -54,11 +54,15 @@ void serviceJobFromQScriptValue(const QScriptValue &scriptValue, ServiceJobPtr & serviceJob = static_cast(obj); } +typedef QMap< QString, QString > StringStringMap; +Q_DECLARE_METATYPE(StringStringMap) + void registerDataEngineMetaTypes(QScriptEngine *engine) { qRegisterMetaType("Plasma::DataEngine::Data"); qRegisterMetaType("DataEngine::Data"); - qScriptRegisterMapMetaType(engine); + qScriptRegisterVariantMapMetaType(engine); + qScriptRegisterMapMetaType(engine); qScriptRegisterMetaType(engine, qScriptValueFromService, serviceFromQScriptValue); qScriptRegisterMetaType(engine, qScriptValueFromDataEngine, dataEngineFromQScriptValue); qScriptRegisterMetaType(engine, qScriptValueFromServiceJob, serviceJobFromQScriptValue); diff --git a/scriptengines/javascript/simplebindings/dataengine.h b/scriptengines/javascript/simplebindings/dataengine.h index df906984d..02fda0124 100644 --- a/scriptengines/javascript/simplebindings/dataengine.h +++ b/scriptengines/javascript/simplebindings/dataengine.h @@ -38,6 +38,21 @@ Q_DECLARE_METATYPE(DataEngine::Data) template QScriptValue qScriptValueFromMap(QScriptEngine *eng, const M &map) +{ + //kDebug() << "qScriptValueFromMap called"; + QScriptValue obj = eng->newObject(); + typename M::const_iterator begin = map.constBegin(); + typename M::const_iterator end = map.constEnd(); + typename M::const_iterator it; + for (it = begin; it != end; ++it) { + obj.setProperty(it.key(), qScriptValueFromValue(eng, it.value())); + } + + return obj; +} + +template +QScriptValue qScriptValueFromVariantMap(QScriptEngine *eng, const M &map) { //kDebug() << "qScriptValueFromMap called"; QScriptValue obj = eng->newObject(); @@ -68,6 +83,18 @@ void qScriptValueToMap(const QScriptValue &value, M &map) } } +template +int qScriptRegisterVariantMapMetaType( + QScriptEngine *engine, + const QScriptValue &prototype = QScriptValue() +#ifndef qdoc + , T * /* dummy */ = 0 +#endif +) +{ + return qScriptRegisterMetaType(engine, qScriptValueFromVariantMap, qScriptValueToMap, prototype); +} + template int qScriptRegisterMapMetaType( QScriptEngine *engine, From c77d815ec75f764bca5b2fe2a5fc710f81b63ea7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 5 Jun 2011 14:11:19 +0200 Subject: [PATCH 31/82] export servicejob in qml --- declarativeimports/core/corebindingsplugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/declarativeimports/core/corebindingsplugin.cpp b/declarativeimports/core/corebindingsplugin.cpp index d6ab7e617..460526349 100644 --- a/declarativeimports/core/corebindingsplugin.cpp +++ b/declarativeimports/core/corebindingsplugin.cpp @@ -54,6 +54,8 @@ void CoreBindingsPlugin::registerTypes(const char *uri) qmlRegisterInterface("Service"); qRegisterMetaType("Service"); + qmlRegisterInterface("ServiceJob"); + qRegisterMetaType("ServiceJob"); /*qmlRegisterInterface("DataSource"); qRegisterMetaType("DataSource");*/ From ccdb4cebdfc7745c13ba4a0e5c2ffa2cd0d3d910 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 6 Jun 2011 16:47:00 +0200 Subject: [PATCH 32/82] sync dialog size when a declarativeitem changes size --- .../core/declarativeitemcontainer.cpp | 30 +++++++++++++++---- .../core/declarativeitemcontainer_p.h | 7 ++++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/declarativeimports/core/declarativeitemcontainer.cpp b/declarativeimports/core/declarativeitemcontainer.cpp index c71f13f4b..4d5ed88e1 100644 --- a/declarativeimports/core/declarativeitemcontainer.cpp +++ b/declarativeimports/core/declarativeitemcontainer.cpp @@ -19,6 +19,8 @@ #include "declarativeitemcontainer_p.h" +#include + DeclarativeItemContainer::DeclarativeItemContainer(QGraphicsItem *parent) : QGraphicsWidget(parent) { @@ -31,7 +33,7 @@ DeclarativeItemContainer::~DeclarativeItemContainer() void DeclarativeItemContainer::setDeclarativeItem(QDeclarativeItem *item, bool reparent) { if (m_declarativeItem) { - m_declarativeItem.data()->removeSceneEventFilter(this); + disconnect(m_declarativeItem.data(), 0, this, 0); } m_declarativeItem = item; if (reparent) { @@ -40,7 +42,8 @@ void DeclarativeItemContainer::setDeclarativeItem(QDeclarativeItem *item, bool r setMinimumWidth(item->implicitWidth()); setMinimumHeight(item->implicitHeight()); resize(item->width(), item->height()); - item->installSceneEventFilter(this); + connect(m_declarativeItem.data(), SIGNAL(widthChanged()), this, SLOT(widthChanged())); + connect(m_declarativeItem.data(), SIGNAL(heightChanged()), this, SLOT(heightChanged())); } QDeclarativeItem *DeclarativeItemContainer::declarativeItem() const @@ -56,11 +59,26 @@ void DeclarativeItemContainer::resizeEvent(QGraphicsSceneResizeEvent *event) } } -bool DeclarativeItemContainer::sceneEventFilter(QGraphicsItem *watched, QEvent *event) +void DeclarativeItemContainer::widthChanged() { - if (event->type() == QEvent::GraphicsSceneResize) { - resize(watched->boundingRect().size()); + if (!m_declarativeItem) { + return; } - return QGraphicsWidget::sceneEventFilter(watched, event); + QSizeF newSize(size()); + newSize.setWidth(m_declarativeItem.data()->width()); + resize(newSize); } + +void DeclarativeItemContainer::heightChanged() +{ + if (!m_declarativeItem) { + return; + } + + QSizeF newSize(size()); + newSize.setHeight(m_declarativeItem.data()->height()); + resize(newSize); +} + +#include "declarativeitemcontainer_p.moc" diff --git a/declarativeimports/core/declarativeitemcontainer_p.h b/declarativeimports/core/declarativeitemcontainer_p.h index 1cbef3d22..a92ce19bb 100644 --- a/declarativeimports/core/declarativeitemcontainer_p.h +++ b/declarativeimports/core/declarativeitemcontainer_p.h @@ -28,6 +28,8 @@ class DeclarativeItemContainer : public QGraphicsWidget { + Q_OBJECT + public: DeclarativeItemContainer(QGraphicsItem *parent = 0); ~DeclarativeItemContainer(); @@ -37,7 +39,10 @@ public: protected: void resizeEvent(QGraphicsSceneResizeEvent *event); - bool sceneEventFilter(QGraphicsItem *watched, QEvent *event); + +protected Q_SLOTS: + void widthChanged(); + void heightChanged(); private: QWeakPointer m_declarativeItem; From 90ecc7353677b6ff505593b3a4da8e8701ca80eb Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 6 Jun 2011 17:33:02 +0200 Subject: [PATCH 33/82] return the correct mainItem() --- declarativeimports/core/dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index ac900806d..b2daf6447 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -44,7 +44,7 @@ DialogProxy::~DialogProxy() QGraphicsObject *DialogProxy::mainItem() const { - return m_dialog->graphicsWidget(); + return m_mainItem.data(); } void DialogProxy::setMainItem(QGraphicsObject *mainItem) From f000f07b088259974ecf54ecb2f77412bd053cbf Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 7 Jun 2011 16:40:33 +0200 Subject: [PATCH 34/82] make the notify signals actually be emitted --- declarativeimports/core/dialog.cpp | 29 +++++++++++++++++++++++++++-- declarativeimports/core/dialog.h | 15 ++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index b2daf6447..831c0bdb3 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -33,6 +33,7 @@ DialogProxy::DialogProxy(QObject *parent) : QObject(parent) { m_dialog = new Plasma::Dialog(); + m_dialog->installEventFilter(this); m_flags = m_dialog->windowFlags(); } @@ -152,6 +153,16 @@ void DialogProxy::setY(int y) m_dialog->move(m_dialog->pos().x(), y); } +int DialogProxy::width() const +{ + return m_dialog->size().width(); +} + +int DialogProxy::height() const +{ + return m_dialog->size().height(); +} + int DialogProxy::windowFlags() const { return (int)m_dialog->windowFlags(); @@ -166,8 +177,22 @@ void DialogProxy::setWindowFlags(const int flags) bool DialogProxy::eventFilter(QObject *watched, QEvent *event) { if (watched == m_dialog && event->type() == QEvent::Move) { - emit positionChanged(); - } + QMoveEvent *me = static_cast(event); + if (me->oldPos().x() != me->pos().x()) { + emit xChanged(); + } + if (me->oldPos().y() != me->pos().y()) { + emit yChanged(); + } + } else if (watched == m_dialog && event->type() == QEvent::Resize) { + QResizeEvent *re = static_cast(event); + if (re->oldSize().width() != re->size().width()) { + emit widthChanged(); + } + if (re->oldSize().height() != re->size().height()) { + emit heightChanged(); + } + } return false; } diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index fa8ce532f..e86fffc76 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -38,8 +38,11 @@ class DialogProxy : public QObject Q_PROPERTY(QGraphicsObject *mainItem READ mainItem WRITE setMainItem NOTIFY mainItemChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) - Q_PROPERTY(int x READ x WRITE setX NOTIFY positionChanged) - Q_PROPERTY(int y READ y WRITE setY NOTIFY positionChanged) + Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged) + Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) + //to set the size try to force doing so from the inner item + Q_PROPERTY(int width READ width NOTIFY widthChanged) + Q_PROPERTY(int height READ width NOTIFY heightChanged) Q_PROPERTY(int windowFlags READ windowFlags WRITE setWindowFlags) public: @@ -62,6 +65,9 @@ public: int y() const; void setY(int y); + int width() const; + int height() const; + //FIXME: passing an int is ugly int windowFlags() const; void setWindowFlags(const int); @@ -73,7 +79,10 @@ public: Q_SIGNALS: void mainItemChanged(); void visibleChanged(); - void positionChanged(); + void xChanged(); + void yChanged(); + void widthChanged(); + void heightChanged(); protected Q_SLOTS: void syncMainItem(); From 230a15d4759c18454d37d6da4c6193b2c04cbfd6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 7 Jun 2011 18:11:30 +0200 Subject: [PATCH 35/82] correctly manage popup menus similar fix in the taskbar coming --- declarativeimports/core/dialog.cpp | 34 +++++++++++++++++++++++++++--- declarativeimports/core/dialog.h | 2 ++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 831c0bdb3..cd84c8fb2 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -30,7 +30,8 @@ DialogProxy::DialogProxy(QObject *parent) - : QObject(parent) + : QObject(parent), + m_isPopupMenu(false) { m_dialog = new Plasma::Dialog(); m_dialog->installEventFilter(this); @@ -117,11 +118,21 @@ void DialogProxy::setVisible(const bool visible) if (visible) { m_dialog->setWindowFlags(m_flags); m_dialog->raise(); + if (m_isPopupMenu && QWidget::mouseGrabber() != m_dialog) { + QTimer::singleShot(200, this, SLOT(syncGrab())); + } } emit visibleChanged(); } } +void DialogProxy::syncGrab() +{ + if (m_isPopupMenu) { + m_dialog->grabMouse(); + } +} + QPoint DialogProxy::popupPosition(QGraphicsObject *item) const { Plasma::Corona *corona = qobject_cast(item->scene()); @@ -192,13 +203,30 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) if (re->oldSize().height() != re->size().height()) { emit heightChanged(); } - } + } else if (watched == m_dialog && event->type() == QEvent::Hide) { + m_dialog->releaseMouse(); + } else if (watched == m_dialog && event->type() == QEvent::MouseButtonPress) { + if (m_isPopupMenu) { + QMouseEvent *me = static_cast(event); + if (!m_dialog->geometry().contains(me->globalPos())) { + m_dialog->releaseMouse(); + setVisible(false); + } + } + } return false; } void DialogProxy::setAttribute(int attribute, bool on) { - m_dialog->setAttribute((Qt::WidgetAttribute)attribute, on); + Qt::WidgetAttribute attr = (Qt::WidgetAttribute)attribute; + if (attr == Qt::WA_X11NetWmWindowTypePopupMenu) { + m_isPopupMenu = on; + if (m_isPopupMenu && QWidget::mouseGrabber() != m_dialog) { + QTimer::singleShot(200, this, SLOT(syncGrab())); + } + } + m_dialog->setAttribute(attr, on); } #include "dialog.moc" diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index e86fffc76..8a7eb4492 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -86,6 +86,7 @@ Q_SIGNALS: protected Q_SLOTS: void syncMainItem(); + void syncGrab(); protected: bool eventFilter(QObject *watched, QEvent *event); @@ -95,6 +96,7 @@ private: Qt::WindowFlags m_flags; DeclarativeItemContainer *m_declarativeItemContainer; QWeakPointer m_mainItem; + bool m_isPopupMenu; }; #endif From d3868a8b659db8933c48ea99038b78593e7c62db Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 7 Jun 2011 19:12:04 +0200 Subject: [PATCH 36/82] revert last commit popups are done correctly now (is necessary so show, set the flags and show again) --- declarativeimports/core/dialog.cpp | 34 ++++-------------------------- declarativeimports/core/dialog.h | 2 -- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index cd84c8fb2..cff5f0b5b 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -24,14 +24,14 @@ #include #include #include +#include #include #include DialogProxy::DialogProxy(QObject *parent) - : QObject(parent), - m_isPopupMenu(false) + : QObject(parent) { m_dialog = new Plasma::Dialog(); m_dialog->installEventFilter(this); @@ -117,22 +117,13 @@ void DialogProxy::setVisible(const bool visible) m_dialog->setVisible(visible); if (visible) { m_dialog->setWindowFlags(m_flags); + m_dialog->setVisible(visible); m_dialog->raise(); - if (m_isPopupMenu && QWidget::mouseGrabber() != m_dialog) { - QTimer::singleShot(200, this, SLOT(syncGrab())); - } } emit visibleChanged(); } } -void DialogProxy::syncGrab() -{ - if (m_isPopupMenu) { - m_dialog->grabMouse(); - } -} - QPoint DialogProxy::popupPosition(QGraphicsObject *item) const { Plasma::Corona *corona = qobject_cast(item->scene()); @@ -203,30 +194,13 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) if (re->oldSize().height() != re->size().height()) { emit heightChanged(); } - } else if (watched == m_dialog && event->type() == QEvent::Hide) { - m_dialog->releaseMouse(); - } else if (watched == m_dialog && event->type() == QEvent::MouseButtonPress) { - if (m_isPopupMenu) { - QMouseEvent *me = static_cast(event); - if (!m_dialog->geometry().contains(me->globalPos())) { - m_dialog->releaseMouse(); - setVisible(false); - } - } } return false; } void DialogProxy::setAttribute(int attribute, bool on) { - Qt::WidgetAttribute attr = (Qt::WidgetAttribute)attribute; - if (attr == Qt::WA_X11NetWmWindowTypePopupMenu) { - m_isPopupMenu = on; - if (m_isPopupMenu && QWidget::mouseGrabber() != m_dialog) { - QTimer::singleShot(200, this, SLOT(syncGrab())); - } - } - m_dialog->setAttribute(attr, on); + m_dialog->setAttribute((Qt::WidgetAttribute)attribute, on); } #include "dialog.moc" diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 8a7eb4492..e86fffc76 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -86,7 +86,6 @@ Q_SIGNALS: protected Q_SLOTS: void syncMainItem(); - void syncGrab(); protected: bool eventFilter(QObject *watched, QEvent *event); @@ -96,7 +95,6 @@ private: Qt::WindowFlags m_flags; DeclarativeItemContainer *m_declarativeItemContainer; QWeakPointer m_mainItem; - bool m_isPopupMenu; }; #endif From e8b1374ff0a7e25723fb6bdf3a2ac2b2b9ef4aca Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 7 Jun 2011 21:07:27 +0200 Subject: [PATCH 37/82] initialize member --- declarativeimports/core/dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index cff5f0b5b..2b9420a3e 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -31,7 +31,8 @@ DialogProxy::DialogProxy(QObject *parent) - : QObject(parent) + : QObject(parent), + m_declarativeItemContainer(0) { m_dialog = new Plasma::Dialog(); m_dialog->installEventFilter(this); From 9cd8721f61c68354e74acf799ba1240a4678cb4b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 8 Jun 2011 13:02:22 +0200 Subject: [PATCH 38/82] support for centering --- declarativeimports/core/dialog.cpp | 4 ++-- declarativeimports/core/dialog.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 2b9420a3e..e6fbd15f9 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -125,11 +125,11 @@ void DialogProxy::setVisible(const bool visible) } } -QPoint DialogProxy::popupPosition(QGraphicsObject *item) const +QPoint DialogProxy::popupPosition(QGraphicsObject *item, int alignment) const { Plasma::Corona *corona = qobject_cast(item->scene()); if (corona) { - return corona->popupPosition(item, m_dialog->size()); + return corona->popupPosition(item, m_dialog->size(), (Qt::AlignmentFlag)alignment); } else { return QPoint(); } diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index e86fffc76..8cfdc1664 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -72,7 +72,8 @@ public: int windowFlags() const; void setWindowFlags(const int); - Q_INVOKABLE QPoint popupPosition(QGraphicsObject *item) const; + //FIXME: alignment should be Qt::AlignmentFlag + Q_INVOKABLE QPoint popupPosition(QGraphicsObject *item, int alignment=Qt::AlignLeft) const; //FIXME:: Qt::WidgetAttribute should be already Q_INVOKABLE void setAttribute(int attribute, bool on); From 42f8d04f6c49836b6d84076533c536d5762bf7b7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 8 Jun 2011 17:53:19 +0200 Subject: [PATCH 39/82] a dialog has margins, take them into account --- declarativeimports/core/dialog.cpp | 59 ++++++++++++++++++++++++++++++ declarativeimports/core/dialog.h | 39 ++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index e6fbd15f9..64f430fa9 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -30,11 +30,62 @@ #include +DialogMargins::DialogMargins(Plasma::Dialog *dialog, QObject *parent) + : QObject(parent), + m_dialog(dialog) +{ + checkMargins(); +} + +void DialogMargins::checkMargins() +{ + int left, top, right, bottom; + m_dialog->getContentsMargins(&left, &top, &right, &bottom); + + if (left != m_left) { + m_left = left; + emit leftChanged(); + } + if (top != m_top) { + m_top = top; + emit topChanged(); + } + if (right != m_right) { + m_right = right; + emit rightChanged(); + } + if (bottom != m_bottom) { + m_bottom = bottom; + emit bottomChanged(); + } +} + +int DialogMargins::left() const +{ + return m_left; +} + +int DialogMargins::top() const +{ + return m_top; +} + +int DialogMargins::right() const +{ + return m_right; +} + +int DialogMargins::bottom() const +{ + return m_bottom; +} + DialogProxy::DialogProxy(QObject *parent) : QObject(parent), m_declarativeItemContainer(0) { m_dialog = new Plasma::Dialog(); + m_margins = new DialogMargins(m_dialog, this); m_dialog->installEventFilter(this); m_flags = m_dialog->windowFlags(); } @@ -177,6 +228,11 @@ void DialogProxy::setWindowFlags(const int flags) m_dialog->setWindowFlags((Qt::WindowFlags)flags); } +QObject *DialogProxy::margins() const +{ + return m_margins; +} + bool DialogProxy::eventFilter(QObject *watched, QEvent *event) { if (watched == m_dialog && event->type() == QEvent::Move) { @@ -187,6 +243,9 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) if (me->oldPos().y() != me->pos().y()) { emit yChanged(); } + if ((me->oldPos().x() != me->pos().x()) || (me->oldPos().y() != me->pos().y())) { + m_margins->checkMargins(); + } } else if (watched == m_dialog && event->type() == QEvent::Resize) { QResizeEvent *re = static_cast(event); if (re->oldSize().width() != re->size().width()) { diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 8cfdc1664..41845b699 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -32,6 +32,41 @@ namespace Plasma class DeclarativeItemContainer; +class DialogMargins : public QObject +{ + Q_OBJECT + + Q_PROPERTY(int left READ left NOTIFY leftChanged) + Q_PROPERTY(int top READ top NOTIFY topChanged) + Q_PROPERTY(int right READ right NOTIFY rightChanged) + Q_PROPERTY(int bottom READ bottom NOTIFY bottomChanged) + +public: + DialogMargins(Plasma::Dialog *dialog, QObject *parent = 0); + + int left() const; + int top() const; + int right() const; + int bottom() const; + +Q_SIGNALS: + void leftChanged(); + void rightChanged(); + void topChanged(); + void bottomChanged(); + +protected: + void checkMargins(); + +private: + int m_left; + int m_top; + int m_right; + int m_bottom; + Plasma::Dialog *m_dialog; + friend class DialogProxy; +}; + class DialogProxy : public QObject { Q_OBJECT @@ -44,6 +79,7 @@ class DialogProxy : public QObject Q_PROPERTY(int width READ width NOTIFY widthChanged) Q_PROPERTY(int height READ width NOTIFY heightChanged) Q_PROPERTY(int windowFlags READ windowFlags WRITE setWindowFlags) + Q_PROPERTY(QObject *margins READ margins CONSTANT) public: enum WidgetAttribute { @@ -72,6 +108,8 @@ public: int windowFlags() const; void setWindowFlags(const int); + QObject *margins() const; + //FIXME: alignment should be Qt::AlignmentFlag Q_INVOKABLE QPoint popupPosition(QGraphicsObject *item, int alignment=Qt::AlignLeft) const; //FIXME:: Qt::WidgetAttribute should be already @@ -96,6 +134,7 @@ private: Qt::WindowFlags m_flags; DeclarativeItemContainer *m_declarativeItemContainer; QWeakPointer m_mainItem; + DialogMargins *m_margins; }; #endif From 5199d71e54a824703ae4d9e183e77204854bcdac Mon Sep 17 00:00:00 2001 From: Dawit Alemayehu Date: Wed, 8 Jun 2011 13:49:08 -0400 Subject: [PATCH 40/82] GIT_SILENT: Shut the compiler up about unused variables. --- declarativeimports/core/dataengineconsumer.cpp | 2 ++ scriptengines/javascript/declarative/packageaccessmanager.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/declarativeimports/core/dataengineconsumer.cpp b/declarativeimports/core/dataengineconsumer.cpp index ecf58732e..0ccaff220 100644 --- a/declarativeimports/core/dataengineconsumer.cpp +++ b/declarativeimports/core/dataengineconsumer.cpp @@ -106,6 +106,8 @@ DataEngine *DataEngineConsumer::dataEngine(const QString &name) DataEngine *DataEngineConsumer::remoteDataEngine(const KUrl &location, const QString &name) { + Q_UNUSED(location); + Q_UNUSED(name); return 0; } diff --git a/scriptengines/javascript/declarative/packageaccessmanager.cpp b/scriptengines/javascript/declarative/packageaccessmanager.cpp index 9e12194a6..b9f9b0b8e 100644 --- a/scriptengines/javascript/declarative/packageaccessmanager.cpp +++ b/scriptengines/javascript/declarative/packageaccessmanager.cpp @@ -39,6 +39,8 @@ public: qint64 readData(char *data, qint64 maxSize) { + Q_UNUSED(data); + Q_UNUSED(maxSize); return 0; } From d2efdc34ee9c9c2372a537e447f27e7230ebe8bc Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 9 Jun 2011 14:31:03 +0200 Subject: [PATCH 41/82] restore ability to register contextual actions --- .../plasmoid/declarativeappletscript.cpp | 21 ++++++++++++++++++- .../plasmoid/declarativeappletscript.h | 4 +++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index a33f38850..73590e310 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -274,6 +274,18 @@ QGraphicsWidget *DeclarativeAppletScript::extractParent(QScriptContext *context, return parent; } +void DeclarativeAppletScript::callPlasmoidFunction(const QString &functionName, const QScriptValueList &args, ScriptEnv *env) +{ + if (!m_env) { + m_env = ScriptEnv::findScriptEnv(m_engine); + } + + if (env) { + QScriptValue func = m_self.property(functionName); + m_env->callFunction(func, args, m_self); + } +} + void DeclarativeAppletScript::constraintsEvent(Plasma::Constraints constraints) { if (constraints & Plasma::FormFactorConstraint) { @@ -343,7 +355,9 @@ void DeclarativeAppletScript::executeAction(const QString &name) } const QString func("action_" + name); - m_env->callEventListeners(func); + if (!m_env->callEventListeners(func)) { + callPlasmoidFunction(func, QScriptValueList(), m_env); + } } bool DeclarativeAppletScript::include(const QString &path) @@ -471,6 +485,11 @@ QScriptValue DeclarativeAppletScript::loadService(QScriptContext *context, QScri return engine->newQObject(service, QScriptEngine::AutoOwnership); } +QList DeclarativeAppletScript::contextualActions() +{ + return m_interface->contextualActions(); +} + QScriptEngine *DeclarativeAppletScript::engine() const { return m_engine; diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.h b/scriptengines/javascript/plasmoid/declarativeappletscript.h index 8fd0e5629..d1c9d5f65 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.h +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.h @@ -49,7 +49,7 @@ public: QString filePath(const QString &type, const QString &file) const; - void executeAction(const QString &name); + QList contextualActions(); void constraintsEvent(Plasma::Constraints constraints); @@ -70,6 +70,7 @@ public: static QScriptValue loadService(QScriptContext *context, QScriptEngine *engine); public Q_SLOTS: + void executeAction(const QString &name); void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data); void signalHandlerException(const QScriptValue &exception); void popupEvent(bool popped); @@ -92,6 +93,7 @@ Q_SIGNALS: void contextChanged(); private: + void callPlasmoidFunction(const QString &functionName, const QScriptValueList &args, ScriptEnv *env); Plasma::DeclarativeWidget *m_declarativeWidget; AppletInterface *m_interface; EngineAccess *m_engineAccess; From 5c16717f8a03eafd3b21bb4d36a40ede604486a2 Mon Sep 17 00:00:00 2001 From: Dawit Alemayehu Date: Wed, 8 Jun 2011 13:48:13 -0400 Subject: [PATCH 42/82] Removed set but unused variable to fix -Wunused-but-set-variable warnings. --- scriptengines/javascript/simplebindings/icon.cpp | 1 - scriptengines/javascript/simplebindings/pixmap.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/scriptengines/javascript/simplebindings/icon.cpp b/scriptengines/javascript/simplebindings/icon.cpp index 0b5a5f7f9..62055a571 100644 --- a/scriptengines/javascript/simplebindings/icon.cpp +++ b/scriptengines/javascript/simplebindings/icon.cpp @@ -92,7 +92,6 @@ QScriptValue constructIconClass(QScriptEngine *eng) { QScriptValue proto = qScriptValueFromValue(eng, QIcon()); QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter; - QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter; proto.setProperty("addPixmap", eng->newFunction(addPixmap)); proto.setProperty("addFile", eng->newFunction(addFile)); proto.setProperty("null", eng->newFunction(isNull), getter); diff --git a/scriptengines/javascript/simplebindings/pixmap.cpp b/scriptengines/javascript/simplebindings/pixmap.cpp index b1f47a3a7..0719dc7d5 100644 --- a/scriptengines/javascript/simplebindings/pixmap.cpp +++ b/scriptengines/javascript/simplebindings/pixmap.cpp @@ -68,7 +68,6 @@ QScriptValue constructQPixmapClass(QScriptEngine *eng) { QScriptValue proto = qScriptValueFromValue(eng, QPixmap()); QScriptValue::PropertyFlags getter = QScriptValue::PropertyGetter; - QScriptValue::PropertyFlags setter = QScriptValue::PropertySetter; proto.setProperty("null", eng->newFunction(null), getter); proto.setProperty("rect", eng->newFunction(rect), getter); proto.setProperty("scaled", eng->newFunction(scaled)); From 201a1d1d17a162166a43d8bf7e4648f76fb76874 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 13 Jun 2011 13:44:45 +0200 Subject: [PATCH 43/82] correct width qpropoerty --- declarativeimports/core/dialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 41845b699..35500f5ea 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -77,7 +77,7 @@ class DialogProxy : public QObject Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) //to set the size try to force doing so from the inner item Q_PROPERTY(int width READ width NOTIFY widthChanged) - Q_PROPERTY(int height READ width NOTIFY heightChanged) + Q_PROPERTY(int height READ height NOTIFY heightChanged) Q_PROPERTY(int windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QObject *margins READ margins CONSTANT) From fe8ccf1d71282487a86b0792169e249121e8b38c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 13 Jun 2011 13:56:55 +0200 Subject: [PATCH 44/82] guard mainItem, crash-- --- declarativeimports/core/dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 64f430fa9..9df07362a 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -108,8 +108,10 @@ void DialogProxy::setMainItem(QGraphicsObject *mainItem) m_mainItem.data()->setParent(mainItem->parent()); } m_mainItem = mainItem; - mainItem->setParentItem(0); - mainItem->setParent(this); + if (mainItem) { + mainItem->setParentItem(0); + mainItem->setParent(this); + } //if this is called in Compenent.onCompleted we have to wait a loop the item is added to a scene QTimer::singleShot(0, this, SLOT(syncMainItem())); From 05c405c17b815d100a20822ecf13bdb054fc5793 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 14 Jun 2011 10:35:01 +0200 Subject: [PATCH 45/82] allow dataEngine: as well as engine: -> more consistent with documentation --- declarativeimports/core/datasource_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/declarativeimports/core/datasource_p.h b/declarativeimports/core/datasource_p.h index f61a5689d..edf9a9062 100644 --- a/declarativeimports/core/datasource_p.h +++ b/declarativeimports/core/datasource_p.h @@ -61,6 +61,7 @@ public: int interval() const {return m_interval;} void setInterval(const int interval); + Q_PROPERTY(QString dataEngine READ engine WRITE setEngine NOTIFY engineChanged) Q_PROPERTY(QString engine READ engine WRITE setEngine NOTIFY engineChanged) QString engine() const {return m_engine;} void setEngine(const QString &e); From e8258b913141632871c8a6b2eecdcbdc6098e643 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 15 Jun 2011 14:18:06 +0200 Subject: [PATCH 46/82] delete the NAM; it isn't deleted by the QDeclarativeEngine --- .../javascript/plasmoid/declarativeappletscript.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index 73590e310..08d53fa67 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -87,7 +87,11 @@ bool DeclarativeAppletScript::init() //m_declarativeWidget->engine()->addImportPath(package()->path()+"/contents/imports"); //use our own custom network access manager that will access Plasma packages and to manage security (i.e. deny access to remote stuff when the proper extension isn't enabled - m_declarativeWidget->engine()->setNetworkAccessManagerFactory(new PackageAccessManagerFactory(package(), &m_auth)); + QDeclarativeEngine *engine = m_declarativeWidget->engine(); + QDeclarativeNetworkAccessManagerFactory *factory = engine->networkAccessManagerFactory(); + engine->setNetworkAccessManagerFactory(0); + delete factory; + engine->setNetworkAccessManagerFactory(new PackageAccessManagerFactory(package(), &m_auth)); m_declarativeWidget->setQmlPath(mainScript()); From f257efe7f0c00271041c38236286f9f33ac3f36c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 16 Jun 2011 19:29:09 +0200 Subject: [PATCH 47/82] fix item removal with one source per item --- declarativeimports/core/datamodel.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index 14d7f1fad..61c91c862 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -190,6 +190,7 @@ void DataModel::dataUpdated(const QString &sourceName, const Plasma::DataEngine: (m_sourceFilter.isEmpty() || (sourceRegExp.isValid() && sourceRegExp.exactMatch(i.key())))) { Plasma::DataEngine::Data data = value.value(); data["DataEngineSource"] = i.key(); + list.append(data); } ++i; @@ -292,7 +293,18 @@ void DataModel::removeSource(const QString &sourceName) //FIXME: this could be way more efficient by not resetting the whole model //FIXME: find a way to remove only the proper things also in the case where sources are items emit modelAboutToBeReset(); - m_items.remove(sourceName); + //source name as key of the map + if (!m_keyRoleFilter.isEmpty()) { + m_items.remove(sourceName); + //source name in the map, linear scan + } else { + for (int i = 0; i < m_items.value(QString()).count(); ++i) { + if (m_items.value(QString())[i].value().value("DataEngineSource") == sourceName) { + m_items[QString()].remove(i); + break; + } + } + } emit modelReset(); } From 25c6e9800a4a925b2f431fef7843fa255520a33b Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 19 Jun 2011 09:39:29 +0200 Subject: [PATCH 48/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 1 + remotewidgetshelper/kcm_remotewidgets.actions | 2 ++ scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 2 ++ .../data/plasma-scriptengine-applet-declarative.desktop | 2 ++ .../data/plasma-scriptengine-applet-simple-javascript.desktop | 2 ++ .../data/plasma-scriptengine-dataengine-javascript.desktop | 1 + 7 files changed, 11 insertions(+) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index 1f19959cd..b3a47cc3f 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -45,6 +45,7 @@ Name[sr@latin]=plasma-kpart Name[sv]=Plasma-delprogram Name[th]=plasma-kpart Name[tr]=plasma-kpart +Name[ug]=plasma-kpart Name[uk]=plasma-kpart Name[wa]=plasma-kpårt Name[x-test]=xxplasma-kpartxx diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 0b569e6a2..50868944f 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -49,6 +49,7 @@ Name[sr@latin]=Sačuvaj smernice za udaljene vidžete Name[sv]=Spara policy för grafiska fjärrkomponenter Name[th]=บันทึกกฎของวิดเจ็ตระยะไกล Name[tr]=Uzak programcık politikalarını kaydet +Name[ug]=يىراقتىكى ۋىجېتلارنى ساقلاش تەدبىرى Name[uk]=Зберегти правила для віддалених віджетів Name[x-test]=xxSave remote widgets' policiesxx Name[zh_CN]=保存远程部件的策略 @@ -101,6 +102,7 @@ Description[sr@latin]=Sprečava sistem da sačuva smernice udaljenih plasma vid Description[sv]=Förhindrar systemet från att spara policy för Plasma grafiska fjärrkomponenter Description[th]=ป้องกันระบบจากการบันทึกกฎของวิดเจ็ตของพลาสมาจากทางไกล Description[tr]=Sistemin uzak plasma programcık politikalarını kaydetmesini engelle +Description[ug]=سىستېما يىراقتىكى پلازما ۋىجېتلىرىنىڭ تەدبىرىنى ساقلاشنى چەكلەيدۇ Description[uk]=Заборонити системі зберігати правила для віддалених віджетів Плазми Description[x-test]=xxPrevents the system from saving remote plasma widgets' policiesxx Description[zh_CN]=禁止系统保存远程 Plasma 部件的策略 diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index 14a0d3d59..c62decbb7 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -47,6 +47,7 @@ Name[sv]=Plasma Javaskript-tillägg Name[tg]=Иловаҳои Plasma JavaScript Name[th]=ส่วนเสริมจาวาและจาวาสคริปต์สำหรับพลาสมาส่วนเสริมจาวาและจาวาสคริปต์สำหรับ Name[tr]=Plasma JavaScript Eklentisi +Name[ug]=Plasma JavaScript قوشۇلما Name[uk]=Додаток JavaScript до Плазми Name[x-test]=xxPlasma JavaScript Addonxx Name[zh_TW]=Plasma JavaScript Addon diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 8bd43958b..d3903c903 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -47,6 +47,7 @@ Name[sr@latin]=JavaScript dodatak Name[sv]=Javaskript-tillägg Name[th]=ส่วนเสริมจาวาสคริปต์ Name[tr]=Javascript Eklentisi +Name[ug]=Javascript قوشۇلما Name[uk]=Додаток JavaScript Name[x-test]=xxJavascript Addonxx Name[zh_TW]=Javascript Addon @@ -95,6 +96,7 @@ Comment[sr@latin]=Dodaci za JavaScript plasma priključke Comment[sv]=Tillägg för Javascript Plasma-insticksprogram Comment[th]=ส่วนขยายสำหรับส่วนเสริมพลาสมาที่เป็นจาวาสคริปต์ Comment[tr]=Javascript Plasma eklentileri için ek araçlar +Comment[ug]=Javascript Plasma قىستۇرمىسى ئۈچۈن قوشۇلما Comment[uk]=Додатки для використання Javascript у Плазмі Comment[wa]=Pacaedjes di rawete po les tchôkes-divins Plasma Javascript Comment[x-test]=xxAddons for Javascript Plasma pluginsxx diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index d9e0b0dd1..74d4472ff 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -37,6 +37,7 @@ Name[sr@ijekavianlatin]=Deklarativni vidžet Name[sr@latin]=Deklarativni vidžet Name[sv]=Deklarativ grafisk komponent Name[tr]=Bildirim parçacığı +Name[ug]=ئېنىقلىما ۋىجېت Name[uk]=Декларативний віджет Name[wa]=Ahesse di gåyotaedje Name[x-test]=xxDeclarative widgetxx @@ -85,6 +86,7 @@ Comment[sr@latin]=Samosvojni plasma vidžet napisan u QML‑u i JavaScriptu Comment[sv]=Inbyggd grafisk Plasma-komponent skriven i QML och Javascript Comment[th]=วิดเจ็ตพลาสมาแบบดั้งเดิมที่เขียนด้วย QML และจาวาสคริปต์ Comment[tr]=JavaScript ve QML ile yazılmış gerçek Plasma gereci +Comment[ug]=QML ۋە JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى Comment[uk]=Віджет Плазми, написаний на QML та JavaScript Comment[x-test]=xxNative Plasma widget written in QML and JavaScriptxx Comment[zh_TW]=用 QML 與 JavaScript 寫的原始 Plasma 元件 diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index 432b344f2..422d20385 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -67,6 +67,7 @@ Name[te]=జావాస్క్రిప్‍ట్ విడ్‍జ్‌ Name[tg]=Видҷети JavaScript Name[th]=วิดเจ็ตภาษาจาวาสคริปต์ Name[tr]=JavaScript Programcığı +Name[ug]=JavaScript ۋىجېتى Name[uk]=Віджет JavaScript Name[wa]=Ahesse JavaScript Name[x-test]=xxJavaScript Widgetxx @@ -138,6 +139,7 @@ Comment[te]=జావాస్క్రిప్‍ట్‌లో వ్రా Comment[tg]=Модуль Plasma, написанный на языке JavaScript Comment[th]=วิดเจ็ตพลาสมาที่ถูกเขียนด้วยจาวาสคริปต์ Comment[tr]=JavaScript ile yazılmış gerçek Plasma gereci +Comment[ug]=JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى Comment[uk]=Віджет Плазми, написаний на JavaScript Comment[wa]=Ahesse askepieye po Plasma eyet scrîte e JavaScript Comment[x-test]=xxNative Plasma widget written in JavaScriptxx diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index a6e637afa..c9ba13606 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -57,6 +57,7 @@ Name[sv]=Javascript-datagränssnitt Name[tg]=Иҷрогари JavaScript Name[th]=กลไกข้อมูลของจาวาสคริปต์ Name[tr]=JavaScript Veri Motoru +Name[ug]=JavaScript سانلىق مەلۇمات ماتورى Name[uk]=Рушій даних JavaScript Name[x-test]=xxJavaScript DataEnginexx Name[zh_CN]=JavaScript 数据引擎 From 3475f99f967f397cfc26d2fdaae27908abe6e4f3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 19 Jun 2011 19:07:26 +0200 Subject: [PATCH 49/82] guard against crash --- declarativeimports/core/dialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 9df07362a..989af03c5 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -133,12 +133,18 @@ void DialogProxy::syncMainItem() QGraphicsObject *qo = qobject_cast(parent); if (qo) { scene = qo->scene(); - scene->addItem(m_mainItem.data()); - break; + if (scene) { + scene->addItem(m_mainItem.data()); + break; + } } } } + if (!scene) { + return; + } + //the parent of the qobject never changed, only the parentitem, so put it back what it was m_mainItem.data()->setParentItem(qobject_cast(m_mainItem.data()->parent())); From 86d4283ff97bc12d2d09c83a66344f1015ce5683 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sun, 19 Jun 2011 23:08:15 +0200 Subject: [PATCH 50/82] read only property: activeWindow --- declarativeimports/core/dialog.cpp | 14 +++++++++++++- declarativeimports/core/dialog.h | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 989af03c5..d3951347f 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -82,7 +82,8 @@ int DialogMargins::bottom() const DialogProxy::DialogProxy(QObject *parent) : QObject(parent), - m_declarativeItemContainer(0) + m_declarativeItemContainer(0), + m_activeWindow(false) { m_dialog = new Plasma::Dialog(); m_margins = new DialogMargins(m_dialog, this); @@ -225,6 +226,11 @@ int DialogProxy::height() const return m_dialog->size().height(); } +bool DialogProxy::isActiveWindow() const +{ + return m_activeWindow; +} + int DialogProxy::windowFlags() const { return (int)m_dialog->windowFlags(); @@ -262,6 +268,12 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) if (re->oldSize().height() != re->size().height()) { emit heightChanged(); } + } else if (watched == m_dialog && event->type() == QEvent::WindowActivate) { + m_activeWindow = true; + emit activeWindowChanged(); + } else if (watched == m_dialog && event->type() == QEvent::WindowDeactivate) { + m_activeWindow = false; + emit activeWindowChanged(); } return false; } diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 35500f5ea..5d60d13bc 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -80,6 +80,7 @@ class DialogProxy : public QObject Q_PROPERTY(int height READ height NOTIFY heightChanged) Q_PROPERTY(int windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QObject *margins READ margins CONSTANT) + Q_PROPERTY(bool activeWindow READ isActiveWindow NOTIFY activeWindowChanged) public: enum WidgetAttribute { @@ -104,6 +105,8 @@ public: int width() const; int height() const; + bool isActiveWindow() const; + //FIXME: passing an int is ugly int windowFlags() const; void setWindowFlags(const int); @@ -122,6 +125,7 @@ Q_SIGNALS: void yChanged(); void widthChanged(); void heightChanged(); + void activeWindowChanged(); protected Q_SLOTS: void syncMainItem(); @@ -135,6 +139,7 @@ private: DeclarativeItemContainer *m_declarativeItemContainer; QWeakPointer m_mainItem; DialogMargins *m_margins; + bool m_activeWindow; }; #endif From 25292578cada8fe1c36a97dd2c1c249815ba48d4 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 21 Jun 2011 11:01:05 +0200 Subject: [PATCH 51/82] SVN_SILENT made messages (.desktop file) --- remotewidgetshelper/kcm_remotewidgets.actions | 2 ++ scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 1 + .../data/plasma-scriptengine-applet-declarative.desktop | 2 ++ 4 files changed, 6 insertions(+) diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 50868944f..8b4a7e7c3 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -21,6 +21,7 @@ Name[hr]=Spremi pravila za udaljene widgete Name[hu]=Távoli widgetek irányelveinek mentése Name[ia]=Il salva le politicas del widgets remote Name[id]=Simpan kebijakan widget jarak jauh +Name[is]=Vista stefnur varðandi fjartengdar græjur Name[it]=Salva le linee guida degli oggetti remoti Name[ja]=リモートウィジェットポリシーを保存 Name[kk]=Қашықтағы виджеттер ережелерін сақтау @@ -76,6 +77,7 @@ Description[hr]=Brani sustavu spremanje pravila za udaljene widgete Plasme Description[hu]=Megakadályozza a rendszert a távoli widgetek irányelveinek mentésében Description[ia]=Il preveni le systema ab salvar le politicas del widgets (elementos graphic) remote de plasma Description[id]=Mencegah sistem dari menyimpan kebijakan widget jarak jauh plasma +Description[is]=Kemur í veg fyrir að kerfið geti vistað stefnur varðandi fjartengdar græjur Description[it]=Impedisce al sistema di salvare le linee guida degli oggetti remoti di Plasma Description[ja]=システムがリモート Plasma ウィジェットポリシー保存するのを防ぎます Description[kk]=Қашықтағы Plasma виджеттер ережелерін жүйеде сақтауын болдырмау diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index c62decbb7..38ad1490b 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -20,6 +20,7 @@ Name[hi]=प्लाज़मा जावा-स्क्रिप्ट ए Name[hr]=Dodatak JavaScripta Plasmi Name[hu]=Plazma JavaScript-bővítmény Name[ia]=Plasma JavaScript Addon +Name[is]=Plasma JavaScript viðbót Name[it]=Aggiunta per Java e JavaScript Name[ja]=Plasma JavaScript アドオン Name[kk]=Plasma JavaScript қосымшасы diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index d3903c903..6d5dee4b5 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -71,6 +71,7 @@ Comment[he]=תוספים לתוספי JavaScript של Plasma Comment[hr]=Dodaci za priključke za Javascript Plasma Comment[hu]=Bővítmények JavaScript Plazma-modulokhoz Comment[ia]=Addons (elementos adjuncte) pro plugins de Plasma de javascript +Comment[is]=Viðbætur fyrir Plasma JavaScript íforrit Comment[it]=Aggiunte per le estensioni JavaScript di Plasma Comment[ja]=JavaScript Plasma プラグイン用のアドオン Comment[kk]=Javascript Plasma плагиніне қосымшасы diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 74d4472ff..334de58ce 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -17,6 +17,7 @@ Name[he]=ווידג׳ט מוצהר Name[hr]=Deklarativni widget Name[hu]=Deklaratív widget Name[ia]=Widget declarative +Name[is]=Skilgreiningagræja Name[it]=Oggetto dichiarativo Name[kk]=Мәлімдеме виджеті Name[km]=ធាតុ​ក្រាហ្វិក​ដែល​ប្រកាស @@ -61,6 +62,7 @@ Comment[he]=ווידג׳טים של Plasma הנכתבים ב־QML וב־JavaScri Comment[hr]=Izvorni Plasma widget napisan u QML-u i JavaScriptu Comment[hu]=QML-ben és JavaScriptben írt natív Plazma-widget Comment[ia]=Widget native de Plasma scribite in QLM e JavaScript +Comment[is]=Upprunabundin Plasma græja skrifuð í QML og JavaScript Comment[it]=Oggetto nativo di Plasma scritto in QML e JavaScript Comment[ja]=QML と JavaScript で書かれた Plasma のネイティブウィジェット Comment[kk]=QML мен JavaScript-те жазылған Plasma тума виджеті From c4fb39de30e6d2a8910276402ff6f1c1512290c1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 24 Jun 2011 17:56:42 +0200 Subject: [PATCH 52/82] guard pointers, crash-- --- declarativeimports/core/dialog.cpp | 3 +++ declarativeimports/core/svgitem.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index d3951347f..4184ccc92 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -187,6 +187,9 @@ void DialogProxy::setVisible(const bool visible) QPoint DialogProxy::popupPosition(QGraphicsObject *item, int alignment) const { + if (!item) { + return QPoint(); + } Plasma::Corona *corona = qobject_cast(item->scene()); if (corona) { return corona->popupPosition(item, m_dialog->size(), (Qt::AlignmentFlag)alignment); diff --git a/declarativeimports/core/svgitem.cpp b/declarativeimports/core/svgitem.cpp index d631e84ed..ae246e717 100644 --- a/declarativeimports/core/svgitem.cpp +++ b/declarativeimports/core/svgitem.cpp @@ -69,9 +69,11 @@ void SvgItem::setSvg(Plasma::Svg *svg) disconnect(m_svg.data(), 0, this, 0); } m_svg = svg; - connect(svg, SIGNAL(repaintNeeded()), this, SLOT(updateNeeded())); - connect(svg, SIGNAL(repaintNeeded()), this, SIGNAL(naturalSizeChanged())); - connect(svg, SIGNAL(sizeChanged()), this, SIGNAL(naturalSizeChanged())); + if (svg) { + connect(svg, SIGNAL(repaintNeeded()), this, SLOT(updateNeeded())); + connect(svg, SIGNAL(repaintNeeded()), this, SIGNAL(naturalSizeChanged())); + connect(svg, SIGNAL(sizeChanged()), this, SIGNAL(naturalSizeChanged())); + } emit naturalSizeChanged(); } From 7c947d8e961da04b3e99f3990e56afacb628a6c3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 24 Jun 2011 23:54:07 +0200 Subject: [PATCH 53/82] reset models in the proper way --- declarativeimports/core/datamodel.cpp | 11 ++++++----- declarativeimports/core/datamodel.h | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index 61c91c862..fd8d8d4c0 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -83,10 +83,11 @@ void SortFilterModel::setModel(QObject *source) void SortFilterModel::setFilterRegExp(const QString &exp) { //FIXME: this delaying of the reset signal seems to make the views behave a bit better, i.e. less holes and avoids some crashes, in theory shouldn't be necessary + beginResetModel(); blockSignals(true); QSortFilterProxyModel::setFilterRegExp(QRegExp(exp, Qt::CaseInsensitive)); blockSignals(false); - reset(); + endResetModel(); } QString SortFilterModel::filterRegExp() const @@ -254,7 +255,7 @@ QString DataModel::keyRoleFilter() const void DataModel::setItems(const QString &sourceName, const QVariantList &list) { - emit modelAboutToBeReset(); + beginResetModel(); //convert to vector, so data() will be O(1) m_items[sourceName] = list.toVector(); @@ -285,14 +286,14 @@ void DataModel::setItems(const QString &sourceName, const QVariantList &list) //make the declarative view reload everything, //would be nice an incremental update but is not possible - emit modelReset(); + endResetModel(); } void DataModel::removeSource(const QString &sourceName) { //FIXME: this could be way more efficient by not resetting the whole model //FIXME: find a way to remove only the proper things also in the case where sources are items - emit modelAboutToBeReset(); + beginResetModel(); //source name as key of the map if (!m_keyRoleFilter.isEmpty()) { m_items.remove(sourceName); @@ -305,7 +306,7 @@ void DataModel::removeSource(const QString &sourceName) } } } - emit modelReset(); + endResetModel(); } QVariant DataModel::data(const QModelIndex &index, int role) const diff --git a/declarativeimports/core/datamodel.h b/declarativeimports/core/datamodel.h index e74ffd5b7..a67909c73 100644 --- a/declarativeimports/core/datamodel.h +++ b/declarativeimports/core/datamodel.h @@ -130,8 +130,6 @@ protected: inline int countItems() const; Q_SIGNALS: - void modelAboutToBeReset(); - void modelReset(); void countChanged(); private Q_SLOTS: From 93bfcfe8fc758299f19ec3fa820205e5739a3e4b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 5 Jul 2011 21:13:22 +0200 Subject: [PATCH 54/82] drag and drop plugin by Gregory Schlomoff CCMAIL: gregory.schlomoff@gmail.com --- declarativeimports/draganddrop/CMakeLists.txt | 27 +++ .../draganddrop/DeclarativeDragArea.cpp | 186 ++++++++++++++++++ .../draganddrop/DeclarativeDragArea.h | 95 +++++++++ .../draganddrop/DeclarativeDragDropEvent.cpp | 42 ++++ .../draganddrop/DeclarativeDragDropEvent.h | 66 +++++++ .../draganddrop/DeclarativeDropArea.cpp | 68 +++++++ .../draganddrop/DeclarativeDropArea.h | 57 ++++++ .../draganddrop/DeclarativeMimeData.cpp | 121 ++++++++++++ .../draganddrop/DeclarativeMimeData.h | 75 +++++++ .../draganddrop/draganddropplugin.cpp | 43 ++++ .../draganddrop/draganddropplugin.h | 36 ++++ declarativeimports/draganddrop/qmldir | 2 + 12 files changed, 818 insertions(+) create mode 100644 declarativeimports/draganddrop/CMakeLists.txt create mode 100644 declarativeimports/draganddrop/DeclarativeDragArea.cpp create mode 100644 declarativeimports/draganddrop/DeclarativeDragArea.h create mode 100644 declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp create mode 100644 declarativeimports/draganddrop/DeclarativeDragDropEvent.h create mode 100644 declarativeimports/draganddrop/DeclarativeDropArea.cpp create mode 100644 declarativeimports/draganddrop/DeclarativeDropArea.h create mode 100644 declarativeimports/draganddrop/DeclarativeMimeData.cpp create mode 100644 declarativeimports/draganddrop/DeclarativeMimeData.h create mode 100644 declarativeimports/draganddrop/draganddropplugin.cpp create mode 100644 declarativeimports/draganddrop/draganddropplugin.h create mode 100644 declarativeimports/draganddrop/qmldir diff --git a/declarativeimports/draganddrop/CMakeLists.txt b/declarativeimports/draganddrop/CMakeLists.txt new file mode 100644 index 000000000..5450873c7 --- /dev/null +++ b/declarativeimports/draganddrop/CMakeLists.txt @@ -0,0 +1,27 @@ +project(draganddrop) + +include(KDE4Defaults) + +set(declarativedragdrop_SRCS + draganddropplugin.cpp + DeclarativeDragArea.cpp + DeclarativeDragDropEvent.cpp + DeclarativeDropArea.cpp + DeclarativeMimeData.cpp + ) + +INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${KDE4_INCLUDES} +) + +qt4_automoc(${declarativedragdrop_SRCS}) + + +kde4_add_library(dragdropplugin SHARED ${declarativedragdrop_SRCS}) +target_link_libraries(dragdropplugin ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}) + +install(TARGETS dragdropplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/draganddrop) + +install(FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/draganddrop) diff --git a/declarativeimports/draganddrop/DeclarativeDragArea.cpp b/declarativeimports/draganddrop/DeclarativeDragArea.cpp new file mode 100644 index 000000000..93943e609 --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDragArea.cpp @@ -0,0 +1,186 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDragArea.h" +#include "DeclarativeMimeData.h" + +#include +#include +#include +#include +#include +#include + +/*! + A DragArea is used to make an item draggable. +*/ + +DeclarativeDragArea::DeclarativeDragArea(QDeclarativeItem *parent) + : QDeclarativeItem(parent), + m_delegate(0), + m_source(0), + m_target(0), + m_enabled(true), + m_supportedActions(Qt::MoveAction), + m_defaultAction(Qt::MoveAction), + m_data(new DeclarativeMimeData()) // m_data is owned by us, and we shouldn't pass it to Qt directly as it will automatically delete it after the drag and drop. +{ + setAcceptedMouseButtons(Qt::LeftButton); +} + +DeclarativeDragArea::~DeclarativeDragArea() +{ + if (m_data) { + delete m_data; + } +} + +/*! + The delegate is the item that will be displayed next to the mouse cursor during the drag and drop operation. + It usually consists of a large, semi-transparent icon representing the data being dragged. +*/ +QDeclarativeComponent* DeclarativeDragArea::delegate() const +{ + return m_delegate; +} +void DeclarativeDragArea::setDelegate(QDeclarativeComponent *delegate) +{ + if (m_delegate != delegate) { + m_delegate = delegate; + emit delegateChanged(); + } +} +void DeclarativeDragArea::resetDelegate() +{ + setDelegate(0); +} + +/*! + The QML element that is the source of this drag and drop operation. This can be defined to any item, and will + be available to the DropArea as event.data.source +*/ +QDeclarativeItem* DeclarativeDragArea::source() const +{ + return m_source; +} +void DeclarativeDragArea::setSource(QDeclarativeItem* source) +{ + if (m_source != source) { + m_source = source; + emit sourceChanged(); + } +} +void DeclarativeDragArea::resetSource() +{ + setSource(0); +} + +// target +QDeclarativeItem* DeclarativeDragArea::target() const +{ + //TODO: implement me + return 0; +} + +// data +DeclarativeMimeData* DeclarativeDragArea::data() const +{ + return m_data; +} + +// enabled +bool DeclarativeDragArea::isEnabled() const +{ + return m_enabled; +} +void DeclarativeDragArea::setEnabled(bool enabled) +{ + if (enabled != m_enabled) { + m_enabled = enabled; + emit enabledChanged(); + } +} + +// supported actions +Qt::DropActions DeclarativeDragArea::supportedActions() const +{ + return m_supportedActions; +} +void DeclarativeDragArea::setSupportedActions(Qt::DropActions actions) +{ + if (actions != m_supportedActions) { + m_supportedActions = actions; + emit supportedActionsChanged(); + } +} + +// default action +Qt::DropAction DeclarativeDragArea::defaultAction() const +{ + return m_defaultAction; +} +void DeclarativeDragArea::setDefaultAction(Qt::DropAction action) +{ + if (action != m_defaultAction) { + m_defaultAction = action; + emit defaultActionChanged(); + } +} + +void DeclarativeDragArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + if ( !m_enabled + || QLineF(event->screenPos(), event->buttonDownScreenPos(Qt::LeftButton)).length() + < QApplication::startDragDistance()) { + return; + } + + QDrag *drag = new QDrag(event->widget()); + DeclarativeMimeData* dataCopy = new DeclarativeMimeData(m_data); //Qt will take ownership of this copy and delete it. + drag->setMimeData(dataCopy); + + if (m_delegate) { + + // Render the delegate to a Pixmap + + QDeclarativeItem* item = qobject_cast(m_delegate->create()); + + QGraphicsScene scene; + scene.addItem(item); + + QPixmap pixmap(scene.sceneRect().width(), scene.sceneRect().height()); + pixmap.fill(Qt::transparent); + + QPainter painter(&pixmap); + painter.setRenderHint(QPainter::Antialiasing); + scene.render(&painter); + + drag->setPixmap(pixmap); + drag->setHotSpot(QPoint(0, 0)); // TODO: Make a property for that + } + + //setCursor(Qt::OpenHandCursor); //TODO? Make a property for the cursor + + Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); + emit drop(action); +} diff --git a/declarativeimports/draganddrop/DeclarativeDragArea.h b/declarativeimports/draganddrop/DeclarativeDragArea.h new file mode 100644 index 000000000..e81b3b07d --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDragArea.h @@ -0,0 +1,95 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDRAGAREA_H +#define DECLARATIVEDRAGAREA_H + +#include + +class QDeclarativeComponent; +class DeclarativeMimeData; + +class DeclarativeDragArea : public QDeclarativeItem +{ + Q_OBJECT + Q_PROPERTY(QDeclarativeComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged RESET resetDelegate) + Q_PROPERTY(QDeclarativeItem* source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource) + Q_PROPERTY(QDeclarativeItem* target READ source NOTIFY targetChanged) + Q_PROPERTY(DeclarativeMimeData* data READ data CONSTANT) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) //TODO: Should call setAcceptDrops() + Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged) + Q_PROPERTY(Qt::DropAction defaultAction READ defaultAction WRITE setDefaultAction NOTIFY defaultActionChanged) + + +public: + DeclarativeDragArea(QDeclarativeItem *parent=0); + ~DeclarativeDragArea(); + + QDeclarativeComponent *delegate() const; + void setDelegate(QDeclarativeComponent* delegate); + void resetDelegate(); + + QDeclarativeItem* target() const; + QDeclarativeItem* source() const; + void setSource(QDeclarativeItem* source); + void resetSource(); + + bool isEnabled() const; + void setEnabled(bool enabled); + + //supported actions + Qt::DropActions supportedActions() const; + void setSupportedActions(Qt::DropActions actions); + + //default action + Qt::DropAction defaultAction() const; + void setDefaultAction(Qt::DropAction action); + + DeclarativeMimeData* data() const; + +signals: + void delegateChanged(); + void sourceChanged(); + void targetChanged(); + void dataChanged(); + void enabledChanged(); + void drop(int action); + void supportedActionsChanged(); + void defaultActionChanged(); + +protected: + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mousePressEvent(QGraphicsSceneMouseEvent *) {} + void mouseReleaseEvent(QGraphicsSceneMouseEvent *) {} + +private: + QDeclarativeComponent* m_delegate; + QDeclarativeItem* m_source; + QDeclarativeItem* m_target; + DeclarativeMimeData* const m_data; + bool m_enabled; + Qt::DropActions m_supportedActions; + Qt::DropAction m_defaultAction; +}; + +#endif // DECLARATIVEDRAGAREA_H diff --git a/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp b/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp new file mode 100644 index 000000000..cd5fed70b --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp @@ -0,0 +1,42 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDragDropEvent.h" + +DeclarativeDragDropEvent::DeclarativeDragDropEvent(QGraphicsSceneDragDropEvent* e, QObject* parent) : + QObject(parent), + m_event(e), + m_x(e->pos().x()), + m_y(e->pos().y()), + m_buttons(e->buttons()), + m_modifiers(e->modifiers()), + m_data(e->mimeData()) +{ + +} + +void DeclarativeDragDropEvent::accept(int action) +{ + m_event->setDropAction( (Qt::DropAction) action ); + m_event->accept(); +} diff --git a/declarativeimports/draganddrop/DeclarativeDragDropEvent.h b/declarativeimports/draganddrop/DeclarativeDragDropEvent.h new file mode 100644 index 000000000..824650541 --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDragDropEvent.h @@ -0,0 +1,66 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDRAGDROPEVENT_H +#define DECLARATIVEDRAGDROPEVENT_H + +#include +#include +#include "DeclarativeMimeData.h" + +class DeclarativeDragDropEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(int x READ x) + Q_PROPERTY(int y READ y) + Q_PROPERTY(int buttons READ buttons) + Q_PROPERTY(int modifiers READ modifiers) + Q_PROPERTY(DeclarativeMimeData* data READ data) + Q_PROPERTY(Qt::DropActions possibleActions READ possibleActions) + Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction) + +public: + + DeclarativeDragDropEvent(QGraphicsSceneDragDropEvent* e, QObject* parent = 0); + + int x() const { return m_x; } + int y() const { return m_y; } + int buttons() const { return m_buttons; } + int modifiers() const { return m_modifiers; } + DeclarativeMimeData* data() { return &m_data; } + Qt::DropAction proposedAction() const { return m_event->proposedAction(); } + Qt::DropActions possibleActions() const { return m_event->possibleActions(); } + +public slots: + void accept(int action); + +private: + int m_x; + int m_y; + Qt::MouseButtons m_buttons; + Qt::KeyboardModifiers m_modifiers; + DeclarativeMimeData m_data; + QGraphicsSceneDragDropEvent* m_event; +}; + +#endif // DECLARATIVEDRAGDROPEVENT_H diff --git a/declarativeimports/draganddrop/DeclarativeDropArea.cpp b/declarativeimports/draganddrop/DeclarativeDropArea.cpp new file mode 100644 index 000000000..3b394ab0b --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDropArea.cpp @@ -0,0 +1,68 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDropArea.h" +#include "DeclarativeDragDropEvent.h" + +#include +#include + +DeclarativeDropArea::DeclarativeDropArea(QDeclarativeItem *parent) + : QDeclarativeItem(parent), + m_enabled(true) +{ + setAcceptDrops(m_enabled); +} + +void DeclarativeDropArea::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { + DeclarativeDragDropEvent dde(event, this); + emit dragEnter(&dde); +} + +void DeclarativeDropArea::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) +{ + DeclarativeDragDropEvent dde(event, this); + emit dragLeave(&dde); +} + +void DeclarativeDropArea::dropEvent(QGraphicsSceneDragDropEvent *event) +{ + DeclarativeDragDropEvent dde(event, this); + emit drop(&dde); +} + +bool DeclarativeDropArea::isEnabled() const +{ + return m_enabled; +} + +void DeclarativeDropArea::setEnabled(bool enabled) +{ + if (enabled == m_enabled) { + return; + } + + m_enabled = enabled; + setAcceptDrops(m_enabled); + emit enabledChanged(); +} diff --git a/declarativeimports/draganddrop/DeclarativeDropArea.h b/declarativeimports/draganddrop/DeclarativeDropArea.h new file mode 100644 index 000000000..0394ecf6b --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeDropArea.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDROPAREA_H +#define DECLARATIVEDROPAREA_H + +#include + +class DeclarativeDragDropEvent; + +class DeclarativeDropArea : public QDeclarativeItem +{ + Q_OBJECT + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + +public: + DeclarativeDropArea(QDeclarativeItem *parent=0); + bool isEnabled() const; + void setEnabled(bool enabled); + +signals: + void dragEnter(DeclarativeDragDropEvent* event); + void dragLeave(DeclarativeDragDropEvent* event); + void drop(DeclarativeDragDropEvent* event); + void enabledChanged(); + +protected: + void dragEnterEvent(QGraphicsSceneDragDropEvent *event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent *event); + void dropEvent(QGraphicsSceneDragDropEvent *event); + +private: + bool m_enabled; +}; + +#endif + diff --git a/declarativeimports/draganddrop/DeclarativeMimeData.cpp b/declarativeimports/draganddrop/DeclarativeMimeData.cpp new file mode 100644 index 000000000..09dbef02d --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeMimeData.cpp @@ -0,0 +1,121 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeMimeData.h" + +/*! + \qmlclass MimeData DeclarativeMimeData + + This is a wrapper class around QMimeData, with a few extensions to provide better support for in-qml drag & drops. +*/ + +/*! + \internal + \class DeclarativeMimeData + + Creates a new DeclarativeMimeData by cloning the QMimeData passed as parameter. + This is useful for two reasons : + - In DragArea, we want to clone our "working copy" of the DeclarativeMimeData instance, as Qt will automatically + delete it after the drag and drop operation. + - In the drop events, the QMimeData is const, and we have troubles passing const to QML. So we clone it to + remove the "constness" + + This method will try to cast the QMimeData to DeclarativeMimeData, and will clone our extensions to QMimeData as well +*/ +DeclarativeMimeData::DeclarativeMimeData(const QMimeData* copy) + : QMimeData(), + m_source(0) +{ + // Copy the standard MIME data + foreach(QString format, copy->formats()) { + this->setData(format, copy->data(format)); + } + + // If the object we are copying actually is a DeclarativeMimeData, copy our extended properties as well + const DeclarativeMimeData* declarativeMimeData = qobject_cast(copy); + if (declarativeMimeData) { + this->setSource(declarativeMimeData->source()); + } +} + + +/*! + \qmlproperty url MimeData::url + + Returns the first URL from the urls property of QMimeData + TODO: We should use QDeclarativeListProperty to return the whole list instead of only the first element. +*/ +QUrl DeclarativeMimeData::url() const +{ + if ( this->hasUrls() && !this->urls().isEmpty()) { + return urls().first(); + } + return QUrl(); +} +void DeclarativeMimeData::setUrl(const QUrl &url) +{ + if (this->url() == url) + return; + + QList urlList; + urlList.append(url); + setUrls(urlList); + emit urlChanged(); +} + +// color +QColor DeclarativeMimeData::color() const +{ + if ( this->hasColor()) { + return qvariant_cast(this->colorData()); + } + return QColor(); +} +void DeclarativeMimeData::setColor(const QColor &color) +{ + if (this->color() != color) { + this->setColorData(color); + emit colorChanged(); + } +} + +/*! + \qmlproperty item MimeData::source + + Setting source to any existing qml item will enable the receiver of the drag and drop operation to know in which item + the operation originated. + + In the case of inter-application drag and drop operations, the source will not be available, and will be 0. + Be sure to test it in your QML code, before using it, or it will generate errors in the console. +*/ +QDeclarativeItem* DeclarativeMimeData::source() const +{ + return m_source; +} +void DeclarativeMimeData::setSource(QDeclarativeItem* source) +{ + if (m_source != source) { + m_source = source; + emit sourceChanged(); + } +} diff --git a/declarativeimports/draganddrop/DeclarativeMimeData.h b/declarativeimports/draganddrop/DeclarativeMimeData.h new file mode 100644 index 000000000..1c9b1cd5b --- /dev/null +++ b/declarativeimports/draganddrop/DeclarativeMimeData.h @@ -0,0 +1,75 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEMIMEDATA_H +#define DECLARATIVEMIMEDATA_H + +#include +#include +#include +#include + +class DeclarativeMimeData : public QMimeData +{ + Q_OBJECT + + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(QString html READ html WRITE setHtml NOTIFY htmlChanged) + Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) //TODO: use QDeclarativeListProperty to return the whole list instead of only the first url + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(QDeclarativeItem* source READ source WRITE setSource NOTIFY sourceChanged) + //TODO: Image property + +public: + DeclarativeMimeData() : QMimeData() {} + DeclarativeMimeData(const QMimeData* copy); + + QUrl url() const; + void setUrl(const QUrl &url); + + QColor color() const; + void setColor(const QColor &color); + + QDeclarativeItem* source() const; + void setSource(QDeclarativeItem* source); + + /* + QString text() const; //TODO: Reimplement this to issue the onChanged signals + void setText(const QString &text); + QString html() const; + void setHtml(const QString &html); + */ + +signals: + void textChanged(); //FIXME not being used + void htmlChanged(); //FIXME not being used + void urlChanged(); + void colorChanged(); + void sourceChanged(); + +private: + QDeclarativeItem* m_source; + +}; + +#endif // DECLARATIVEMIMEDATA_H diff --git a/declarativeimports/draganddrop/draganddropplugin.cpp b/declarativeimports/draganddrop/draganddropplugin.cpp new file mode 100644 index 000000000..228ef79d4 --- /dev/null +++ b/declarativeimports/draganddrop/draganddropplugin.cpp @@ -0,0 +1,43 @@ +/* + Copyright 2011 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "draganddropplugin.h" + +#include + +#include "DeclarativeDragArea.h" +#include "DeclarativeDragDropEvent.h" +#include "DeclarativeDropArea.h" +#include "DeclarativeMimeData.h" + +void DragAndDropPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(uri == QLatin1String("org.kde.draganddrop")); + + qmlRegisterType(uri, 1, 0, "DropArea"); + qmlRegisterType(uri, 1, 0, "DragArea"); + qmlRegisterUncreatableType(uri, 1, 0, "MimeData", "MimeData cannot be created from QML."); + qmlRegisterUncreatableType(uri, 1, 0, "DragDropEvent", "DragDropEvent cannot be created from QML."); +} + +Q_EXPORT_PLUGIN2(draganddropplugin, DragAndDropPlugin) + diff --git a/declarativeimports/draganddrop/draganddropplugin.h b/declarativeimports/draganddrop/draganddropplugin.h new file mode 100644 index 000000000..ce7aba576 --- /dev/null +++ b/declarativeimports/draganddrop/draganddropplugin.h @@ -0,0 +1,36 @@ +/* + Copyright 2011 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DRAGANDDROPPLUGIN_H +#define DRAGANDDROPPLUGIN_H + +#include + +class DragAndDropPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT + +public: + void registerTypes(const char *uri); +}; + +#endif diff --git a/declarativeimports/draganddrop/qmldir b/declarativeimports/draganddrop/qmldir new file mode 100644 index 000000000..92ed88537 --- /dev/null +++ b/declarativeimports/draganddrop/qmldir @@ -0,0 +1,2 @@ +plugin draganddropplugin + From a9d22b98777512046360a936983c0fdf8639b33e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 5 Jul 2011 21:16:28 +0200 Subject: [PATCH 55/82] build drag and drop plugin --- declarativeimports/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/declarativeimports/CMakeLists.txt b/declarativeimports/CMakeLists.txt index 45b732160..00b54222f 100644 --- a/declarativeimports/CMakeLists.txt +++ b/declarativeimports/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(core) +add_subdirectory(draganddrop) add_subdirectory(graphicslayouts) add_subdirectory(graphicswidgets) add_subdirectory(qtextracomponents) From ab013bca0beccf7a12f7a513eba2df5056741bd3 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 6 Jul 2011 10:41:04 +0200 Subject: [PATCH 56/82] SVN_SILENT made messages (.desktop file) --- scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 2 ++ .../data/plasma-scriptengine-applet-declarative.desktop | 3 +++ 3 files changed, 6 insertions(+) diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index 38ad1490b..d77fb00a4 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -51,6 +51,7 @@ Name[tr]=Plasma JavaScript Eklentisi Name[ug]=Plasma JavaScript قوشۇلما Name[uk]=Додаток JavaScript до Плазми Name[x-test]=xxPlasma JavaScript Addonxx +Name[zh_CN]=Plasma JavaScript 附加插件 Name[zh_TW]=Plasma JavaScript Addon Type=ServiceType X-KDE-ServiceType=Plasma/JavascriptAddon diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 6d5dee4b5..3ffdccefb 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -50,6 +50,7 @@ Name[tr]=Javascript Eklentisi Name[ug]=Javascript قوشۇلما Name[uk]=Додаток JavaScript Name[x-test]=xxJavascript Addonxx +Name[zh_CN]=Javascript 插件 Name[zh_TW]=Javascript Addon Comment=Addons for Javascript Plasma plugins Comment[ast]=Amestaos pa complementos de JavaScript pa Plasma @@ -101,6 +102,7 @@ Comment[ug]=Javascript Plasma قىستۇرمىسى ئۈچۈن قوشۇلما Comment[uk]=Додатки для використання Javascript у Плазмі Comment[wa]=Pacaedjes di rawete po les tchôkes-divins Plasma Javascript Comment[x-test]=xxAddons for Javascript Plasma pluginsxx +Comment[zh_CN]=Javascript Plasma 插件的附件组件 Comment[zh_TW]=Javascript Plasma 外掛程式的 Addon Type=Service X-KDE-ServiceTypes=Plasma/PackageStructure diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 334de58ce..51adb22a2 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -26,6 +26,7 @@ Name[lt]=Deklaratyvus valdiklis Name[nb]=Deklarativt skjermelement Name[nds]=Stüerelement för Verkloren Name[nl]=Widget voor declaratie +Name[pl]=Deklaratywny element interfejsu Name[pt]=Item declarativo Name[pt_BR]=Widget declarativo Name[ro]=Control declarativ @@ -42,6 +43,7 @@ Name[ug]=ئېنىقلىما ۋىجېت Name[uk]=Декларативний віджет Name[wa]=Ahesse di gåyotaedje Name[x-test]=xxDeclarative widgetxx +Name[zh_CN]=描述部件 Name[zh_TW]=宣告元件 Comment=Native Plasma widget written in QML and JavaScript Comment[ast]=Elementu gráficu nativu de Plasma escritu en QML y JavaScript @@ -91,6 +93,7 @@ Comment[tr]=JavaScript ve QML ile yazılmış gerçek Plasma gereci Comment[ug]=QML ۋە JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى Comment[uk]=Віджет Плазми, написаний на QML та JavaScript Comment[x-test]=xxNative Plasma widget written in QML and JavaScriptxx +Comment[zh_CN]=使用 QML 和 JavaScript 编写的原生 Plasma 部件 Comment[zh_TW]=用 QML 與 JavaScript 寫的原始 Plasma 元件 Type=Service Icon=text-x-script From 9188aeab5a10a88eb67aaf0d41d9ee30e77315e8 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 7 Jul 2011 16:29:42 +0200 Subject: [PATCH 57/82] fix localIO API calls --- scriptengines/javascript/common/scriptenv.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scriptengines/javascript/common/scriptenv.cpp b/scriptengines/javascript/common/scriptenv.cpp index 1544fa027..d90ce301d 100644 --- a/scriptengines/javascript/common/scriptenv.cpp +++ b/scriptengines/javascript/common/scriptenv.cpp @@ -179,7 +179,8 @@ bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &o } else if ("localio" == extension) { m_allowedUrls |= LocalUrls; registerGetUrl(obj); - obj.setProperty("", m_engine->newFunction(ScriptEnv::runCommand)); + obj.setProperty("userDataPath", m_engine->newFunction(ScriptEnv::userDataPath)); + obj.setProperty("runCommand", m_engine->newFunction(ScriptEnv::runCommand)); return true; } From addf0945a1d067e0cc52bf0687b7bd6fab2f2392 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Fri, 8 Jul 2011 22:06:29 +0200 Subject: [PATCH 58/82] Fix compile warning --- declarativeimports/draganddrop/DeclarativeDragArea.h | 2 +- declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/declarativeimports/draganddrop/DeclarativeDragArea.h b/declarativeimports/draganddrop/DeclarativeDragArea.h index e81b3b07d..f2f638c14 100644 --- a/declarativeimports/draganddrop/DeclarativeDragArea.h +++ b/declarativeimports/draganddrop/DeclarativeDragArea.h @@ -86,10 +86,10 @@ private: QDeclarativeComponent* m_delegate; QDeclarativeItem* m_source; QDeclarativeItem* m_target; - DeclarativeMimeData* const m_data; bool m_enabled; Qt::DropActions m_supportedActions; Qt::DropAction m_defaultAction; + DeclarativeMimeData* const m_data; }; #endif // DECLARATIVEDRAGAREA_H diff --git a/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp b/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp index cd5fed70b..765386259 100644 --- a/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp +++ b/declarativeimports/draganddrop/DeclarativeDragDropEvent.cpp @@ -25,12 +25,12 @@ DeclarativeDragDropEvent::DeclarativeDragDropEvent(QGraphicsSceneDragDropEvent* e, QObject* parent) : QObject(parent), - m_event(e), m_x(e->pos().x()), m_y(e->pos().y()), m_buttons(e->buttons()), m_modifiers(e->modifiers()), - m_data(e->mimeData()) + m_data(e->mimeData()), + m_event(e) { } From b615e3f5fa798a7a667d2a6d94acb9479ed4de1a Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 10 Jul 2011 09:21:33 +0200 Subject: [PATCH 59/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 1 + .../data/plasma-scriptengine-applet-declarative.desktop | 2 ++ 2 files changed, 3 insertions(+) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index b3a47cc3f..f7f89da43 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -30,6 +30,7 @@ Name[lt]=plasma-kpart Name[nb]=plasma-kpart Name[nds]=Kpart för Plasma Name[nl]=plasma-kpart +Name[nn]=plasma-kpart Name[pa]=plasma-kpart Name[pl]=plasma-kpart Name[pt]=plasma-kpart diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 51adb22a2..6bf19ab9c 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -26,6 +26,7 @@ Name[lt]=Deklaratyvus valdiklis Name[nb]=Deklarativt skjermelement Name[nds]=Stüerelement för Verkloren Name[nl]=Widget voor declaratie +Name[nn]=Deklarativt skjermelement Name[pl]=Deklaratywny element interfejsu Name[pt]=Item declarativo Name[pt_BR]=Widget declarativo @@ -75,6 +76,7 @@ Comment[lt]=Nuosavas Plasma valdiklis parašytas QML ir JavaScript kalba Comment[nb]=Plasmaelement for dette systemet, skrevet i QML og JavaScript Comment[nds]=En orginaal Plasmaelement, schreven in QML un JavaScript Comment[nl]=Hier thuishorend Plasma-widget geschreven in QML en JavaScript +Comment[nn]=Plasma-element skriven i QML og JavaScript Comment[pa]=QML ਤੇ ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿੱਚ ਲਿਖੇ ਨੇਟਿਵ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ Comment[pl]=Element interfejsu Plazmy napisany w QML lub JavaScript Comment[pt]=Elemento nativo do Plasma feito em QML e JavaScript From b30f6889382c3a05ad8f9c60553b3cd3810d7e93 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Mon, 11 Jul 2011 10:55:46 +0200 Subject: [PATCH 60/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 1 + scriptengines/javascript/data/plasma-javascriptaddon.desktop | 1 + .../data/plasma-packagestructure-javascript-addon.desktop | 3 ++- .../data/plasma-scriptengine-applet-declarative.desktop | 1 + .../data/plasma-scriptengine-dataengine-javascript.desktop | 2 ++ .../data/plasma-scriptengine-runner-javascript.desktop | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index f7f89da43..b298ca710 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Name=plasma-kpart Name[ast]=plasma-kpart +Name[bg]=plasma-kpart Name[bs]=plasma-kpart Name[ca]=plasma-kpart Name[ca@valencia]=plasma-kpart diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index d77fb00a4..293c42af6 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -50,6 +50,7 @@ Name[th]=ส่วนเสริมจาวาและจาวาสคร Name[tr]=Plasma JavaScript Eklentisi Name[ug]=Plasma JavaScript قوشۇلما Name[uk]=Додаток JavaScript до Плазми +Name[wa]=Pacaedje di rawete Plasma JavaScript Name[x-test]=xxPlasma JavaScript Addonxx Name[zh_CN]=Plasma JavaScript 附加插件 Name[zh_TW]=Plasma JavaScript Addon diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 3ffdccefb..8d14d27a0 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Javascript Addon Name[ast]=Complementu de JavaScript -Name[bg]=Добавка за JavaScript +Name[bg]=Добавка за Javascript Name[bs]=Javaskriptni dodatak Name[ca]=Complement del Javascript Name[ca@valencia]=Complement del Javascript @@ -49,6 +49,7 @@ Name[th]=ส่วนเสริมจาวาสคริปต์ Name[tr]=Javascript Eklentisi Name[ug]=Javascript قوشۇلما Name[uk]=Додаток JavaScript +Name[wa]=Pacaedje di rawete Javascript Name[x-test]=xxJavascript Addonxx Name[zh_CN]=Javascript 插件 Name[zh_TW]=Javascript Addon diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 6bf19ab9c..3baf322e2 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -48,6 +48,7 @@ Name[zh_CN]=描述部件 Name[zh_TW]=宣告元件 Comment=Native Plasma widget written in QML and JavaScript Comment[ast]=Elementu gráficu nativu de Plasma escritu en QML y JavaScript +Comment[bg]=Оригинална джаджа за Plasma, написана наQML и JavaScript Comment[bs]=Samosvojni plazma grafičkih kontrola napisana u QML‑u i javaskriptu Comment[ca]=Estri nadiu del Plasma escrit en QML i JavaScript Comment[ca@valencia]=Estri nadiu del Plasma escrit en QML i JavaScript diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index c9ba13606..3b0c00e8a 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -2,6 +2,7 @@ Name=JavaScript DataEngine Name[ar]=مشغل جافا سكربت Name[ast]=Motor de datos JavaScript +Name[bg]=Ядро за данни на JavaScript Name[bs]=Javascript pogon podataka Name[ca]=Motor de dades de JavaScript Name[ca@valencia]=Motor de dades de JavaScript @@ -59,6 +60,7 @@ Name[th]=กลไกข้อมูลของจาวาสคริปต Name[tr]=JavaScript Veri Motoru Name[ug]=JavaScript سانلىق مەلۇمات ماتورى Name[uk]=Рушій даних JavaScript +Name[wa]=Moteur di dnêyes JavaScript Name[x-test]=xxJavaScript DataEnginexx Name[zh_CN]=JavaScript 数据引擎 Name[zh_TW]=JavaScript 資料引擎 diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index b6f5804e5..5f47b3933 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -145,6 +145,7 @@ Comment[th]=ตัวประมวลผลจาวาสคริปต์ Comment[tr]=JavaScript Çalıştırıcı Comment[ug]=JavaScript ئىجراچىسى Comment[uk]=Механізм запуску JavaScript +Comment[wa]=Enondeu JavaScript Comment[x-test]=xxJavaScript Runnerxx Comment[zh_CN]=JavaScript 运行器 Comment[zh_TW]=JavaScript 執行器 From 1d5ec8c2e04c0626af5cac800f12e58079b978dc Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 11 Jul 2011 21:23:32 +0200 Subject: [PATCH 61/82] insert a catalog named as the plugin name --- scriptengines/javascript/plasmoid/declarativeappletscript.cpp | 1 + scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index 08d53fa67..5bd0b9858 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -70,6 +70,7 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant m_env(0), m_auth(this) { + KGlobal::locale()->insertCatalog(description().pluginName()); Q_UNUSED(args); } diff --git a/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp b/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp index 0076cd882..b0b13e5d4 100644 --- a/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp +++ b/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp @@ -105,6 +105,8 @@ SimpleJavaScriptApplet::SimpleJavaScriptApplet(QObject *parent, const QVariantLi Q_UNUSED(args); // kDebug() << "Script applet launched, args" << applet()->startupArguments(); + KGlobal::locale()->insertCatalog(description().pluginName()); + // TODO this will be set to the engine we get from QML m_engine = new QScriptEngine(this); m_env = new ScriptEnv(this, m_engine); From 756b3f168569e1e9f71f2c4b8667bc9fb54ff37c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 11 Jul 2011 22:44:05 +0200 Subject: [PATCH 62/82] crash-- move after first call to applet() --- scriptengines/javascript/plasmoid/declarativeappletscript.cpp | 2 +- scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp index 5bd0b9858..6f5cc956d 100644 --- a/scriptengines/javascript/plasmoid/declarativeappletscript.cpp +++ b/scriptengines/javascript/plasmoid/declarativeappletscript.cpp @@ -70,7 +70,6 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant m_env(0), m_auth(this) { - KGlobal::locale()->insertCatalog(description().pluginName()); Q_UNUSED(args); } @@ -82,6 +81,7 @@ bool DeclarativeAppletScript::init() { m_declarativeWidget = new Plasma::DeclarativeWidget(applet()); m_declarativeWidget->setInitializationDelayed(true); + KGlobal::locale()->insertCatalog(description().pluginName()); //make possible to import extensions from the package //FIXME: probably to be removed, would make possible to use native code from within the package :/ diff --git a/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp b/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp index b0b13e5d4..dba71f2a4 100644 --- a/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp +++ b/scriptengines/javascript/plasmoid/simplejavascriptapplet.cpp @@ -105,8 +105,6 @@ SimpleJavaScriptApplet::SimpleJavaScriptApplet(QObject *parent, const QVariantLi Q_UNUSED(args); // kDebug() << "Script applet launched, args" << applet()->startupArguments(); - KGlobal::locale()->insertCatalog(description().pluginName()); - // TODO this will be set to the engine we get from QML m_engine = new QScriptEngine(this); m_env = new ScriptEnv(this, m_engine); @@ -311,6 +309,7 @@ bool SimpleJavaScriptApplet::init() this, SLOT(extenderItemRestored(Plasma::ExtenderItem*))); connect(applet(), SIGNAL(activate()), this, SLOT(activate())); + KGlobal::locale()->insertCatalog(description().pluginName()); setupObjects(); AppletAuthorization auth(this); From 471fbd1d304aa2f218a1edef388508b0da6d9fa0 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Tue, 12 Jul 2011 10:36:11 +0200 Subject: [PATCH 63/82] SVN_SILENT made messages (.desktop file) --- remotewidgetshelper/kcm_remotewidgets.actions | 2 ++ .../data/plasma-scriptengine-applet-declarative.desktop | 1 + 2 files changed, 3 insertions(+) diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 8b4a7e7c3..3d110c183 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -2,6 +2,7 @@ Name=Save remote widgets' policies Name[ar]=احفظ سياسات الودجات البعيدة Name[ast]=Guardáu de polítiques d'elementos gráficos remotos +Name[bg]=Запазване на правилата на отдалечените джаджи Name[bs]=Sačuvaj smjernice za udaljene grafičke kontrole Name[ca]=Desa les polítiques d'estris remots Name[ca@valencia]=Alça les polítiques d'estris remots @@ -58,6 +59,7 @@ Name[zh_TW]=儲存遠端元件政策 Description=Prevents the system from saving remote plasma widgets' policies Description[ar]=يمنع النظام من حفظ سياسات ودجات بلازما البعيدة Description[ast]=Impide que'l sistema guarde polítiques d'elementos gráficos Plasma remotos +Description[bg]=Забраняване запазването на правилата на отдалечените джаджи Description[bs]=Sprečava sistem da sačuva smjernice udaljenih plazma grafičkih kontrola Description[ca]=Evita al sistema de desar polítiques d'estris remots del plasma Description[ca@valencia]=Evita al sistema d'alçar polítiques d'estris remots del plasma diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 3baf322e2..6f9730a5f 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Name=Declarative widget Name[ast]=Elementu gráficu declarativu +Name[bg]=Декларативна джаджа Name[bs]=Deklarativna grafička kontrola Name[ca]=Estri declaratiu Name[ca@valencia]=Estri declaratiu From 6354e56a91e95ff9ff535dfb00552106a3a20578 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 12 Jul 2011 20:30:22 +0200 Subject: [PATCH 64/82] emit visiblechanged when it should --- declarativeimports/core/dialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 4184ccc92..d5f1b424e 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -181,7 +181,6 @@ void DialogProxy::setVisible(const bool visible) m_dialog->setVisible(visible); m_dialog->raise(); } - emit visibleChanged(); } } @@ -271,6 +270,10 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) if (re->oldSize().height() != re->size().height()) { emit heightChanged(); } + } else if (watched == m_dialog && event->type() == QEvent::Show) { + emit visibleChanged(); + } else if (watched == m_dialog && event->type() == QEvent::Hide) { + emit visibleChanged(); } else if (watched == m_dialog && event->type() == QEvent::WindowActivate) { m_activeWindow = true; emit activeWindowChanged(); From 7b1359d2d322d2c48a33894238d71ae95222d64c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 13 Jul 2011 12:32:01 +0200 Subject: [PATCH 65/82] get rid of some dead code --- kpart/plasmakpart.cpp | 9 --------- kpart/plasmakpart.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/kpart/plasmakpart.cpp b/kpart/plasmakpart.cpp index 06f612cef..aaf692ff4 100644 --- a/kpart/plasmakpart.cpp +++ b/kpart/plasmakpart.cpp @@ -66,10 +66,6 @@ PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantL } } - if (args.length() > 1) { - m_category = args.at(1).value(); - } - // this line initializes the corona. corona(); } @@ -173,9 +169,4 @@ bool PlasmaKPart::setPluginLoader(Plasma::PluginLoader *loader) return true; } -QString PlasmaKPart::category() -{ - return m_category; -} - #include "plasmakpart.moc" diff --git a/kpart/plasmakpart.h b/kpart/plasmakpart.h index d0f2a07dd..f10f2ed24 100644 --- a/kpart/plasmakpart.h +++ b/kpart/plasmakpart.h @@ -54,7 +54,6 @@ public: PlasmaKPartCorona *corona(); Plasma::Containment *containment(); - QString category(); public Q_SLOTS: /** @@ -107,7 +106,6 @@ private Q_SLOTS: private: PlasmaKPartCorona* m_corona; PlasmaKPartView* m_view; - QString m_category; KService::Ptr m_service; QHash* m_appletList; QVBoxLayout* m_configLayout; From dd95295cb09571c74eac4727fe57b7adc3031aa8 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 13 Jul 2011 12:41:25 +0200 Subject: [PATCH 66/82] no reason to provide 3 ways to do something when there are already 2 fine ways --- kpart/plasmakpart.cpp | 42 ++++++++++++++++-------------------- kpart/plasmakpart.h | 50 ++++++++++++++++--------------------------- 2 files changed, 37 insertions(+), 55 deletions(-) diff --git a/kpart/plasmakpart.cpp b/kpart/plasmakpart.cpp index aaf692ff4..9af169f55 100644 --- a/kpart/plasmakpart.cpp +++ b/kpart/plasmakpart.cpp @@ -66,8 +66,7 @@ PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantL } } - // this line initializes the corona. - corona(); + initCorona(); } PlasmaKPart::~PlasmaKPart() @@ -117,19 +116,24 @@ void PlasmaKPart::syncConfig() KGlobal::config()->sync(); } -PlasmaKPartCorona* PlasmaKPart::corona() +void PlasmaKPart::initCorona() { - if (!m_corona) { - m_corona = new PlasmaKPartCorona(this); - connect(m_corona, SIGNAL(containmentAdded(Plasma::Containment*)), this, SLOT(createView(Plasma::Containment*))); - connect(m_corona, SIGNAL(configSynced()), this, SLOT(syncConfig())); - - m_corona->setItemIndexMethod(QGraphicsScene::NoIndex); - m_corona->initializeLayout(); - - m_view->show(); + if (m_corona) { + return; } + m_corona = new PlasmaKPartCorona(this); + connect(m_corona, SIGNAL(containmentAdded(Plasma::Containment*)), this, SLOT(createView(Plasma::Containment*))); + connect(m_corona, SIGNAL(configSynced()), this, SLOT(syncConfig())); + + m_corona->setItemIndexMethod(QGraphicsScene::NoIndex); + m_corona->initializeLayout(); + + m_view->show(); +} + +PlasmaKPartCorona* PlasmaKPart::corona() const +{ return m_corona; } @@ -149,24 +153,14 @@ void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const containment()->addApplet(name, args, geometry); } -Plasma::Applet::List PlasmaKPart::listActiveApplets( ) +Plasma::Applet::List PlasmaKPart::listActiveApplets() const { return containment()->applets(); } -Plasma::Containment* PlasmaKPart::containment() +Plasma::Containment* PlasmaKPart::containment() const { return corona()->containments().first(); } -bool PlasmaKPart::setPluginLoader(Plasma::PluginLoader *loader) -{ - if (Plasma::PluginLoader::pluginLoader()) { - return false; - } - - Plasma::PluginLoader::setPluginLoader(loader); - return true; -} - #include "plasmakpart.moc" diff --git a/kpart/plasmakpart.h b/kpart/plasmakpart.h index f10f2ed24..fa8f3546c 100644 --- a/kpart/plasmakpart.h +++ b/kpart/plasmakpart.h @@ -47,13 +47,27 @@ class PlasmaKPart : public KParts::ReadOnlyPart Q_PROPERTY(Plasma::Applet::List activeApplets READ listActiveApplets) public: + /** + * The default constructor. + * The args may contain a pointer to a Plasma::PluginLoader as the first parameter. + * Note that only one Plasma::PluginLoader can be active at a time, and that the + * prefered mechanism for registering the plugin loader is via + * Plasma::PluginLoader::setPluginLoader + */ PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantList &args); ~PlasmaKPart(); void notifyStartup(bool completed); - PlasmaKPartCorona *corona(); - Plasma::Containment *containment(); + PlasmaKPartCorona *corona() const; + Plasma::Containment *containment() const; + + /** + * Returns a list of active applets in the containment. + * + * @return A list of the containment's Applets + **/ + Plasma::Applet::List listActiveApplets() const; public Q_SLOTS: /** @@ -65,38 +79,12 @@ public Q_SLOTS: **/ void addApplet(const QString &pluginName, const QVariantList &args = QVariantList(), const QRectF &dimensions = QRectF()); - /** - * Sets the application-specific plugin loader. This allows - * applications which need to add internal applets (such - * as existing QWidget-based dashboard plugins), services or - * data engines to the Plasma dashboard. The preferred way to - * set this loader is by passing it to the KPart wrapped in a - * QVariant in the @p args parameter of the KPart constructor. - * This method is provided for applications which cannot set - * the loader in this method. - * The method will return false if Plasma already has a - * PluginLoader in memory, and will return true if the PluginLoader - * is successfully set. - * - * @param loader The loader which you want Plasma to query for - * new Applets, Data Engines and Services. - * @return True if the loader was successfully set, false otherwise - * (If Plasma already has a PluginLoader in memory) - * - * @short Set application-specific plugin loader - **/ - bool setPluginLoader(Plasma::PluginLoader *loader); - - /** - * Returns a list of active applets in the containment. - * - * @return A list of the containment's Applets - **/ - Plasma::Applet::List listActiveApplets(); - Q_SIGNALS: void viewCreated(); +private: + void initCorona(); + private Q_SLOTS: void cleanup(); void syncConfig(); From 201baafc1c7a0480e993ca771f96953c76fb854c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 13 Jul 2011 13:14:40 +0200 Subject: [PATCH 67/82] mainitem can be null according to the if() below, so respect that --- declarativeimports/core/dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index d5f1b424e..be07a45d8 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -106,9 +106,11 @@ void DialogProxy::setMainItem(QGraphicsObject *mainItem) { if (m_mainItem.data() != mainItem) { if (m_mainItem) { - m_mainItem.data()->setParent(mainItem->parent()); + m_mainItem.data()->setParent(mainItem ? mainItem->parent() : 0); } + m_mainItem = mainItem; + if (mainItem) { mainItem->setParentItem(0); mainItem->setParent(this); From e2f4b4ecc2cac710948bfa552c0c2ef3e316cabe Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 13 Jul 2011 13:16:14 +0200 Subject: [PATCH 68/82] protect against accessing a null --- declarativeimports/core/dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index be07a45d8..b377a45ee 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -153,8 +153,10 @@ void DialogProxy::syncMainItem() QGraphicsWidget *widget = qobject_cast(m_mainItem.data()); if (widget) { - m_declarativeItemContainer->deleteLater(); - m_declarativeItemContainer = 0; + if (m_declarativeItemContainer) { + m_declarativeItemContainer->deleteLater(); + m_declarativeItemContainer = 0; + } } else { QDeclarativeItem *di = qobject_cast(m_mainItem.data()); if (di) { From e3f18bded0e2fa441924a2ee4642951b4d06bd65 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 15 Jul 2011 13:18:21 +0200 Subject: [PATCH 69/82] only let a source be valid if there is an engine and the engine is valid --- declarativeimports/core/datasource_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/core/datasource_p.h b/declarativeimports/core/datasource_p.h index edf9a9062..1004da049 100644 --- a/declarativeimports/core/datasource_p.h +++ b/declarativeimports/core/datasource_p.h @@ -55,7 +55,7 @@ public: DataSource(QObject* parent=0); Q_PROPERTY(bool valid READ valid) - bool valid() const {return m_dataEngine != 0;} + bool valid() const {return m_dataEngine && m_dataEngine->isValid();} Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged) int interval() const {return m_interval;} From e8432fe351107044b1effa88149f08a8848e91a7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 25 Jul 2011 19:11:36 +0200 Subject: [PATCH 70/82] don't reset the model if the source isn't ours --- declarativeimports/core/datamodel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index fd8d8d4c0..d4f28c0a4 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -293,20 +293,25 @@ void DataModel::removeSource(const QString &sourceName) { //FIXME: this could be way more efficient by not resetting the whole model //FIXME: find a way to remove only the proper things also in the case where sources are items - beginResetModel(); + //source name as key of the map if (!m_keyRoleFilter.isEmpty()) { - m_items.remove(sourceName); + if (m_items.contains(sourceName)) { + beginResetModel(); + m_items.remove(sourceName); + endResetModel(); + } //source name in the map, linear scan } else { for (int i = 0; i < m_items.value(QString()).count(); ++i) { if (m_items.value(QString())[i].value().value("DataEngineSource") == sourceName) { + beginResetModel(); m_items[QString()].remove(i); + endResetModel(); break; } } } - endResetModel(); } QVariant DataModel::data(const QModelIndex &index, int role) const From 7e468ca59c8a970988c57b9a713ad6844642614a Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 10 Aug 2011 16:12:23 +0200 Subject: [PATCH 71/82] Remove unused variable --- kpart/plasmakpart.cpp | 3 +-- kpart/plasmakpart.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/kpart/plasmakpart.cpp b/kpart/plasmakpart.cpp index 9af169f55..a6a2d0ec9 100644 --- a/kpart/plasmakpart.cpp +++ b/kpart/plasmakpart.cpp @@ -45,8 +45,7 @@ K_EXPORT_PLUGIN(plasmaKPartFactory("plasma-kpart","plasma-kpart") ) PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantList &args) : KParts::ReadOnlyPart(parent), m_corona(0), - m_view(new PlasmaKPartView(0, 1, parentWidget)), - m_service(0) + m_view(new PlasmaKPartView(0, 1, parentWidget)) { setComponentData(plasmaKPartFactory::componentData()); diff --git a/kpart/plasmakpart.h b/kpart/plasmakpart.h index fa8f3546c..7b0473b79 100644 --- a/kpart/plasmakpart.h +++ b/kpart/plasmakpart.h @@ -35,7 +35,6 @@ namespace Plasma } #include -#include #include class QVariant; @@ -94,7 +93,6 @@ private Q_SLOTS: private: PlasmaKPartCorona* m_corona; PlasmaKPartView* m_view; - KService::Ptr m_service; QHash* m_appletList; QVBoxLayout* m_configLayout; }; From da77944f679c876501b30bef9f38bac8961a37d0 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 7 Aug 2011 09:53:28 +0200 Subject: [PATCH 72/82] remove some dead code, simplify --- kpart/plasmakpartcorona.cpp | 6 ------ kpart/plasmakpartcorona.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/kpart/plasmakpartcorona.cpp b/kpart/plasmakpartcorona.cpp index 99f84da54..d598390e9 100644 --- a/kpart/plasmakpartcorona.cpp +++ b/kpart/plasmakpartcorona.cpp @@ -33,11 +33,6 @@ PlasmaKPartCorona::PlasmaKPartCorona(QObject *parent) : Plasma::Corona(parent) -{ - init(); -} - -void PlasmaKPartCorona::init() { enableAction("Lock Widgets", false); enableAction("Shortcut Settings", false); @@ -47,7 +42,6 @@ void PlasmaKPartCorona::init() void PlasmaKPartCorona::loadDefaultLayout() { // used to force a save into the config file - KConfigGroup invalidConfig; Plasma::Containment *c = addContainment(QString()); if (!c) { diff --git a/kpart/plasmakpartcorona.h b/kpart/plasmakpartcorona.h index 3df552502..b260ce747 100644 --- a/kpart/plasmakpartcorona.h +++ b/kpart/plasmakpartcorona.h @@ -39,12 +39,10 @@ public: PlasmaKPartCorona(QObject* parent); Plasma::Containment *containment(); - void loadDefaultLayout(); private: void evaluateScripts(const QStringList &scripts); - void init(); private Q_SLOTS: void printScriptError(const QString &error); From 847bdbedc309c73999fb0415d5ad48e1f769a109 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 7 Aug 2011 09:54:47 +0200 Subject: [PATCH 73/82] more unused code removed --- kpart/plasmakpartcorona.cpp | 11 ----------- kpart/plasmakpartcorona.h | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/kpart/plasmakpartcorona.cpp b/kpart/plasmakpartcorona.cpp index d598390e9..6bcece1cd 100644 --- a/kpart/plasmakpartcorona.cpp +++ b/kpart/plasmakpartcorona.cpp @@ -79,15 +79,4 @@ void PlasmaKPartCorona::printScriptMessage(const QString &error) kDebug() << "Startup script: " << error; } -Plasma::Containment* PlasmaKPartCorona::containment() -{ - // We only have one containment, so just try and return the first one - QList list = containments(); - if (!list.isEmpty()) { - return list.first(); - } - - return 0; -} - #include "plasmakpartcorona.moc" diff --git a/kpart/plasmakpartcorona.h b/kpart/plasmakpartcorona.h index b260ce747..6137b8c8b 100644 --- a/kpart/plasmakpartcorona.h +++ b/kpart/plasmakpartcorona.h @@ -38,10 +38,8 @@ Q_OBJECT public: PlasmaKPartCorona(QObject* parent); - Plasma::Containment *containment(); +protected: void loadDefaultLayout(); - -private: void evaluateScripts(const QStringList &scripts); private Q_SLOTS: From 9fb8a3518ac55bee8d9146bff841cab635e5d90c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 11 Aug 2011 00:16:24 +0200 Subject: [PATCH 74/82] make it possible to save and restore from config files --- kpart/plasmakpart.cpp | 81 ++++++++++++++++++++----------------------- kpart/plasmakpart.h | 13 ++++--- 2 files changed, 44 insertions(+), 50 deletions(-) diff --git a/kpart/plasmakpart.cpp b/kpart/plasmakpart.cpp index a6a2d0ec9..85ba434b3 100644 --- a/kpart/plasmakpart.cpp +++ b/kpart/plasmakpart.cpp @@ -22,8 +22,15 @@ #include "plasmakpart.h" -#include "plasmakpartcorona.h" -#include "plasmakpartview.h" +#include +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -31,13 +38,8 @@ #include #include -#include -#include - -#include -#include -#include -#include +#include "plasmakpartcorona.h" +#include "plasmakpartview.h" K_PLUGIN_FACTORY(plasmaKPartFactory, registerPlugin();) K_EXPORT_PLUGIN(plasmaKPartFactory("plasma-kpart","plasma-kpart") ) @@ -65,11 +67,23 @@ PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantL } } - initCorona(); + QTimer::singleShot(0, this, SLOT(initCorona())); } PlasmaKPart::~PlasmaKPart() { + delete m_view; + m_view = 0; + + if (!m_configFile.isEmpty()) { + m_corona->saveLayout(); + } + + delete m_corona; + m_corona = 0; + + //TODO: This manual sync() should not be necessary? + syncConfig(); } void PlasmaKPart::setThemeDefaults() @@ -84,32 +98,6 @@ void PlasmaKPart::setThemeDefaults() Plasma::Theme::defaultTheme()->setFont(cg.readEntry("desktopFont", QFont("Sans") )); } -void PlasmaKPart::cleanup() -{ - if (m_corona) { - m_corona->saveLayout(); - } - - if (!m_view->containment()) { - return; - } - - // save the mapping of Views to Containments at the moment - // of application exit so we can restore that when we start again. - KConfigGroup viewIds(KGlobal::config(), "ViewIds"); - viewIds.deleteGroup(); - viewIds.writeEntry(QString::number(m_view->containment()->id()), 1); - - delete m_view; - m_view = 0; - - delete m_corona; - m_corona = 0; - - //TODO: This manual sync() should not be necessary? - syncConfig(); -} - void PlasmaKPart::syncConfig() { KGlobal::config()->sync(); @@ -126,7 +114,7 @@ void PlasmaKPart::initCorona() connect(m_corona, SIGNAL(configSynced()), this, SLOT(syncConfig())); m_corona->setItemIndexMethod(QGraphicsScene::NoIndex); - m_corona->initializeLayout(); + m_corona->initializeLayout(m_configFile); m_view->show(); } @@ -138,13 +126,7 @@ PlasmaKPartCorona* PlasmaKPart::corona() const void PlasmaKPart::createView(Plasma::Containment *containment) { - KConfigGroup viewIds(KGlobal::config(), "ViewIds"); - int id = viewIds.readEntry(QString::number(containment->id()), 1); - - kDebug() << "new containment" << (QObject*)containment << containment->id()<<"view id"<setContainment(containment); - emit viewCreated(); } void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const QRectF& geometry ) @@ -157,6 +139,19 @@ Plasma::Applet::List PlasmaKPart::listActiveApplets() const return containment()->applets(); } +QString PlasmaKPart::configFile() const +{ + return m_configFile; +} + +void PlasmaKPart::setConfigFile(const QString &file) +{ + m_configFile = file; + if (m_corona && QFile::exists(m_configFile)) { + m_corona->initializeLayout(m_configFile); + } +} + Plasma::Containment* PlasmaKPart::containment() const { return corona()->containments().first(); diff --git a/kpart/plasmakpart.h b/kpart/plasmakpart.h index 7b0473b79..92de38524 100644 --- a/kpart/plasmakpart.h +++ b/kpart/plasmakpart.h @@ -44,6 +44,7 @@ class PlasmaKPart : public KParts::ReadOnlyPart { Q_OBJECT Q_PROPERTY(Plasma::Applet::List activeApplets READ listActiveApplets) + Q_PROPERTY(QString configFile READ configFile WRITE setConfigFile) public: /** @@ -68,6 +69,9 @@ public: **/ Plasma::Applet::List listActiveApplets() const; + QString configFile() const; + void setConfigFile(const QString &file); + public Q_SLOTS: /** * Add an applet to the currently running containment. @@ -78,14 +82,8 @@ public Q_SLOTS: **/ void addApplet(const QString &pluginName, const QVariantList &args = QVariantList(), const QRectF &dimensions = QRectF()); -Q_SIGNALS: - void viewCreated(); - -private: - void initCorona(); - private Q_SLOTS: - void cleanup(); + void initCorona(); void syncConfig(); void createView(Plasma::Containment* containment); void setThemeDefaults(); @@ -95,6 +93,7 @@ private: PlasmaKPartView* m_view; QHash* m_appletList; QVBoxLayout* m_configLayout; + QString m_configFile; }; #endif // multiple inclusion guard From 96edc153a8afe69f7b572b0de736a433fa217324 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 11 Aug 2011 01:29:10 +0200 Subject: [PATCH 75/82] don't autodelete the part, thereby avoiding crashes --- kpart/plasmakpart.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kpart/plasmakpart.cpp b/kpart/plasmakpart.cpp index 85ba434b3..9259a20b7 100644 --- a/kpart/plasmakpart.cpp +++ b/kpart/plasmakpart.cpp @@ -47,7 +47,7 @@ K_EXPORT_PLUGIN(plasmaKPartFactory("plasma-kpart","plasma-kpart") ) PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantList &args) : KParts::ReadOnlyPart(parent), m_corona(0), - m_view(new PlasmaKPartView(0, 1, parentWidget)) + m_view(new PlasmaKPartView(0, 1)) { setComponentData(plasmaKPartFactory::componentData()); @@ -67,6 +67,7 @@ PlasmaKPart::PlasmaKPart(QWidget *parentWidget, QObject *parent, const QVariantL } } + setAutoDeletePart(false); QTimer::singleShot(0, this, SLOT(initCorona())); } From 6d7b475468d841a09236d05a986b1d174dd4c397 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 15 Aug 2011 19:32:01 +0200 Subject: [PATCH 76/82] location property that decides the sliding effect --- declarativeimports/core/dialog.cpp | 21 ++++++++++++++++++++- declarativeimports/core/dialog.h | 8 ++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index b377a45ee..3b063f36e 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -28,6 +28,7 @@ #include #include +#include DialogMargins::DialogMargins(Plasma::Dialog *dialog, QObject *parent) @@ -83,7 +84,8 @@ int DialogMargins::bottom() const DialogProxy::DialogProxy(QObject *parent) : QObject(parent), m_declarativeItemContainer(0), - m_activeWindow(false) + m_activeWindow(false), + m_location(Plasma::Floating) { m_dialog = new Plasma::Dialog(); m_margins = new DialogMargins(m_dialog, this); @@ -248,6 +250,21 @@ void DialogProxy::setWindowFlags(const int flags) m_dialog->setWindowFlags((Qt::WindowFlags)flags); } +int DialogProxy::location() const +{ + return (int)m_location; +} + +void DialogProxy::setLocation(int location) +{ + if (m_location == location) { + return; + } + m_location = (Plasma::Location)location; + emit locationChanged(); +} + + QObject *DialogProxy::margins() const { return m_margins; @@ -275,8 +292,10 @@ bool DialogProxy::eventFilter(QObject *watched, QEvent *event) emit heightChanged(); } } else if (watched == m_dialog && event->type() == QEvent::Show) { + Plasma::WindowEffects::slideWindow(m_dialog, m_location); emit visibleChanged(); } else if (watched == m_dialog && event->type() == QEvent::Hide) { + Plasma::WindowEffects::slideWindow(m_dialog, m_location); emit visibleChanged(); } else if (watched == m_dialog && event->type() == QEvent::WindowActivate) { m_activeWindow = true; diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 5d60d13bc..a871a80d1 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -23,6 +23,8 @@ #include #include +#include + class QGraphicsObject; namespace Plasma @@ -81,6 +83,7 @@ class DialogProxy : public QObject Q_PROPERTY(int windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QObject *margins READ margins CONSTANT) Q_PROPERTY(bool activeWindow READ isActiveWindow NOTIFY activeWindowChanged) + Q_PROPERTY(int location READ location WRITE setLocation NOTIFY locationChanged) public: enum WidgetAttribute { @@ -111,6 +114,9 @@ public: int windowFlags() const; void setWindowFlags(const int); + int location() const; + void setLocation(int location); + QObject *margins() const; //FIXME: alignment should be Qt::AlignmentFlag @@ -126,6 +132,7 @@ Q_SIGNALS: void widthChanged(); void heightChanged(); void activeWindowChanged(); + void locationChanged(); protected Q_SLOTS: void syncMainItem(); @@ -140,6 +147,7 @@ private: QWeakPointer m_mainItem; DialogMargins *m_margins; bool m_activeWindow; + Plasma::Location m_location; }; #endif From 115408d521b027a1b3b88a3e5f2a222a7ebf6936 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sat, 20 Aug 2011 10:12:34 +0200 Subject: [PATCH 77/82] unbreak service usage --- scriptengines/javascript/simplebindings/dataengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scriptengines/javascript/simplebindings/dataengine.cpp b/scriptengines/javascript/simplebindings/dataengine.cpp index bc3f467d3..299e00c2f 100644 --- a/scriptengines/javascript/simplebindings/dataengine.cpp +++ b/scriptengines/javascript/simplebindings/dataengine.cpp @@ -66,5 +66,7 @@ void registerDataEngineMetaTypes(QScriptEngine *engine) qScriptRegisterMetaType(engine, qScriptValueFromService, serviceFromQScriptValue); qScriptRegisterMetaType(engine, qScriptValueFromDataEngine, dataEngineFromQScriptValue); qScriptRegisterMetaType(engine, qScriptValueFromServiceJob, serviceJobFromQScriptValue); + qRegisterMetaType("Service*"); + qRegisterMetaType("ServiceJob*"); } From 019617f3bc14bfedd79f1718fbcc30e16373cf05 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 20 Aug 2011 17:43:36 +0200 Subject: [PATCH 78/82] paint grey when disabled --- declarativeimports/qtextracomponents/qiconitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/qtextracomponents/qiconitem.cpp b/declarativeimports/qtextracomponents/qiconitem.cpp index e54c49b33..d72381e47 100644 --- a/declarativeimports/qtextracomponents/qiconitem.cpp +++ b/declarativeimports/qtextracomponents/qiconitem.cpp @@ -73,7 +73,7 @@ void QIconItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->setRenderHint(QPainter::Antialiasing, m_smooth); painter->setRenderHint(QPainter::SmoothPixmapTransform, m_smooth); - m_icon.paint(painter, boundingRect().toRect()); + m_icon.paint(painter, boundingRect().toRect(), Qt::AlignCenter, isEnabled()?QIcon::Normal:QIcon::Disabled); painter->setRenderHint(QPainter::Antialiasing, wasAntiAlias); painter->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothTransform); } From d48888e7acb841d1b277fc6d4bf806fe009fa18f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 1 Sep 2011 16:21:37 +0200 Subject: [PATCH 79/82] default to 0 interval (no polling) --- declarativeimports/core/datasource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/core/datasource.cpp b/declarativeimports/core/datasource.cpp index 598c41c37..a5bc4aca8 100644 --- a/declarativeimports/core/datasource.cpp +++ b/declarativeimports/core/datasource.cpp @@ -32,7 +32,7 @@ namespace Plasma { DataSource::DataSource(QObject* parent) : QObject(parent), - m_interval(1000), + m_interval(0), m_dataEngine(0) { setObjectName("DataSource"); From 834eb7c29361ef96f308c9a5d529ea30d2f39ecc Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 8 Sep 2011 09:03:17 +0200 Subject: [PATCH 80/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 53 ------- remotewidgetshelper/kcm_remotewidgets.actions | 110 ------------- .../data/plasma-javascriptaddon.desktop | 54 ------- ...-packagestructure-javascript-addon.desktop | 104 ------------ ...ma-scriptengine-applet-declarative.desktop | 98 ------------ ...iptengine-applet-simple-javascript.desktop | 144 ----------------- ...scriptengine-dataengine-javascript.desktop | 64 -------- ...sma-scriptengine-runner-javascript.desktop | 148 ------------------ 8 files changed, 775 deletions(-) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index b298ca710..06526ae0c 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -1,58 +1,5 @@ [Desktop Entry] Name=plasma-kpart -Name[ast]=plasma-kpart -Name[bg]=plasma-kpart -Name[bs]=plasma-kpart -Name[ca]=plasma-kpart -Name[ca@valencia]=plasma-kpart -Name[cs]=plasma-kpart -Name[da]=plasma-kpart -Name[de]=plasma-kpart -Name[el]=plasma-kpart -Name[en_GB]=plasma-kpart -Name[es]=plasma-kpart -Name[et]=plasma-kpart -Name[eu]=plasma-kpart -Name[fi]=plasma-kpart -Name[fr]=plasma-kpart -Name[he]=plasma-kpart -Name[hi]=plasma-kpart -Name[hr]=plasma-kpart -Name[hu]=plasma-kpart -Name[ia]=plasma-kpart -Name[is]=plasma-kpart -Name[it]=plasma-kpart -Name[ja]=plasma-kpart -Name[kk]=plasma-kpart -Name[km]=plasma-kpart -Name[kn]=plasma-kpart -Name[ko]=plasma-kpart -Name[lt]=plasma-kpart -Name[nb]=plasma-kpart -Name[nds]=Kpart för Plasma -Name[nl]=plasma-kpart -Name[nn]=plasma-kpart -Name[pa]=plasma-kpart -Name[pl]=plasma-kpart -Name[pt]=plasma-kpart -Name[pt_BR]=plasma-kpart -Name[ro]=plasma-kpart -Name[ru]=plasma-kpart -Name[sk]=plasma-kpart -Name[sl]=plasma-kpart -Name[sr]=plasma-kpart -Name[sr@ijekavian]=plasma-kpart -Name[sr@ijekavianlatin]=plasma-kpart -Name[sr@latin]=plasma-kpart -Name[sv]=Plasma-delprogram -Name[th]=plasma-kpart -Name[tr]=plasma-kpart -Name[ug]=plasma-kpart -Name[uk]=plasma-kpart -Name[wa]=plasma-kpårt -Name[x-test]=xxplasma-kpartxx -Name[zh_CN]=plasma-kpart -Name[zh_TW]=plasma-kpart Type=Service ServiceTypes=KParts/Part X-KDE-Library=plasma-kpart diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 3d110c183..70c564c9d 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -1,114 +1,4 @@ [org.kde.kcontrol.kcmremotewidgets.save] Name=Save remote widgets' policies -Name[ar]=احفظ سياسات الودجات البعيدة -Name[ast]=Guardáu de polítiques d'elementos gráficos remotos -Name[bg]=Запазване на правилата на отдалечените джаджи -Name[bs]=Sačuvaj smjernice za udaljene grafičke kontrole -Name[ca]=Desa les polítiques d'estris remots -Name[ca@valencia]=Alça les polítiques d'estris remots -Name[cs]=Uložit zásady vzdálených widgetů -Name[da]=Gem politikker for eksterne widgets -Name[de]=Regelungen für entfernte Miniprogramme speichern -Name[el]=Αποθήκευση των πολιτικών απομακρυσμένων μικροεφαρμογών -Name[en_GB]=Save remote widgets' policies -Name[es]=Guardado de políticas de elementos gráficos remotos -Name[et]=Välisvidinate reeglite salvestamine -Name[eu]=Gorde urruneko trepeten politikak -Name[fi]=Tallenna etäkäyttöliittymäkomponenttien menettelytavat -Name[fr]=Enregistrer la politique des composants graphiques distants -Name[ga]=Sábháil polasaithe um giuirléidí cianda -Name[he]=שמירת מדיניות של ווידג׳טים מרוחקים -Name[hr]=Spremi pravila za udaljene widgete -Name[hu]=Távoli widgetek irányelveinek mentése -Name[ia]=Il salva le politicas del widgets remote -Name[id]=Simpan kebijakan widget jarak jauh -Name[is]=Vista stefnur varðandi fjartengdar græjur -Name[it]=Salva le linee guida degli oggetti remoti -Name[ja]=リモートウィジェットポリシーを保存 -Name[kk]=Қашықтағы виджеттер ережелерін сақтау -Name[km]=រក្សាទុក​គោលនយោបាយ​របស់​ធាតុក្រាហ្វិក​ពី​ចម្ងាយ -Name[ko]=원격 위젯의 정책 저장하기 -Name[lt]=Išsaugoti nutolusių valdiklių taisykles -Name[lv]=Saglabāt attālinātā sīkrīka politiku -Name[ml]=വിദൂര ഉരുപ്പടികള്‍ക്കുള്ള നയങ്ങള്‍ സൂക്ഷിയ്ക്കുക -Name[nb]=Lagre praksis for nettverkselementer -Name[nds]=Regeln för feern Lüttprogrammen sekern -Name[nl]=Beleidsregels voor widgets op afstand opslaan -Name[nn]=Lagra reglar for fjernelement -Name[pa]=ਰਿਮੋਟ ਵਿਦਜੈੱਟ ਦੀ ਪਾਲਸੀ ਸੰਭਾਲੋ -Name[pl]=Zapisz polityki zdalnych elementów interfejsu -Name[pt]=Gravar as políticas dos elementos remotos -Name[pt_BR]=Salvar políticas de widgets remotos -Name[ro]=Salvează politicile controalelor distante -Name[ru]=Сохранение правил удалённо доступных виджетов -Name[si]=දුරස්ථ විජට්ටුවල ප්‍රතිපත්ති සුරකින්න -Name[sk]=Uložiť politiky pre vzdialené widgety -Name[sl]=Shrani pravila za oddaljene gradnike -Name[sr]=Сачувај смернице за удаљене виџете -Name[sr@ijekavian]=Сачувај смјернице за удаљене виџете -Name[sr@ijekavianlatin]=Sačuvaj smjernice za udaljene vidžete -Name[sr@latin]=Sačuvaj smernice za udaljene vidžete -Name[sv]=Spara policy för grafiska fjärrkomponenter -Name[th]=บันทึกกฎของวิดเจ็ตระยะไกล -Name[tr]=Uzak programcık politikalarını kaydet -Name[ug]=يىراقتىكى ۋىجېتلارنى ساقلاش تەدبىرى -Name[uk]=Зберегти правила для віддалених віджетів -Name[x-test]=xxSave remote widgets' policiesxx -Name[zh_CN]=保存远程部件的策略 -Name[zh_TW]=儲存遠端元件政策 Description=Prevents the system from saving remote plasma widgets' policies -Description[ar]=يمنع النظام من حفظ سياسات ودجات بلازما البعيدة -Description[ast]=Impide que'l sistema guarde polítiques d'elementos gráficos Plasma remotos -Description[bg]=Забраняване запазването на правилата на отдалечените джаджи -Description[bs]=Sprečava sistem da sačuva smjernice udaljenih plazma grafičkih kontrola -Description[ca]=Evita al sistema de desar polítiques d'estris remots del plasma -Description[ca@valencia]=Evita al sistema d'alçar polítiques d'estris remots del plasma -Description[cs]=Zabrání systému ukládat zásady vzdálených widgetů plasmy -Description[da]=Forhindrer systemet i et gemme politikker for eksterne plasma-widgets -Description[de]=Hindert das System daran, Regelungen für entfernte Miniprogramme zu speichern. -Description[el]=Αποτρέπει το σύστημα από το να σώσει τις πολιτικές απομακρυσμένων μικροεφαρμογών plasma -Description[en_GB]=Prevents the system from saving remote plasma widgets' policies -Description[es]=Impide que el sistema guarde políticas de elementos gráficos Plasma remotos -Description[et]=Takistab süsteemil salvestamast Plasma välisvidinate reegleid -Description[eu]=Sistemak urruneko plasma trepeten politikak gorde ditzan galarazten du -Description[fi]=Estää järjestelmää tallentamasta etäplasmakäyttöliittymäkomponenttien menettelytapoja -Description[fr]=Empêche le système d'enregistrer la politique des composants graphiques distants -Description[ga]=Ná lig don chóras polasaithe um giuirléidí cianda plasma a shábháil -Description[he]=מונע מהמערכת מלשמור מדיניות של ווידג׳טים מרוחקים -Description[hr]=Brani sustavu spremanje pravila za udaljene widgete Plasme -Description[hu]=Megakadályozza a rendszert a távoli widgetek irányelveinek mentésében -Description[ia]=Il preveni le systema ab salvar le politicas del widgets (elementos graphic) remote de plasma -Description[id]=Mencegah sistem dari menyimpan kebijakan widget jarak jauh plasma -Description[is]=Kemur í veg fyrir að kerfið geti vistað stefnur varðandi fjartengdar græjur -Description[it]=Impedisce al sistema di salvare le linee guida degli oggetti remoti di Plasma -Description[ja]=システムがリモート Plasma ウィジェットポリシー保存するのを防ぎます -Description[kk]=Қашықтағы Plasma виджеттер ережелерін жүйеде сақтауын болдырмау -Description[km]=ការពារ​ប្រព័ន្ធ​មិន​ឲ្យ​រក្សាទុក​គោលនយោបាយ​របស់​ធាតុក្រាហ្វិក​ប្លាស្មា​ពី​ចម្ងាយ -Description[ko]=Plasma 원격 위젯 정책을 저장하지 못하도록 합니다 -Description[lt]=Neleidžia sistemai išsaugoti nutolusių plazmos valdiklių taisyklių -Description[nb]=Hindrer at systemet lagrer praksiser for plasmaelementer på nettverket -Description[nds]=Höllt dat Systeem vun't Sekern vun de Regeln för feern Plasma-Lüttprogrammen af -Description[nl]=Voorkomt het opslaan door het systeem van beleidsregels voor widgets op afstand -Description[nn]=Hindrar systemet i å lagra reglar for fjernelement -Description[pa]=ਰਿਮੋਟ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ ਦੀਆਂ ਨੀਤੀਆਂ ਸੰਭਾਲਣ ਤੋਂ ਸਿਸਟਮ ਨੂੰ ਰੋਕਦਾ ਹੈ -Description[pl]=Wyłącza zapisywanie polityk zdalnych elementów interfejsu -Description[pt]=Impede o sistema de gravar as políticas dos elementos remotos do Plasma -Description[pt_BR]=Previne o sistema de salvar as políticas de widgets Plasma remotos -Description[ro]=Impiedică sistemul să salveze politicile controalelor distante -Description[ru]=Сохранение правил доступа к удалённо доступным виджетам -Description[si]=දුරස්ථ ප්ලැස්මා විජට්ටු ප්‍රතිපත්ති සුරැකීමෙන් පද්ධතිය වළක්වයි -Description[sk]=Zabraňuje systému ukladať politiky pre vzdialené widgety -Description[sl]=Sistemu prepreči shranjevanje pravil za oddaljene gradnike -Description[sr]=Спречава систем да сачува смернице удаљених плазма виџета -Description[sr@ijekavian]=Спречава систем да сачува смјернице удаљених плазма виџета -Description[sr@ijekavianlatin]=Sprečava sistem da sačuva smjernice udaljenih plasma vidžeta -Description[sr@latin]=Sprečava sistem da sačuva smernice udaljenih plasma vidžeta -Description[sv]=Förhindrar systemet från att spara policy för Plasma grafiska fjärrkomponenter -Description[th]=ป้องกันระบบจากการบันทึกกฎของวิดเจ็ตของพลาสมาจากทางไกล -Description[tr]=Sistemin uzak plasma programcık politikalarını kaydetmesini engelle -Description[ug]=سىستېما يىراقتىكى پلازما ۋىجېتلىرىنىڭ تەدبىرىنى ساقلاشنى چەكلەيدۇ -Description[uk]=Заборонити системі зберігати правила для віддалених віджетів Плазми -Description[x-test]=xxPrevents the system from saving remote plasma widgets' policiesxx -Description[zh_CN]=禁止系统保存远程 Plasma 部件的策略 -Description[zh_TW]=避免系統儲存遠端 plasma 元件政策 Policy=auth_admin diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index 293c42af6..e1ea6f7a0 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -1,59 +1,5 @@ [Desktop Entry] Name=Plasma JavaScript Addon -Name[ast]=Complementu de JavaScript pa Plasma -Name[bg]=Добавка за JavaScript на Plasma -Name[bs]=Plazma javaskriptni dodatak -Name[ca]=Complement del JavaScript pel Plasma -Name[ca@valencia]=Complement del JavaScript pel Plasma -Name[cs]=Doplněk Plasmy JavaScript -Name[da]=Plasma JavaScript-tilføjelse -Name[de]=JavaScript-Erweiterung für Plasma -Name[el]=Πρόσθετο Plasma JavaScript -Name[en_GB]=Plasma JavaScript Addon -Name[es]=Complemento de JavaScript para Plasma -Name[et]=Plasma JavaScripti lisa -Name[eu]=Plasma JavaScript gehigarria -Name[fi]=Plasma JavaScript -lisäosa -Name[fr]=Module complémentaire Javascript de Plasma -Name[he]=תוסף עבור JavaScript של Plasma -Name[hi]=प्लाज़मा जावा-स्क्रिप्ट एडोन -Name[hr]=Dodatak JavaScripta Plasmi -Name[hu]=Plazma JavaScript-bővítmény -Name[ia]=Plasma JavaScript Addon -Name[is]=Plasma JavaScript viðbót -Name[it]=Aggiunta per Java e JavaScript -Name[ja]=Plasma JavaScript アドオン -Name[kk]=Plasma JavaScript қосымшасы -Name[km]=ផ្នែក​បន្ថែម​ Plasma JavaScript -Name[kn]=ಪ್ಲಾಸ್ಮಾ ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಆಡ್‌ಆನ್ -Name[ko]=Plasma 자바스크립트 추가 기능 -Name[lt]=Plasma JavaScript priedas -Name[nb]=Plasma JavaScript-tillegg -Name[nds]=JavaScript-Verwiedern för Plasma -Name[nl]=Addon voor Plasma JavaScript -Name[nn]=Plasma–JavaScript-tillegg -Name[pa]=ਪਲਾਜ਼ਮਾ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਐਡਆਨ -Name[pl]=Dodatek dla JavaScript -Name[pt]=Extensão de JavaScript do Plasma -Name[pt_BR]=Complementos de JavaScript do Plasma -Name[ro]=Supliment JavaScript Plasma -Name[ru]=Расширение Plasma, использующее JavaScript -Name[sk]=Doplnok JavaScript pre plasmu -Name[sl]=Dodatek za JavaScript za Plasmo -Name[sr]=Плазма јаваскриптни додатак -Name[sr@ijekavian]=Плазма јаваскриптни додатак -Name[sr@ijekavianlatin]=Plasma JavaScript dodatak -Name[sr@latin]=Plasma JavaScript dodatak -Name[sv]=Plasma Javaskript-tillägg -Name[tg]=Иловаҳои Plasma JavaScript -Name[th]=ส่วนเสริมจาวาและจาวาสคริปต์สำหรับพลาสมาส่วนเสริมจาวาและจาวาสคริปต์สำหรับ -Name[tr]=Plasma JavaScript Eklentisi -Name[ug]=Plasma JavaScript قوشۇلما -Name[uk]=Додаток JavaScript до Плазми -Name[wa]=Pacaedje di rawete Plasma JavaScript -Name[x-test]=xxPlasma JavaScript Addonxx -Name[zh_CN]=Plasma JavaScript 附加插件 -Name[zh_TW]=Plasma JavaScript Addon Type=ServiceType X-KDE-ServiceType=Plasma/JavascriptAddon Icon=plasma diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 8d14d27a0..05489fe53 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -1,110 +1,6 @@ [Desktop Entry] Name=Javascript Addon -Name[ast]=Complementu de JavaScript -Name[bg]=Добавка за Javascript -Name[bs]=Javaskriptni dodatak -Name[ca]=Complement del Javascript -Name[ca@valencia]=Complement del Javascript -Name[cs]=Doplněk JavaScript -Name[da]=JavaScript-tilføjelse -Name[de]=JavaScript-Erweiterung -Name[el]=Πρόσθετο Javascript -Name[en_GB]=Javascript Addon -Name[es]=Complemento de JavaScript -Name[et]=JavaScripti lisa -Name[eu]=Javascript gehigarria -Name[fi]=Javascript-lisäosa -Name[fr]=Module complémentaire Javascript -Name[he]=תוסף JavaScript -Name[hi]=जावास्क्रिप्ट एडोन -Name[hr]=Dodadak za Javascript -Name[hu]=Javascript-bővítmény -Name[ia]=JavaScript Addon -Name[is]=JavaScript viðbót -Name[it]=Aggiunta per JavaScript -Name[ja]=JavaScript アドオン -Name[kk]=Javascript қосымшасы -Name[km]=ផ្នែក​បន្ថែម Javascript -Name[kn]=ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಆಡ್‌ಆನ್ -Name[ko]=자바스크립트 추가 기능 -Name[lt]=Javascript priedas -Name[nb]=JavaScript-tillegg -Name[nds]=JavaScript-Verwiedern -Name[nl]=Addon voor JavaScript -Name[nn]=JavaScript-tillegg -Name[pa]=ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਐਡ-ਆਨ -Name[pl]=Dodatek dla JavaScript -Name[pt]=Extensão de JavaScript -Name[pt_BR]=Complementos de JavaScript -Name[ro]=Supliment Javascript -Name[ru]=Дополнение, использующее JavaScript -Name[sk]=Doplnok JavaScript -Name[sl]=Dodatek za JavaScript -Name[sr]=Јаваскриптни додатак -Name[sr@ijekavian]=Јаваскриптни додатак -Name[sr@ijekavianlatin]=JavaScript dodatak -Name[sr@latin]=JavaScript dodatak -Name[sv]=Javaskript-tillägg -Name[th]=ส่วนเสริมจาวาสคริปต์ -Name[tr]=Javascript Eklentisi -Name[ug]=Javascript قوشۇلما -Name[uk]=Додаток JavaScript -Name[wa]=Pacaedje di rawete Javascript -Name[x-test]=xxJavascript Addonxx -Name[zh_CN]=Javascript 插件 -Name[zh_TW]=Javascript Addon Comment=Addons for Javascript Plasma plugins -Comment[ast]=Amestaos pa complementos de JavaScript pa Plasma -Comment[bg]=Добавки за приставките за Javascript на Plasma -Comment[bs]=Dodaci za javaskriptne plazma priključke -Comment[ca]=Complements pels connectors Javascript del Plasma -Comment[ca@valencia]=Complements pels connectors Javascript del Plasma -Comment[cs]=Doplňky pro javascriptové zásuvné moduly plasmy -Comment[da]=Tilføjelse til Plasma-plugins i JavaScript -Comment[de]=Erweiterungen für JavaScript-Module in Plasma -Comment[el]=Πρόσθετο για Plasma JavaScript -Comment[en_GB]=Addons for Javascript Plasma plugins -Comment[es]=Añadidos para complementos de JavaScript para Plasma -Comment[et]=JavaScripti Plasma pluginate lisad -Comment[eu]=Javascript Plasma pluginentzako gehigarriak -Comment[fi]=Lisäosia JavaScript Plasma -liitännäisille -Comment[fr]=Module complémentaire pour les modules externes en Javascript de Plasma -Comment[he]=תוספים לתוספי JavaScript של Plasma -Comment[hr]=Dodaci za priključke za Javascript Plasma -Comment[hu]=Bővítmények JavaScript Plazma-modulokhoz -Comment[ia]=Addons (elementos adjuncte) pro plugins de Plasma de javascript -Comment[is]=Viðbætur fyrir Plasma JavaScript íforrit -Comment[it]=Aggiunte per le estensioni JavaScript di Plasma -Comment[ja]=JavaScript Plasma プラグイン用のアドオン -Comment[kk]=Javascript Plasma плагиніне қосымшасы -Comment[km]=កម្មវិធី​បន្ថែម​សម្រាប់​កម្មវិធី​ជំនួយ Javascript Plasma -Comment[ko]=자바스크립트 Plasma 플러그인을 위한 추가 기능 -Comment[lt]=Javascript Plasma papildinio priedai -Comment[nb]=Tillegg for JavaSript Plasma-programtillegg -Comment[nds]=Verwiedern för Plasma sien JavaScript-Modulen -Comment[nl]=Addons voor Javascript Plasma plugins -Comment[nn]=Tillegg for JavaScript–Plasma-programtillegg -Comment[pa]=ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਲਾਜ਼ਮਾ ਪਲੱਗਇਨ ਲਈ ਐਡਐਨ -Comment[pl]=Dodatki dla wtyczek Plazmy w JavaScript -Comment[pt]=Extras para os 'plugins' do Plasma em JavaScript -Comment[pt_BR]=Complementos para os plug-ins do Plasma em JavaScript -Comment[ro]=Suplimente pentru module JavaScript Plasma -Comment[ru]=Модули поддержки дополнений Plasma, использующих JavaScript -Comment[sk]=Doplnky pre Javascriptové moduly plasmy -Comment[sl]=Dodatki za vstavke JavaScript za Plasmo -Comment[sr]=Додаци за јаваскриптне плазма прикључке -Comment[sr@ijekavian]=Додаци за јаваскриптне плазма прикључке -Comment[sr@ijekavianlatin]=Dodaci za JavaScript plasma priključke -Comment[sr@latin]=Dodaci za JavaScript plasma priključke -Comment[sv]=Tillägg för Javascript Plasma-insticksprogram -Comment[th]=ส่วนขยายสำหรับส่วนเสริมพลาสมาที่เป็นจาวาสคริปต์ -Comment[tr]=Javascript Plasma eklentileri için ek araçlar -Comment[ug]=Javascript Plasma قىستۇرمىسى ئۈچۈن قوشۇلما -Comment[uk]=Додатки для використання Javascript у Плазмі -Comment[wa]=Pacaedjes di rawete po les tchôkes-divins Plasma Javascript -Comment[x-test]=xxAddons for Javascript Plasma pluginsxx -Comment[zh_CN]=Javascript Plasma 插件的附件组件 -Comment[zh_TW]=Javascript Plasma 外掛程式的 Addon Type=Service X-KDE-ServiceTypes=Plasma/PackageStructure diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 6f9730a5f..276b40c84 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -1,104 +1,6 @@ [Desktop Entry] Name=Declarative widget -Name[ast]=Elementu gráficu declarativu -Name[bg]=Декларативна джаджа -Name[bs]=Deklarativna grafička kontrola -Name[ca]=Estri declaratiu -Name[ca@valencia]=Estri declaratiu -Name[cs]=Deklarativní widget -Name[da]=Erklærende widget -Name[de]=Deklaratives Bedienelement -Name[el]=Δηλωτικό συστατικό -Name[en_GB]=Declarative widget -Name[es]=Elemento gráfico declarativo -Name[et]=Deklaratiivne vidin -Name[eu]=Trepeta ezagutarazlea -Name[fr]=Composant graphique « Declarative » -Name[he]=ווידג׳ט מוצהר -Name[hr]=Deklarativni widget -Name[hu]=Deklaratív widget -Name[ia]=Widget declarative -Name[is]=Skilgreiningagræja -Name[it]=Oggetto dichiarativo -Name[kk]=Мәлімдеме виджеті -Name[km]=ធាតុ​ក្រាហ្វិក​ដែល​ប្រកាស -Name[ko]=Declarative 위젯 -Name[lt]=Deklaratyvus valdiklis -Name[nb]=Deklarativt skjermelement -Name[nds]=Stüerelement för Verkloren -Name[nl]=Widget voor declaratie -Name[nn]=Deklarativt skjermelement -Name[pl]=Deklaratywny element interfejsu -Name[pt]=Item declarativo -Name[pt_BR]=Widget declarativo -Name[ro]=Control declarativ -Name[ru]=Декларативный виджет -Name[sk]=Deklaratívny widget -Name[sl]=Deklarativni gradnik -Name[sr]=Декларативни виџет -Name[sr@ijekavian]=Декларативни виџет -Name[sr@ijekavianlatin]=Deklarativni vidžet -Name[sr@latin]=Deklarativni vidžet -Name[sv]=Deklarativ grafisk komponent -Name[tr]=Bildirim parçacığı -Name[ug]=ئېنىقلىما ۋىجېت -Name[uk]=Декларативний віджет -Name[wa]=Ahesse di gåyotaedje -Name[x-test]=xxDeclarative widgetxx -Name[zh_CN]=描述部件 -Name[zh_TW]=宣告元件 Comment=Native Plasma widget written in QML and JavaScript -Comment[ast]=Elementu gráficu nativu de Plasma escritu en QML y JavaScript -Comment[bg]=Оригинална джаджа за Plasma, написана наQML и JavaScript -Comment[bs]=Samosvojni plazma grafičkih kontrola napisana u QML‑u i javaskriptu -Comment[ca]=Estri nadiu del Plasma escrit en QML i JavaScript -Comment[ca@valencia]=Estri nadiu del Plasma escrit en QML i JavaScript -Comment[cs]=Nativní Plasma widget napsaný v QML a JavaScriptu -Comment[da]=Hjemmehørende Plasma-widget skrevet i QML og JavaScript -Comment[de]=Echtes Plasma-Programm, geschrieben in QML und JavaScript -Comment[el]=Εγγενές συστατικό Plasma γραμμένο σε QML και JavaScript -Comment[en_GB]=Native Plasma widget written in QML and JavaScript -Comment[es]=Elemento gráfico nativo de Plasma escrito en QML y JavaScript -Comment[et]=QML-is ja JavaScriptis kirjutatud Plasma vidin -Comment[eu]=Plasma jatorrizko trepeta QML eta JavaScript-en idatzia -Comment[fi]=Natiivi, QML-pohjainen Plasma-sovelma -Comment[fr]=Composant graphique natif de Plasma écrit en QML et JavaScript -Comment[he]=ווידג׳טים של Plasma הנכתבים ב־QML וב־JavaScript -Comment[hr]=Izvorni Plasma widget napisan u QML-u i JavaScriptu -Comment[hu]=QML-ben és JavaScriptben írt natív Plazma-widget -Comment[ia]=Widget native de Plasma scribite in QLM e JavaScript -Comment[is]=Upprunabundin Plasma græja skrifuð í QML og JavaScript -Comment[it]=Oggetto nativo di Plasma scritto in QML e JavaScript -Comment[ja]=QML と JavaScript で書かれた Plasma のネイティブウィジェット -Comment[kk]=QML мен JavaScript-те жазылған Plasma тума виджеті -Comment[km]=ធាតុ​ក្រាហ្វិក​ប្លា​ស្មា​ដើម ដែល​សរសេរ​ក្នុង JavaScript​ -Comment[kn]=QML ಹಾಗು ಜಾವಾ ಸ್ಕ್ರಿಪ್ಟ್ ನಲ್ಲಿ ಬರೆಯಲಾದ ಸ್ವಾಭಾವಿಕ ಪ್ಲಾಸ್ಮಾ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) -Comment[ko]=QML과 자바스크립트로 작성된 Plasma 위젯 -Comment[lt]=Nuosavas Plasma valdiklis parašytas QML ir JavaScript kalba -Comment[nb]=Plasmaelement for dette systemet, skrevet i QML og JavaScript -Comment[nds]=En orginaal Plasmaelement, schreven in QML un JavaScript -Comment[nl]=Hier thuishorend Plasma-widget geschreven in QML en JavaScript -Comment[nn]=Plasma-element skriven i QML og JavaScript -Comment[pa]=QML ਤੇ ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿੱਚ ਲਿਖੇ ਨੇਟਿਵ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ -Comment[pl]=Element interfejsu Plazmy napisany w QML lub JavaScript -Comment[pt]=Elemento nativo do Plasma feito em QML e JavaScript -Comment[pt_BR]=Widget do Plasma nativo escrito em QML e JavaScript -Comment[ro]=Miniaplicație Plasma nativă scrisă în QML și JavaScript -Comment[ru]=Виджет Plasma, написанный на языках QML и JavaScript -Comment[sk]=Natívny plasma widget napísaný v QML a JavaScripte -Comment[sl]=Pravi gradnik za Plasmo, ki je napisan v QML-u in JavaScriptu -Comment[sr]=Самосвојни плазма виџет написан у КуМЛ‑у и јаваскрипту -Comment[sr@ijekavian]=Самосвојни плазма виџет написан у КуМЛ‑у и јаваскрипту -Comment[sr@ijekavianlatin]=Samosvojni plasma vidžet napisan u QML‑u i JavaScriptu -Comment[sr@latin]=Samosvojni plasma vidžet napisan u QML‑u i JavaScriptu -Comment[sv]=Inbyggd grafisk Plasma-komponent skriven i QML och Javascript -Comment[th]=วิดเจ็ตพลาสมาแบบดั้งเดิมที่เขียนด้วย QML และจาวาสคริปต์ -Comment[tr]=JavaScript ve QML ile yazılmış gerçek Plasma gereci -Comment[ug]=QML ۋە JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى -Comment[uk]=Віджет Плазми, написаний на QML та JavaScript -Comment[x-test]=xxNative Plasma widget written in QML and JavaScriptxx -Comment[zh_CN]=使用 QML 和 JavaScript 编写的原生 Plasma 部件 -Comment[zh_TW]=用 QML 與 JavaScript 寫的原始 Plasma 元件 Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index 422d20385..6926cfa7c 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -1,150 +1,6 @@ [Desktop Entry] Name=JavaScript Widget -Name[ar]=ودجة جافا سكربت -Name[ast]=Elementu gráficu JavaScript -Name[be@latin]=Widžet „JavaScript” -Name[bg]=Джаджа JavaScript -Name[bn_IN]=JavaScript Widget -Name[bs]=Javascript grafička kontrola -Name[ca]=Estri del JavaScript -Name[ca@valencia]=Estri del JavaScript -Name[cs]=JavaScript Widget -Name[csb]=Interfejs JavaScript -Name[da]=JavaScript-widget -Name[de]=JavaScript-Programm -Name[el]=Συστατικό JavaScript -Name[en_GB]=JavaScript Widget -Name[eo]=Ĝavaskripta fenestraĵo -Name[es]=Elemento gráfico JavaScript -Name[et]=JavaScripti vidin -Name[eu]=JavaScript trepeta -Name[fi]=JavaScript-sovelma -Name[fr]=Composant graphique JavaScript -Name[fy]=JavaSkript Widget -Name[ga]=Giuirléid JavaScript -Name[gl]=Widget de JavaScript -Name[gu]=જાવાસ્ક્રિપ્ટ વિજેટ -Name[he]=ווידג׳ט JavaScript -Name[hi]=जावास्क्रिप्ट विज़ेट -Name[hne]=जावास्क्रिप्ट विजेट -Name[hr]=JavaScript widgeti -Name[hu]=JavaScript-objektum -Name[ia]=JavaScript Widget -Name[id]=Widget JavaScript -Name[is]=JavaScript græja -Name[it]=Oggetto JavaScript -Name[ja]=JavaScript ウィジェット -Name[kk]=JavaScript интерфейс бөлшегі -Name[km]=ធាតុ​ក្រាហ្វិក JavaScript -Name[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) -Name[ko]=자바스크립트 위젯 -Name[ku]=Amîra JavaScriptê -Name[lt]=JavaScript valdiklis -Name[lv]=JavaScript sīkrīks -Name[ml]=ജാവാസ്ക്രിപ്റ്റ് വിഡ്ജറ്റ് -Name[mr]=जावास्क्रिप्ट विजेट -Name[nb]=JavaScript-skjermelement -Name[nds]=JavaScript-Finster -Name[nl]=JavaScript-widget -Name[nn]=JavaScript-element -Name[or]=JavaScript ୱିଜେଟ -Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿਦਜੈੱਟ -Name[pl]=Element interfejsu w JavaScript -Name[pt]=Elemento de JavaScript -Name[pt_BR]=Widget de JavaScript -Name[ro]=Miniaplicație JavaScript -Name[ru]=Виджет на языке JavaScript -Name[si]=Python මෙවලම් -Name[sk]=JavaScript widget -Name[sl]=Gradnik v JavaScriptu -Name[sr]=јаваскриптни виџет -Name[sr@ijekavian]=јаваскриптни виџет -Name[sr@ijekavianlatin]=JavaScript vidžet -Name[sr@latin]=JavaScript vidžet -Name[sv]=Grafisk Javascript-komponent -Name[ta]=JavaScript Widget -Name[te]=జావాస్క్రిప్‍ట్ విడ్‍జ్‌ట్ -Name[tg]=Видҷети JavaScript -Name[th]=วิดเจ็ตภาษาจาวาสคริปต์ -Name[tr]=JavaScript Programcığı -Name[ug]=JavaScript ۋىجېتى -Name[uk]=Віджет JavaScript -Name[wa]=Ahesse JavaScript -Name[x-test]=xxJavaScript Widgetxx -Name[zh_CN]=JavaScript 部件 -Name[zh_TW]=JavaScript 元件 Comment=Native Plasma widget written in JavaScript -Comment[ar]=ودجة بلازما أصلية كتبت بجافا سكربت -Comment[ast]=Elementu gráficu nativu de Plasma escritu en JavaScript -Comment[be@latin]=Widžet systemy „Plasma”, napisany ŭ movie „JavaScript” -Comment[bg]=Оригинална джаджа за Plasma, написана с JavaScript -Comment[bs]=Samosvojni plazma grafička kontrola napisana u javaskriptu -Comment[ca]=Estri nadiu del Plasma escrit en JavaScript -Comment[ca@valencia]=Estri nadiu del Plasma escrit en JavaScript -Comment[cs]=Nativní Plasma widget napsaný v JavaScriptu -Comment[csb]=Prôwdzëwi widżet Plasmë napisóny w JavaScript -Comment[da]=Native Plasma-widget skrevet i JavaScript -Comment[de]=Echtes Plasma-Programm, geschrieben in JavaScript -Comment[el]=Εγγενές συστατικό Plasma γραμμένο σε JavaScript -Comment[en_GB]=Native Plasma widget written in JavaScript -Comment[eo]=Indiĝena Plasma-fenestraĵo programita per Ĝavoskripto -Comment[es]=Elemento gráfico nativo de Plasma escrito en JavaScript -Comment[et]=JavaScriptis kirjutatud Plasma vidin -Comment[eu]=Plasma jatorrizko trepeta JavaScript-en idatzia -Comment[fi]=Natiivi, JavaScript-pohjainen Plasma-sovelma -Comment[fr]=Composant graphique natif de Plasma écrit en JavaScript -Comment[fy]=Plasma widget skreaun yn JavaSkript -Comment[ga]=Giuirléid dhúchasach Plasma, scríofa i JavaScript -Comment[gl]=Widget nativo de Plasma escrito en JavaScript -Comment[gu]=જાવાસ્ક્રિપ્ટમાં લખાયેલ મૂળભૂત પ્લાઝમા વિજેટ -Comment[he]=ווידג׳ט של Plasma הנכתב ב־JavaScript -Comment[hi]=जावास्क्रिप्ट में लिखा गया नेटिव प्लाज्मा विजेट -Comment[hne]=जावास्क्रिप्ट मं लिखे नेटिव प्लाज्मा विजेट -Comment[hr]=Izvorna Plasma widget napisana u JavaScriptu -Comment[hu]=Plasma-elem Javascriptben elkészítve -Comment[ia]=Widget native de Plasma scribite in JavaScript -Comment[id]=Widget Plasma asli yang ditulis dalam JavaScript -Comment[is]=Upprunabundin Plasma græja skrifuð í JavaScript -Comment[it]=Oggetto nativo di Plasma scritto in JavaScript -Comment[ja]=JavaScript で書かれた Plasma のネイティブウィジェット -Comment[kk]=JavaScript-те жазылған Plasma тума виджеті -Comment[km]=ធាតុ​ក្រាហ្វិក​ប្លាស្មា​ដើម ដែល​សរសេរ​ក្នុង JavaScript -Comment[kn]=ಜಾವಾ ಸ್ಕ್ರಿಪ್ಟ್ ನಲ್ಲಿ ಬರೆಯಲಾದ ಸ್ವಾಭಾವಿಕ ಪ್ಲಾಸ್ಮಾ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) -Comment[ko]=자바스크립트로 작성된 Plasma 위젯 -Comment[lt]=Nuosavas Plasma valdiklis parašytas JavaScript kalba -Comment[lv]=Plasma sīkrīks, rakstīts JavaScript -Comment[ml]=ജാവാസ്ക്രിപ്റ്റില്‍ തയ്യാറാക്കിയിരിക്കുന്ന നേറ്റീവ് പ്ലാസ്മാ വിഡ്ജറ്റ് -Comment[mr]=जावास्क्रिप्ट अंतर्गत लिहीले गेलेले मुळ प्लाज्मा विजेट -Comment[nb]=Plasmaelement for dette systemet, skrevet i JavaScript -Comment[nds]=En orginaal Plasmaelement, schreven in JavaScript -Comment[nl]=Plasma-widget geschreven in JavaScript -Comment[nn]=Plasma-element skriven i JavaScript -Comment[or]=JavaScriptରେ ଲିଖିତ ସ୍ଥାନୀୟ ପ୍ଲାଜମା ୱିଜେଟ -Comment[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿੱਚ ਲਿਖੇ ਨੇਟਿਵ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ -Comment[pl]=Element interfejsu Plazmy napisany w JavaScript -Comment[pt]=Elemento nativo do Plasma feito em JavaScript -Comment[pt_BR]=Widget do Plasma nativo escrito em JavaScript -Comment[ro]=Miniaplicație Plasma scrisă în JavaScript -Comment[ru]=Виджет Plasma, написанный на языке JavaScript -Comment[si]=ජාවා ස්ක්‍රිප්ට මගින් ලියූ ප්ලාස්මා විජෙට්ටු -Comment[sk]=Natívny plasma widget napísaný v JavaScripte -Comment[sl]=Pravi gradnik za Plasmo, ki je napisan v JavaScriptu -Comment[sr]=Самосвојни плазма виџет написан у јаваскрипту -Comment[sr@ijekavian]=Самосвојни плазма виџет написан у јаваскрипту -Comment[sr@ijekavianlatin]=Samosvojni plasma vidžet napisan u JavaScriptu -Comment[sr@latin]=Samosvojni plasma vidžet napisan u JavaScriptu -Comment[sv]=Inbyggd grafisk Plasma-komponent skriven i Javascript -Comment[ta]=Native Plasma widget written in JavaScript -Comment[te]=జావాస్క్రిప్‍ట్‌లో వ్రాసిన నేటివ్ ప్లాజ్మా విడ్‍జ్‌ట్ -Comment[tg]=Модуль Plasma, написанный на языке JavaScript -Comment[th]=วิดเจ็ตพลาสมาที่ถูกเขียนด้วยจาวาสคริปต์ -Comment[tr]=JavaScript ile yazılmış gerçek Plasma gereci -Comment[ug]=JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى -Comment[uk]=Віджет Плазми, написаний на JavaScript -Comment[wa]=Ahesse askepieye po Plasma eyet scrîte e JavaScript -Comment[x-test]=xxNative Plasma widget written in JavaScriptxx -Comment[zh_CN]=使用 JavaScript 编写的原生 Plasma 部件 -Comment[zh_TW]=用 JavaScript 寫的原始 Plasma 元件 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index 3b0c00e8a..42e3d5825 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -1,69 +1,5 @@ [Desktop Entry] Name=JavaScript DataEngine -Name[ar]=مشغل جافا سكربت -Name[ast]=Motor de datos JavaScript -Name[bg]=Ядро за данни на JavaScript -Name[bs]=Javascript pogon podataka -Name[ca]=Motor de dades de JavaScript -Name[ca@valencia]=Motor de dades de JavaScript -Name[cs]=Datový nástroj JavaScript -Name[csb]=Mòtór JavaScript -Name[da]=JavaScript-datamotor -Name[de]=JavaScript-Datenmodul -Name[el]=Μηχανή δεδομένων JavaScript -Name[en_GB]=JavaScript DataEngine -Name[eo]=Ĝavaskripta Datummodulo -Name[es]=Motor de datos JavaScript -Name[et]=JavaScripti andmemootor -Name[eu]=JavaScript datu-motorea -Name[fi]=JavaScript-datakone -Name[fr]=Moteur de données JavaScript -Name[fy]=JavaSkript gegevens motor -Name[ga]=Inneall Sonraí JavaScript -Name[gl]=Motor de datos de JavaScript -Name[gu]=જાવાસ્ક્રિપ્ટ માહિતીએન્જિન -Name[he]=מנוע נתונים של JavaScript -Name[hr]=JavaScript podatkovni mehanizam -Name[hu]=JavaScript-adatmodul -Name[ia]=JavaScript Motor de Datos (Data Engine) -Name[id]=Mesin Data JavaScript -Name[is]=JavaScript gagnavél -Name[it]=Motore di dati JavaScript -Name[ja]=JavaScript データエンジン -Name[kk]=JavaScript деректер тетігі -Name[km]=ម៉ាស៊ីន​ទិន្នន័យ JavaScript -Name[kn]=JavaScript DataEngine -Name[ko]=자바스크립트 데이터 엔진 -Name[lt]=JavaScript duomenų variklis -Name[lv]=JavaScript datu dzinējs -Name[ml]=ജാവാസ്ക്രിപ്റ്റ് ഡാറ്റാഎഞ്ചിന്‍ -Name[nb]=JavaScript datamotor -Name[nds]=JavaScript-Datenkarn -Name[nl]=JavaScript-data-engine -Name[nn]=JavaScript-datamotor -Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਡਾਟਾਇੰਜਣ -Name[pl]=Silnik danych JavaScript -Name[pt]=Motor de Dados do JavaScript -Name[pt_BR]=Mecanismo de dados JavaScript -Name[ro]=MotorDate JavaScript -Name[ru]=Поставщик данных (JavaScript) -Name[si]=JavaScript දත්ත එන්ජිම -Name[sk]=Dátový nástroj JavaScript -Name[sl]=Podatkovni pogon za JavaScript -Name[sr]=јаваскриптни датомотор -Name[sr@ijekavian]=јаваскриптни датомотор -Name[sr@ijekavianlatin]=JavaScript datomotor -Name[sr@latin]=JavaScript datomotor -Name[sv]=Javascript-datagränssnitt -Name[tg]=Иҷрогари JavaScript -Name[th]=กลไกข้อมูลของจาวาสคริปต์ -Name[tr]=JavaScript Veri Motoru -Name[ug]=JavaScript سانلىق مەلۇمات ماتورى -Name[uk]=Рушій даних JavaScript -Name[wa]=Moteur di dnêyes JavaScript -Name[x-test]=xxJavaScript DataEnginexx -Name[zh_CN]=JavaScript 数据引擎 -Name[zh_TW]=JavaScript 資料引擎 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index 5f47b3933..2c896b488 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -1,154 +1,6 @@ [Desktop Entry] Name=JavaScript Runner -Name[ar]=مشغل جافا سكربت -Name[ast]=Motor de javascript -Name[be@latin]=Uklučeńnie „JavaScript” -Name[bg]=Изпълнение на JavaScript -Name[bn_IN]=JavaScript Runner -Name[bs]=Javascript izvođač -Name[ca]=Executor de JavaScript -Name[ca@valencia]=Executor de JavaScript -Name[cs]=Spouštěč JavaScriptu -Name[csb]=Mòtór JavaScript -Name[da]=JavaScript-runner -Name[de]=JavaScript-Ausführung -Name[el]=Εκτελεστής JavaScript -Name[en_GB]=JavaScript Runner -Name[eo]=Ĝavaskripta ruligilo -Name[es]=Motor de javascript -Name[et]=JavaScripti käivitaja -Name[eu]=JavaScript abiarazlea -Name[fi]=JavaScript-suoritusohjelma -Name[fr]=Lanceur JavaScript -Name[fy]=JavaSkript rinner -Name[ga]=Feidhmitheoir JavaScript -Name[gl]=Executor de JavaScript -Name[gu]=જાવાસ્ક્રિપ્ટ ચલાવનાર -Name[he]=מריץ JavaScript -Name[hi]=जावास्क्रिप्ट चलाने वाला -Name[hne]=जावास्क्रिप्ट चलइया -Name[hr]=JavaScript Pokretač -Name[hu]=JavaScript-indító -Name[ia]=JavaScript Executor -Name[id]=Pelari JavaScript -Name[is]=JavaScript keyrari -Name[it]=Esecutore JavaScript -Name[ja]=JavaScript Runner -Name[kk]=JavaScript жеккіші -Name[km]=កម្មវិធី​រត់ JavaScript -Name[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ಚಾಲಕ -Name[ko]=자바스크립트 실행기 -Name[ku]=Xebatkara JavaScriptê -Name[lt]=JavaScript paleidiklis -Name[lv]=JavaScript darbinātājs -Name[mk]=Извршувач на JavaScript -Name[ml]=ജാവാസ്ക്രിപ്റ്റ് റണ്ണര്‍ -Name[mr]=जावास्क्रिप्ट चालक -Name[nb]=JavaScript-kjører -Name[nds]=JavaScript-Dreger -Name[nl]=JavaScript-runner -Name[nn]=JavaScript-køyrar -Name[or]=JavaScript ଚାଳକ -Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਰਨਰ -Name[pl]=Silnik JavaScript -Name[pt]=Execução de JavaScript -Name[pt_BR]=Mecanismo JavaScript -Name[ro]=Executor JavaScript -Name[ru]=JavaScript Runner -Name[si]=JavaScript ධාවකය -Name[sk]=Spúšťač JavaScriptu -Name[sl]=Zaganjalnik javascripta -Name[sr]=јаваскриптни извођач -Name[sr@ijekavian]=јаваскриптни извођач -Name[sr@ijekavianlatin]=JavaScript izvođač -Name[sr@latin]=JavaScript izvođač -Name[sv]=Kör Javascript -Name[ta]=JavaScript Runner -Name[te]=జావాస్క్రిప్‍ట్ నడుపునది -Name[tg]=Иҷрогари JavaScript -Name[th]=ตัวประมวลผลจาวาสคริปต์ -Name[tr]=JavaScript Çalıştırıcı -Name[ug]=JavaScript ئىجراچىسى -Name[uk]=Механізм запуску JavaScript -Name[wa]=Enondeu JavaScript -Name[x-test]=xxJavaScript Runnerxx -Name[zh_CN]=JavaScript 运行器 -Name[zh_TW]=JavaScript 執行器 Comment=JavaScript Runner -Comment[ar]=مشغل جافا سكربت -Comment[ast]=Motor de javascript -Comment[be@latin]=Uklučeńnie „JavaScript”. -Comment[bg]=Изпълнение на JavaScript -Comment[bn_IN]=JavaScript Runner -Comment[bs]=Javascript izvođač -Comment[ca]=Executor de JavaScript -Comment[ca@valencia]=Executor de JavaScript -Comment[cs]=Spouštěč JavaScriptu -Comment[csb]=Zrëszôcz JavaScript -Comment[da]=JavaScript-runner -Comment[de]=JavaScript-Ausführung -Comment[el]=Εκτελεστής JavaScript -Comment[en_GB]=JavaScript Runner -Comment[eo]=Ĝavaskripta ruligilo -Comment[es]=Motor de javascript -Comment[et]=JavaScripti käivitaja -Comment[eu]=JavaScript abiarazlea -Comment[fi]=JavaScript-suoritusohjelma -Comment[fr]=Lanceur JavaScript -Comment[fy]=JavaSkript rinner -Comment[ga]=Feidhmitheoir JavaScript -Comment[gl]=Executor de JavaScript -Comment[gu]=જાવાસ્ક્રિપ્ટ ચલાવનાર -Comment[he]=מריץ JavaScript -Comment[hi]=जावास्क्रिप्ट चलाने वाला -Comment[hne]=जावास्क्रिप्ट चलइया -Comment[hr]=JavaScript pokretač -Comment[hu]=JavaScript-indító -Comment[ia]=JavaScript Executor -Comment[id]=Pelari JavaScript -Comment[is]=JavaScript keyrari -Comment[it]=Esecutore JavaScript -Comment[ja]=JavaScript Runner -Comment[kk]=JavaScript жеккіші -Comment[km]=កម្មវិធី​រត់ JavaScript -Comment[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ಚಾಲಕ -Comment[ko]=자바스크립트 실행기 -Comment[ku]=Xebatkara JavaScriptê -Comment[lt]=JavaScript paleidiklis -Comment[lv]=JavaScript darbinātājs -Comment[mk]=Извршувач на JavaScript -Comment[ml]=ജാവാസ്ക്രിപ്റ്റ് റണ്ണര്‍ -Comment[mr]=जावास्क्रिप्ट चालक -Comment[nb]=JavaScript-kjører -Comment[nds]=JavaScript-Dreger -Comment[nl]=JavaScript-runner -Comment[nn]=JavaScript-køyrar -Comment[or]=JavaScript ଚାଳକ -Comment[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਰਨਰ -Comment[pl]=Silnik JavaScript -Comment[pt]=Execução de JavaScript -Comment[pt_BR]=Mecanismo JavaScript -Comment[ro]=Executor JavaScript -Comment[ru]=Модуль запуска, написанный на языке JavaScript -Comment[si]=JavaScript Runner -Comment[sk]=Spúšťač JavaScriptu -Comment[sl]=Zaganjalnik javascripta -Comment[sr]=Јаваскриптни извођач -Comment[sr@ijekavian]=Јаваскриптни извођач -Comment[sr@ijekavianlatin]=JavaScript izvođač -Comment[sr@latin]=JavaScript izvođač -Comment[sv]=Kör Javascript -Comment[ta]=JavaScript Runner -Comment[te]=జావాస్క్రిప్‍ట్ నడుపునది -Comment[tg]=Иҷрогари JavaScript -Comment[th]=ตัวประมวลผลจาวาสคริปต์ -Comment[tr]=JavaScript Çalıştırıcı -Comment[ug]=JavaScript ئىجراچىسى -Comment[uk]=Механізм запуску JavaScript -Comment[wa]=Enondeu JavaScript -Comment[x-test]=xxJavaScript Runnerxx -Comment[zh_CN]=JavaScript 运行器 -Comment[zh_TW]=JavaScript 執行器 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script From 7e461fd16615d1a8215e2bb8ec84f5527bcbe3f2 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Fri, 9 Sep 2011 09:21:00 +0200 Subject: [PATCH 81/82] SVN_SILENT made messages (.desktop file) --- kpart/plasma-kpart.desktop | 53 +++++++ remotewidgetshelper/kcm_remotewidgets.actions | 110 +++++++++++++ .../data/plasma-javascriptaddon.desktop | 54 +++++++ ...-packagestructure-javascript-addon.desktop | 104 ++++++++++++ ...ma-scriptengine-applet-declarative.desktop | 98 ++++++++++++ ...iptengine-applet-simple-javascript.desktop | 144 +++++++++++++++++ ...scriptengine-dataengine-javascript.desktop | 64 ++++++++ ...sma-scriptengine-runner-javascript.desktop | 148 ++++++++++++++++++ 8 files changed, 775 insertions(+) diff --git a/kpart/plasma-kpart.desktop b/kpart/plasma-kpart.desktop index 06526ae0c..b298ca710 100644 --- a/kpart/plasma-kpart.desktop +++ b/kpart/plasma-kpart.desktop @@ -1,5 +1,58 @@ [Desktop Entry] Name=plasma-kpart +Name[ast]=plasma-kpart +Name[bg]=plasma-kpart +Name[bs]=plasma-kpart +Name[ca]=plasma-kpart +Name[ca@valencia]=plasma-kpart +Name[cs]=plasma-kpart +Name[da]=plasma-kpart +Name[de]=plasma-kpart +Name[el]=plasma-kpart +Name[en_GB]=plasma-kpart +Name[es]=plasma-kpart +Name[et]=plasma-kpart +Name[eu]=plasma-kpart +Name[fi]=plasma-kpart +Name[fr]=plasma-kpart +Name[he]=plasma-kpart +Name[hi]=plasma-kpart +Name[hr]=plasma-kpart +Name[hu]=plasma-kpart +Name[ia]=plasma-kpart +Name[is]=plasma-kpart +Name[it]=plasma-kpart +Name[ja]=plasma-kpart +Name[kk]=plasma-kpart +Name[km]=plasma-kpart +Name[kn]=plasma-kpart +Name[ko]=plasma-kpart +Name[lt]=plasma-kpart +Name[nb]=plasma-kpart +Name[nds]=Kpart för Plasma +Name[nl]=plasma-kpart +Name[nn]=plasma-kpart +Name[pa]=plasma-kpart +Name[pl]=plasma-kpart +Name[pt]=plasma-kpart +Name[pt_BR]=plasma-kpart +Name[ro]=plasma-kpart +Name[ru]=plasma-kpart +Name[sk]=plasma-kpart +Name[sl]=plasma-kpart +Name[sr]=plasma-kpart +Name[sr@ijekavian]=plasma-kpart +Name[sr@ijekavianlatin]=plasma-kpart +Name[sr@latin]=plasma-kpart +Name[sv]=Plasma-delprogram +Name[th]=plasma-kpart +Name[tr]=plasma-kpart +Name[ug]=plasma-kpart +Name[uk]=plasma-kpart +Name[wa]=plasma-kpårt +Name[x-test]=xxplasma-kpartxx +Name[zh_CN]=plasma-kpart +Name[zh_TW]=plasma-kpart Type=Service ServiceTypes=KParts/Part X-KDE-Library=plasma-kpart diff --git a/remotewidgetshelper/kcm_remotewidgets.actions b/remotewidgetshelper/kcm_remotewidgets.actions index 70c564c9d..3d110c183 100644 --- a/remotewidgetshelper/kcm_remotewidgets.actions +++ b/remotewidgetshelper/kcm_remotewidgets.actions @@ -1,4 +1,114 @@ [org.kde.kcontrol.kcmremotewidgets.save] Name=Save remote widgets' policies +Name[ar]=احفظ سياسات الودجات البعيدة +Name[ast]=Guardáu de polítiques d'elementos gráficos remotos +Name[bg]=Запазване на правилата на отдалечените джаджи +Name[bs]=Sačuvaj smjernice za udaljene grafičke kontrole +Name[ca]=Desa les polítiques d'estris remots +Name[ca@valencia]=Alça les polítiques d'estris remots +Name[cs]=Uložit zásady vzdálených widgetů +Name[da]=Gem politikker for eksterne widgets +Name[de]=Regelungen für entfernte Miniprogramme speichern +Name[el]=Αποθήκευση των πολιτικών απομακρυσμένων μικροεφαρμογών +Name[en_GB]=Save remote widgets' policies +Name[es]=Guardado de políticas de elementos gráficos remotos +Name[et]=Välisvidinate reeglite salvestamine +Name[eu]=Gorde urruneko trepeten politikak +Name[fi]=Tallenna etäkäyttöliittymäkomponenttien menettelytavat +Name[fr]=Enregistrer la politique des composants graphiques distants +Name[ga]=Sábháil polasaithe um giuirléidí cianda +Name[he]=שמירת מדיניות של ווידג׳טים מרוחקים +Name[hr]=Spremi pravila za udaljene widgete +Name[hu]=Távoli widgetek irányelveinek mentése +Name[ia]=Il salva le politicas del widgets remote +Name[id]=Simpan kebijakan widget jarak jauh +Name[is]=Vista stefnur varðandi fjartengdar græjur +Name[it]=Salva le linee guida degli oggetti remoti +Name[ja]=リモートウィジェットポリシーを保存 +Name[kk]=Қашықтағы виджеттер ережелерін сақтау +Name[km]=រក្សាទុក​គោលនយោបាយ​របស់​ធាតុក្រាហ្វិក​ពី​ចម្ងាយ +Name[ko]=원격 위젯의 정책 저장하기 +Name[lt]=Išsaugoti nutolusių valdiklių taisykles +Name[lv]=Saglabāt attālinātā sīkrīka politiku +Name[ml]=വിദൂര ഉരുപ്പടികള്‍ക്കുള്ള നയങ്ങള്‍ സൂക്ഷിയ്ക്കുക +Name[nb]=Lagre praksis for nettverkselementer +Name[nds]=Regeln för feern Lüttprogrammen sekern +Name[nl]=Beleidsregels voor widgets op afstand opslaan +Name[nn]=Lagra reglar for fjernelement +Name[pa]=ਰਿਮੋਟ ਵਿਦਜੈੱਟ ਦੀ ਪਾਲਸੀ ਸੰਭਾਲੋ +Name[pl]=Zapisz polityki zdalnych elementów interfejsu +Name[pt]=Gravar as políticas dos elementos remotos +Name[pt_BR]=Salvar políticas de widgets remotos +Name[ro]=Salvează politicile controalelor distante +Name[ru]=Сохранение правил удалённо доступных виджетов +Name[si]=දුරස්ථ විජට්ටුවල ප්‍රතිපත්ති සුරකින්න +Name[sk]=Uložiť politiky pre vzdialené widgety +Name[sl]=Shrani pravila za oddaljene gradnike +Name[sr]=Сачувај смернице за удаљене виџете +Name[sr@ijekavian]=Сачувај смјернице за удаљене виџете +Name[sr@ijekavianlatin]=Sačuvaj smjernice za udaljene vidžete +Name[sr@latin]=Sačuvaj smernice za udaljene vidžete +Name[sv]=Spara policy för grafiska fjärrkomponenter +Name[th]=บันทึกกฎของวิดเจ็ตระยะไกล +Name[tr]=Uzak programcık politikalarını kaydet +Name[ug]=يىراقتىكى ۋىجېتلارنى ساقلاش تەدبىرى +Name[uk]=Зберегти правила для віддалених віджетів +Name[x-test]=xxSave remote widgets' policiesxx +Name[zh_CN]=保存远程部件的策略 +Name[zh_TW]=儲存遠端元件政策 Description=Prevents the system from saving remote plasma widgets' policies +Description[ar]=يمنع النظام من حفظ سياسات ودجات بلازما البعيدة +Description[ast]=Impide que'l sistema guarde polítiques d'elementos gráficos Plasma remotos +Description[bg]=Забраняване запазването на правилата на отдалечените джаджи +Description[bs]=Sprečava sistem da sačuva smjernice udaljenih plazma grafičkih kontrola +Description[ca]=Evita al sistema de desar polítiques d'estris remots del plasma +Description[ca@valencia]=Evita al sistema d'alçar polítiques d'estris remots del plasma +Description[cs]=Zabrání systému ukládat zásady vzdálených widgetů plasmy +Description[da]=Forhindrer systemet i et gemme politikker for eksterne plasma-widgets +Description[de]=Hindert das System daran, Regelungen für entfernte Miniprogramme zu speichern. +Description[el]=Αποτρέπει το σύστημα από το να σώσει τις πολιτικές απομακρυσμένων μικροεφαρμογών plasma +Description[en_GB]=Prevents the system from saving remote plasma widgets' policies +Description[es]=Impide que el sistema guarde políticas de elementos gráficos Plasma remotos +Description[et]=Takistab süsteemil salvestamast Plasma välisvidinate reegleid +Description[eu]=Sistemak urruneko plasma trepeten politikak gorde ditzan galarazten du +Description[fi]=Estää järjestelmää tallentamasta etäplasmakäyttöliittymäkomponenttien menettelytapoja +Description[fr]=Empêche le système d'enregistrer la politique des composants graphiques distants +Description[ga]=Ná lig don chóras polasaithe um giuirléidí cianda plasma a shábháil +Description[he]=מונע מהמערכת מלשמור מדיניות של ווידג׳טים מרוחקים +Description[hr]=Brani sustavu spremanje pravila za udaljene widgete Plasme +Description[hu]=Megakadályozza a rendszert a távoli widgetek irányelveinek mentésében +Description[ia]=Il preveni le systema ab salvar le politicas del widgets (elementos graphic) remote de plasma +Description[id]=Mencegah sistem dari menyimpan kebijakan widget jarak jauh plasma +Description[is]=Kemur í veg fyrir að kerfið geti vistað stefnur varðandi fjartengdar græjur +Description[it]=Impedisce al sistema di salvare le linee guida degli oggetti remoti di Plasma +Description[ja]=システムがリモート Plasma ウィジェットポリシー保存するのを防ぎます +Description[kk]=Қашықтағы Plasma виджеттер ережелерін жүйеде сақтауын болдырмау +Description[km]=ការពារ​ប្រព័ន្ធ​មិន​ឲ្យ​រក្សាទុក​គោលនយោបាយ​របស់​ធាតុក្រាហ្វិក​ប្លាស្មា​ពី​ចម្ងាយ +Description[ko]=Plasma 원격 위젯 정책을 저장하지 못하도록 합니다 +Description[lt]=Neleidžia sistemai išsaugoti nutolusių plazmos valdiklių taisyklių +Description[nb]=Hindrer at systemet lagrer praksiser for plasmaelementer på nettverket +Description[nds]=Höllt dat Systeem vun't Sekern vun de Regeln för feern Plasma-Lüttprogrammen af +Description[nl]=Voorkomt het opslaan door het systeem van beleidsregels voor widgets op afstand +Description[nn]=Hindrar systemet i å lagra reglar for fjernelement +Description[pa]=ਰਿਮੋਟ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ ਦੀਆਂ ਨੀਤੀਆਂ ਸੰਭਾਲਣ ਤੋਂ ਸਿਸਟਮ ਨੂੰ ਰੋਕਦਾ ਹੈ +Description[pl]=Wyłącza zapisywanie polityk zdalnych elementów interfejsu +Description[pt]=Impede o sistema de gravar as políticas dos elementos remotos do Plasma +Description[pt_BR]=Previne o sistema de salvar as políticas de widgets Plasma remotos +Description[ro]=Impiedică sistemul să salveze politicile controalelor distante +Description[ru]=Сохранение правил доступа к удалённо доступным виджетам +Description[si]=දුරස්ථ ප්ලැස්මා විජට්ටු ප්‍රතිපත්ති සුරැකීමෙන් පද්ධතිය වළක්වයි +Description[sk]=Zabraňuje systému ukladať politiky pre vzdialené widgety +Description[sl]=Sistemu prepreči shranjevanje pravil za oddaljene gradnike +Description[sr]=Спречава систем да сачува смернице удаљених плазма виџета +Description[sr@ijekavian]=Спречава систем да сачува смјернице удаљених плазма виџета +Description[sr@ijekavianlatin]=Sprečava sistem da sačuva smjernice udaljenih plasma vidžeta +Description[sr@latin]=Sprečava sistem da sačuva smernice udaljenih plasma vidžeta +Description[sv]=Förhindrar systemet från att spara policy för Plasma grafiska fjärrkomponenter +Description[th]=ป้องกันระบบจากการบันทึกกฎของวิดเจ็ตของพลาสมาจากทางไกล +Description[tr]=Sistemin uzak plasma programcık politikalarını kaydetmesini engelle +Description[ug]=سىستېما يىراقتىكى پلازما ۋىجېتلىرىنىڭ تەدبىرىنى ساقلاشنى چەكلەيدۇ +Description[uk]=Заборонити системі зберігати правила для віддалених віджетів Плазми +Description[x-test]=xxPrevents the system from saving remote plasma widgets' policiesxx +Description[zh_CN]=禁止系统保存远程 Plasma 部件的策略 +Description[zh_TW]=避免系統儲存遠端 plasma 元件政策 Policy=auth_admin diff --git a/scriptengines/javascript/data/plasma-javascriptaddon.desktop b/scriptengines/javascript/data/plasma-javascriptaddon.desktop index e1ea6f7a0..293c42af6 100644 --- a/scriptengines/javascript/data/plasma-javascriptaddon.desktop +++ b/scriptengines/javascript/data/plasma-javascriptaddon.desktop @@ -1,5 +1,59 @@ [Desktop Entry] Name=Plasma JavaScript Addon +Name[ast]=Complementu de JavaScript pa Plasma +Name[bg]=Добавка за JavaScript на Plasma +Name[bs]=Plazma javaskriptni dodatak +Name[ca]=Complement del JavaScript pel Plasma +Name[ca@valencia]=Complement del JavaScript pel Plasma +Name[cs]=Doplněk Plasmy JavaScript +Name[da]=Plasma JavaScript-tilføjelse +Name[de]=JavaScript-Erweiterung für Plasma +Name[el]=Πρόσθετο Plasma JavaScript +Name[en_GB]=Plasma JavaScript Addon +Name[es]=Complemento de JavaScript para Plasma +Name[et]=Plasma JavaScripti lisa +Name[eu]=Plasma JavaScript gehigarria +Name[fi]=Plasma JavaScript -lisäosa +Name[fr]=Module complémentaire Javascript de Plasma +Name[he]=תוסף עבור JavaScript של Plasma +Name[hi]=प्लाज़मा जावा-स्क्रिप्ट एडोन +Name[hr]=Dodatak JavaScripta Plasmi +Name[hu]=Plazma JavaScript-bővítmény +Name[ia]=Plasma JavaScript Addon +Name[is]=Plasma JavaScript viðbót +Name[it]=Aggiunta per Java e JavaScript +Name[ja]=Plasma JavaScript アドオン +Name[kk]=Plasma JavaScript қосымшасы +Name[km]=ផ្នែក​បន្ថែម​ Plasma JavaScript +Name[kn]=ಪ್ಲಾಸ್ಮಾ ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಆಡ್‌ಆನ್ +Name[ko]=Plasma 자바스크립트 추가 기능 +Name[lt]=Plasma JavaScript priedas +Name[nb]=Plasma JavaScript-tillegg +Name[nds]=JavaScript-Verwiedern för Plasma +Name[nl]=Addon voor Plasma JavaScript +Name[nn]=Plasma–JavaScript-tillegg +Name[pa]=ਪਲਾਜ਼ਮਾ ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਐਡਆਨ +Name[pl]=Dodatek dla JavaScript +Name[pt]=Extensão de JavaScript do Plasma +Name[pt_BR]=Complementos de JavaScript do Plasma +Name[ro]=Supliment JavaScript Plasma +Name[ru]=Расширение Plasma, использующее JavaScript +Name[sk]=Doplnok JavaScript pre plasmu +Name[sl]=Dodatek za JavaScript za Plasmo +Name[sr]=Плазма јаваскриптни додатак +Name[sr@ijekavian]=Плазма јаваскриптни додатак +Name[sr@ijekavianlatin]=Plasma JavaScript dodatak +Name[sr@latin]=Plasma JavaScript dodatak +Name[sv]=Plasma Javaskript-tillägg +Name[tg]=Иловаҳои Plasma JavaScript +Name[th]=ส่วนเสริมจาวาและจาวาสคริปต์สำหรับพลาสมาส่วนเสริมจาวาและจาวาสคริปต์สำหรับ +Name[tr]=Plasma JavaScript Eklentisi +Name[ug]=Plasma JavaScript قوشۇلما +Name[uk]=Додаток JavaScript до Плазми +Name[wa]=Pacaedje di rawete Plasma JavaScript +Name[x-test]=xxPlasma JavaScript Addonxx +Name[zh_CN]=Plasma JavaScript 附加插件 +Name[zh_TW]=Plasma JavaScript Addon Type=ServiceType X-KDE-ServiceType=Plasma/JavascriptAddon Icon=plasma diff --git a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop index 05489fe53..8d14d27a0 100644 --- a/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop +++ b/scriptengines/javascript/data/plasma-packagestructure-javascript-addon.desktop @@ -1,6 +1,110 @@ [Desktop Entry] Name=Javascript Addon +Name[ast]=Complementu de JavaScript +Name[bg]=Добавка за Javascript +Name[bs]=Javaskriptni dodatak +Name[ca]=Complement del Javascript +Name[ca@valencia]=Complement del Javascript +Name[cs]=Doplněk JavaScript +Name[da]=JavaScript-tilføjelse +Name[de]=JavaScript-Erweiterung +Name[el]=Πρόσθετο Javascript +Name[en_GB]=Javascript Addon +Name[es]=Complemento de JavaScript +Name[et]=JavaScripti lisa +Name[eu]=Javascript gehigarria +Name[fi]=Javascript-lisäosa +Name[fr]=Module complémentaire Javascript +Name[he]=תוסף JavaScript +Name[hi]=जावास्क्रिप्ट एडोन +Name[hr]=Dodadak za Javascript +Name[hu]=Javascript-bővítmény +Name[ia]=JavaScript Addon +Name[is]=JavaScript viðbót +Name[it]=Aggiunta per JavaScript +Name[ja]=JavaScript アドオン +Name[kk]=Javascript қосымшасы +Name[km]=ផ្នែក​បន្ថែម Javascript +Name[kn]=ಜಾವಾಸ್ಕ್ರಿಪ್ಟ್ ಆಡ್‌ಆನ್ +Name[ko]=자바스크립트 추가 기능 +Name[lt]=Javascript priedas +Name[nb]=JavaScript-tillegg +Name[nds]=JavaScript-Verwiedern +Name[nl]=Addon voor JavaScript +Name[nn]=JavaScript-tillegg +Name[pa]=ਜਾਵਾ ਸਕ੍ਰਿਪਟ ਐਡ-ਆਨ +Name[pl]=Dodatek dla JavaScript +Name[pt]=Extensão de JavaScript +Name[pt_BR]=Complementos de JavaScript +Name[ro]=Supliment Javascript +Name[ru]=Дополнение, использующее JavaScript +Name[sk]=Doplnok JavaScript +Name[sl]=Dodatek za JavaScript +Name[sr]=Јаваскриптни додатак +Name[sr@ijekavian]=Јаваскриптни додатак +Name[sr@ijekavianlatin]=JavaScript dodatak +Name[sr@latin]=JavaScript dodatak +Name[sv]=Javaskript-tillägg +Name[th]=ส่วนเสริมจาวาสคริปต์ +Name[tr]=Javascript Eklentisi +Name[ug]=Javascript قوشۇلما +Name[uk]=Додаток JavaScript +Name[wa]=Pacaedje di rawete Javascript +Name[x-test]=xxJavascript Addonxx +Name[zh_CN]=Javascript 插件 +Name[zh_TW]=Javascript Addon Comment=Addons for Javascript Plasma plugins +Comment[ast]=Amestaos pa complementos de JavaScript pa Plasma +Comment[bg]=Добавки за приставките за Javascript на Plasma +Comment[bs]=Dodaci za javaskriptne plazma priključke +Comment[ca]=Complements pels connectors Javascript del Plasma +Comment[ca@valencia]=Complements pels connectors Javascript del Plasma +Comment[cs]=Doplňky pro javascriptové zásuvné moduly plasmy +Comment[da]=Tilføjelse til Plasma-plugins i JavaScript +Comment[de]=Erweiterungen für JavaScript-Module in Plasma +Comment[el]=Πρόσθετο για Plasma JavaScript +Comment[en_GB]=Addons for Javascript Plasma plugins +Comment[es]=Añadidos para complementos de JavaScript para Plasma +Comment[et]=JavaScripti Plasma pluginate lisad +Comment[eu]=Javascript Plasma pluginentzako gehigarriak +Comment[fi]=Lisäosia JavaScript Plasma -liitännäisille +Comment[fr]=Module complémentaire pour les modules externes en Javascript de Plasma +Comment[he]=תוספים לתוספי JavaScript של Plasma +Comment[hr]=Dodaci za priključke za Javascript Plasma +Comment[hu]=Bővítmények JavaScript Plazma-modulokhoz +Comment[ia]=Addons (elementos adjuncte) pro plugins de Plasma de javascript +Comment[is]=Viðbætur fyrir Plasma JavaScript íforrit +Comment[it]=Aggiunte per le estensioni JavaScript di Plasma +Comment[ja]=JavaScript Plasma プラグイン用のアドオン +Comment[kk]=Javascript Plasma плагиніне қосымшасы +Comment[km]=កម្មវិធី​បន្ថែម​សម្រាប់​កម្មវិធី​ជំនួយ Javascript Plasma +Comment[ko]=자바스크립트 Plasma 플러그인을 위한 추가 기능 +Comment[lt]=Javascript Plasma papildinio priedai +Comment[nb]=Tillegg for JavaSript Plasma-programtillegg +Comment[nds]=Verwiedern för Plasma sien JavaScript-Modulen +Comment[nl]=Addons voor Javascript Plasma plugins +Comment[nn]=Tillegg for JavaScript–Plasma-programtillegg +Comment[pa]=ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਲਾਜ਼ਮਾ ਪਲੱਗਇਨ ਲਈ ਐਡਐਨ +Comment[pl]=Dodatki dla wtyczek Plazmy w JavaScript +Comment[pt]=Extras para os 'plugins' do Plasma em JavaScript +Comment[pt_BR]=Complementos para os plug-ins do Plasma em JavaScript +Comment[ro]=Suplimente pentru module JavaScript Plasma +Comment[ru]=Модули поддержки дополнений Plasma, использующих JavaScript +Comment[sk]=Doplnky pre Javascriptové moduly plasmy +Comment[sl]=Dodatki za vstavke JavaScript za Plasmo +Comment[sr]=Додаци за јаваскриптне плазма прикључке +Comment[sr@ijekavian]=Додаци за јаваскриптне плазма прикључке +Comment[sr@ijekavianlatin]=Dodaci za JavaScript plasma priključke +Comment[sr@latin]=Dodaci za JavaScript plasma priključke +Comment[sv]=Tillägg för Javascript Plasma-insticksprogram +Comment[th]=ส่วนขยายสำหรับส่วนเสริมพลาสมาที่เป็นจาวาสคริปต์ +Comment[tr]=Javascript Plasma eklentileri için ek araçlar +Comment[ug]=Javascript Plasma قىستۇرمىسى ئۈچۈن قوشۇلما +Comment[uk]=Додатки для використання Javascript у Плазмі +Comment[wa]=Pacaedjes di rawete po les tchôkes-divins Plasma Javascript +Comment[x-test]=xxAddons for Javascript Plasma pluginsxx +Comment[zh_CN]=Javascript Plasma 插件的附件组件 +Comment[zh_TW]=Javascript Plasma 外掛程式的 Addon Type=Service X-KDE-ServiceTypes=Plasma/PackageStructure diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop index 276b40c84..6f9730a5f 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-declarative.desktop @@ -1,6 +1,104 @@ [Desktop Entry] Name=Declarative widget +Name[ast]=Elementu gráficu declarativu +Name[bg]=Декларативна джаджа +Name[bs]=Deklarativna grafička kontrola +Name[ca]=Estri declaratiu +Name[ca@valencia]=Estri declaratiu +Name[cs]=Deklarativní widget +Name[da]=Erklærende widget +Name[de]=Deklaratives Bedienelement +Name[el]=Δηλωτικό συστατικό +Name[en_GB]=Declarative widget +Name[es]=Elemento gráfico declarativo +Name[et]=Deklaratiivne vidin +Name[eu]=Trepeta ezagutarazlea +Name[fr]=Composant graphique « Declarative » +Name[he]=ווידג׳ט מוצהר +Name[hr]=Deklarativni widget +Name[hu]=Deklaratív widget +Name[ia]=Widget declarative +Name[is]=Skilgreiningagræja +Name[it]=Oggetto dichiarativo +Name[kk]=Мәлімдеме виджеті +Name[km]=ធាតុ​ក្រាហ្វិក​ដែល​ប្រកាស +Name[ko]=Declarative 위젯 +Name[lt]=Deklaratyvus valdiklis +Name[nb]=Deklarativt skjermelement +Name[nds]=Stüerelement för Verkloren +Name[nl]=Widget voor declaratie +Name[nn]=Deklarativt skjermelement +Name[pl]=Deklaratywny element interfejsu +Name[pt]=Item declarativo +Name[pt_BR]=Widget declarativo +Name[ro]=Control declarativ +Name[ru]=Декларативный виджет +Name[sk]=Deklaratívny widget +Name[sl]=Deklarativni gradnik +Name[sr]=Декларативни виџет +Name[sr@ijekavian]=Декларативни виџет +Name[sr@ijekavianlatin]=Deklarativni vidžet +Name[sr@latin]=Deklarativni vidžet +Name[sv]=Deklarativ grafisk komponent +Name[tr]=Bildirim parçacığı +Name[ug]=ئېنىقلىما ۋىجېت +Name[uk]=Декларативний віджет +Name[wa]=Ahesse di gåyotaedje +Name[x-test]=xxDeclarative widgetxx +Name[zh_CN]=描述部件 +Name[zh_TW]=宣告元件 Comment=Native Plasma widget written in QML and JavaScript +Comment[ast]=Elementu gráficu nativu de Plasma escritu en QML y JavaScript +Comment[bg]=Оригинална джаджа за Plasma, написана наQML и JavaScript +Comment[bs]=Samosvojni plazma grafičkih kontrola napisana u QML‑u i javaskriptu +Comment[ca]=Estri nadiu del Plasma escrit en QML i JavaScript +Comment[ca@valencia]=Estri nadiu del Plasma escrit en QML i JavaScript +Comment[cs]=Nativní Plasma widget napsaný v QML a JavaScriptu +Comment[da]=Hjemmehørende Plasma-widget skrevet i QML og JavaScript +Comment[de]=Echtes Plasma-Programm, geschrieben in QML und JavaScript +Comment[el]=Εγγενές συστατικό Plasma γραμμένο σε QML και JavaScript +Comment[en_GB]=Native Plasma widget written in QML and JavaScript +Comment[es]=Elemento gráfico nativo de Plasma escrito en QML y JavaScript +Comment[et]=QML-is ja JavaScriptis kirjutatud Plasma vidin +Comment[eu]=Plasma jatorrizko trepeta QML eta JavaScript-en idatzia +Comment[fi]=Natiivi, QML-pohjainen Plasma-sovelma +Comment[fr]=Composant graphique natif de Plasma écrit en QML et JavaScript +Comment[he]=ווידג׳טים של Plasma הנכתבים ב־QML וב־JavaScript +Comment[hr]=Izvorni Plasma widget napisan u QML-u i JavaScriptu +Comment[hu]=QML-ben és JavaScriptben írt natív Plazma-widget +Comment[ia]=Widget native de Plasma scribite in QLM e JavaScript +Comment[is]=Upprunabundin Plasma græja skrifuð í QML og JavaScript +Comment[it]=Oggetto nativo di Plasma scritto in QML e JavaScript +Comment[ja]=QML と JavaScript で書かれた Plasma のネイティブウィジェット +Comment[kk]=QML мен JavaScript-те жазылған Plasma тума виджеті +Comment[km]=ធាតុ​ក្រាហ្វិក​ប្លា​ស្មា​ដើម ដែល​សរសេរ​ក្នុង JavaScript​ +Comment[kn]=QML ಹಾಗು ಜಾವಾ ಸ್ಕ್ರಿಪ್ಟ್ ನಲ್ಲಿ ಬರೆಯಲಾದ ಸ್ವಾಭಾವಿಕ ಪ್ಲಾಸ್ಮಾ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) +Comment[ko]=QML과 자바스크립트로 작성된 Plasma 위젯 +Comment[lt]=Nuosavas Plasma valdiklis parašytas QML ir JavaScript kalba +Comment[nb]=Plasmaelement for dette systemet, skrevet i QML og JavaScript +Comment[nds]=En orginaal Plasmaelement, schreven in QML un JavaScript +Comment[nl]=Hier thuishorend Plasma-widget geschreven in QML en JavaScript +Comment[nn]=Plasma-element skriven i QML og JavaScript +Comment[pa]=QML ਤੇ ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿੱਚ ਲਿਖੇ ਨੇਟਿਵ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ +Comment[pl]=Element interfejsu Plazmy napisany w QML lub JavaScript +Comment[pt]=Elemento nativo do Plasma feito em QML e JavaScript +Comment[pt_BR]=Widget do Plasma nativo escrito em QML e JavaScript +Comment[ro]=Miniaplicație Plasma nativă scrisă în QML și JavaScript +Comment[ru]=Виджет Plasma, написанный на языках QML и JavaScript +Comment[sk]=Natívny plasma widget napísaný v QML a JavaScripte +Comment[sl]=Pravi gradnik za Plasmo, ki je napisan v QML-u in JavaScriptu +Comment[sr]=Самосвојни плазма виџет написан у КуМЛ‑у и јаваскрипту +Comment[sr@ijekavian]=Самосвојни плазма виџет написан у КуМЛ‑у и јаваскрипту +Comment[sr@ijekavianlatin]=Samosvojni plasma vidžet napisan u QML‑u i JavaScriptu +Comment[sr@latin]=Samosvojni plasma vidžet napisan u QML‑u i JavaScriptu +Comment[sv]=Inbyggd grafisk Plasma-komponent skriven i QML och Javascript +Comment[th]=วิดเจ็ตพลาสมาแบบดั้งเดิมที่เขียนด้วย QML และจาวาสคริปต์ +Comment[tr]=JavaScript ve QML ile yazılmış gerçek Plasma gereci +Comment[ug]=QML ۋە JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى +Comment[uk]=Віджет Плазми, написаний на QML та JavaScript +Comment[x-test]=xxNative Plasma widget written in QML and JavaScriptxx +Comment[zh_CN]=使用 QML 和 JavaScript 编写的原生 Plasma 部件 +Comment[zh_TW]=用 QML 與 JavaScript 寫的原始 Plasma 元件 Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop index 6926cfa7c..422d20385 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-applet-simple-javascript.desktop @@ -1,6 +1,150 @@ [Desktop Entry] Name=JavaScript Widget +Name[ar]=ودجة جافا سكربت +Name[ast]=Elementu gráficu JavaScript +Name[be@latin]=Widžet „JavaScript” +Name[bg]=Джаджа JavaScript +Name[bn_IN]=JavaScript Widget +Name[bs]=Javascript grafička kontrola +Name[ca]=Estri del JavaScript +Name[ca@valencia]=Estri del JavaScript +Name[cs]=JavaScript Widget +Name[csb]=Interfejs JavaScript +Name[da]=JavaScript-widget +Name[de]=JavaScript-Programm +Name[el]=Συστατικό JavaScript +Name[en_GB]=JavaScript Widget +Name[eo]=Ĝavaskripta fenestraĵo +Name[es]=Elemento gráfico JavaScript +Name[et]=JavaScripti vidin +Name[eu]=JavaScript trepeta +Name[fi]=JavaScript-sovelma +Name[fr]=Composant graphique JavaScript +Name[fy]=JavaSkript Widget +Name[ga]=Giuirléid JavaScript +Name[gl]=Widget de JavaScript +Name[gu]=જાવાસ્ક્રિપ્ટ વિજેટ +Name[he]=ווידג׳ט JavaScript +Name[hi]=जावास्क्रिप्ट विज़ेट +Name[hne]=जावास्क्रिप्ट विजेट +Name[hr]=JavaScript widgeti +Name[hu]=JavaScript-objektum +Name[ia]=JavaScript Widget +Name[id]=Widget JavaScript +Name[is]=JavaScript græja +Name[it]=Oggetto JavaScript +Name[ja]=JavaScript ウィジェット +Name[kk]=JavaScript интерфейс бөлшегі +Name[km]=ធាតុ​ក្រាហ្វិក JavaScript +Name[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) +Name[ko]=자바스크립트 위젯 +Name[ku]=Amîra JavaScriptê +Name[lt]=JavaScript valdiklis +Name[lv]=JavaScript sīkrīks +Name[ml]=ജാവാസ്ക്രിപ്റ്റ് വിഡ്ജറ്റ് +Name[mr]=जावास्क्रिप्ट विजेट +Name[nb]=JavaScript-skjermelement +Name[nds]=JavaScript-Finster +Name[nl]=JavaScript-widget +Name[nn]=JavaScript-element +Name[or]=JavaScript ୱିଜେଟ +Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿਦਜੈੱਟ +Name[pl]=Element interfejsu w JavaScript +Name[pt]=Elemento de JavaScript +Name[pt_BR]=Widget de JavaScript +Name[ro]=Miniaplicație JavaScript +Name[ru]=Виджет на языке JavaScript +Name[si]=Python මෙවලම් +Name[sk]=JavaScript widget +Name[sl]=Gradnik v JavaScriptu +Name[sr]=јаваскриптни виџет +Name[sr@ijekavian]=јаваскриптни виџет +Name[sr@ijekavianlatin]=JavaScript vidžet +Name[sr@latin]=JavaScript vidžet +Name[sv]=Grafisk Javascript-komponent +Name[ta]=JavaScript Widget +Name[te]=జావాస్క్రిప్‍ట్ విడ్‍జ్‌ట్ +Name[tg]=Видҷети JavaScript +Name[th]=วิดเจ็ตภาษาจาวาสคริปต์ +Name[tr]=JavaScript Programcığı +Name[ug]=JavaScript ۋىجېتى +Name[uk]=Віджет JavaScript +Name[wa]=Ahesse JavaScript +Name[x-test]=xxJavaScript Widgetxx +Name[zh_CN]=JavaScript 部件 +Name[zh_TW]=JavaScript 元件 Comment=Native Plasma widget written in JavaScript +Comment[ar]=ودجة بلازما أصلية كتبت بجافا سكربت +Comment[ast]=Elementu gráficu nativu de Plasma escritu en JavaScript +Comment[be@latin]=Widžet systemy „Plasma”, napisany ŭ movie „JavaScript” +Comment[bg]=Оригинална джаджа за Plasma, написана с JavaScript +Comment[bs]=Samosvojni plazma grafička kontrola napisana u javaskriptu +Comment[ca]=Estri nadiu del Plasma escrit en JavaScript +Comment[ca@valencia]=Estri nadiu del Plasma escrit en JavaScript +Comment[cs]=Nativní Plasma widget napsaný v JavaScriptu +Comment[csb]=Prôwdzëwi widżet Plasmë napisóny w JavaScript +Comment[da]=Native Plasma-widget skrevet i JavaScript +Comment[de]=Echtes Plasma-Programm, geschrieben in JavaScript +Comment[el]=Εγγενές συστατικό Plasma γραμμένο σε JavaScript +Comment[en_GB]=Native Plasma widget written in JavaScript +Comment[eo]=Indiĝena Plasma-fenestraĵo programita per Ĝavoskripto +Comment[es]=Elemento gráfico nativo de Plasma escrito en JavaScript +Comment[et]=JavaScriptis kirjutatud Plasma vidin +Comment[eu]=Plasma jatorrizko trepeta JavaScript-en idatzia +Comment[fi]=Natiivi, JavaScript-pohjainen Plasma-sovelma +Comment[fr]=Composant graphique natif de Plasma écrit en JavaScript +Comment[fy]=Plasma widget skreaun yn JavaSkript +Comment[ga]=Giuirléid dhúchasach Plasma, scríofa i JavaScript +Comment[gl]=Widget nativo de Plasma escrito en JavaScript +Comment[gu]=જાવાસ્ક્રિપ્ટમાં લખાયેલ મૂળભૂત પ્લાઝમા વિજેટ +Comment[he]=ווידג׳ט של Plasma הנכתב ב־JavaScript +Comment[hi]=जावास्क्रिप्ट में लिखा गया नेटिव प्लाज्मा विजेट +Comment[hne]=जावास्क्रिप्ट मं लिखे नेटिव प्लाज्मा विजेट +Comment[hr]=Izvorna Plasma widget napisana u JavaScriptu +Comment[hu]=Plasma-elem Javascriptben elkészítve +Comment[ia]=Widget native de Plasma scribite in JavaScript +Comment[id]=Widget Plasma asli yang ditulis dalam JavaScript +Comment[is]=Upprunabundin Plasma græja skrifuð í JavaScript +Comment[it]=Oggetto nativo di Plasma scritto in JavaScript +Comment[ja]=JavaScript で書かれた Plasma のネイティブウィジェット +Comment[kk]=JavaScript-те жазылған Plasma тума виджеті +Comment[km]=ធាតុ​ក្រាហ្វិក​ប្លាស្មា​ដើម ដែល​សរសេរ​ក្នុង JavaScript +Comment[kn]=ಜಾವಾ ಸ್ಕ್ರಿಪ್ಟ್ ನಲ್ಲಿ ಬರೆಯಲಾದ ಸ್ವಾಭಾವಿಕ ಪ್ಲಾಸ್ಮಾ ನಿಯಂತ್ರಣಾ ಸಂಪರ್ಕತಟ (ವಿಡ್ಗೆಟ್) +Comment[ko]=자바스크립트로 작성된 Plasma 위젯 +Comment[lt]=Nuosavas Plasma valdiklis parašytas JavaScript kalba +Comment[lv]=Plasma sīkrīks, rakstīts JavaScript +Comment[ml]=ജാവാസ്ക്രിപ്റ്റില്‍ തയ്യാറാക്കിയിരിക്കുന്ന നേറ്റീവ് പ്ലാസ്മാ വിഡ്ജറ്റ് +Comment[mr]=जावास्क्रिप्ट अंतर्गत लिहीले गेलेले मुळ प्लाज्मा विजेट +Comment[nb]=Plasmaelement for dette systemet, skrevet i JavaScript +Comment[nds]=En orginaal Plasmaelement, schreven in JavaScript +Comment[nl]=Plasma-widget geschreven in JavaScript +Comment[nn]=Plasma-element skriven i JavaScript +Comment[or]=JavaScriptରେ ଲିଖିତ ସ୍ଥାନୀୟ ପ୍ଲାଜମା ୱିଜେଟ +Comment[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਵਿੱਚ ਲਿਖੇ ਨੇਟਿਵ ਪਲਾਜ਼ਮਾ ਵਿਦਜੈੱਟ +Comment[pl]=Element interfejsu Plazmy napisany w JavaScript +Comment[pt]=Elemento nativo do Plasma feito em JavaScript +Comment[pt_BR]=Widget do Plasma nativo escrito em JavaScript +Comment[ro]=Miniaplicație Plasma scrisă în JavaScript +Comment[ru]=Виджет Plasma, написанный на языке JavaScript +Comment[si]=ජාවා ස්ක්‍රිප්ට මගින් ලියූ ප්ලාස්මා විජෙට්ටු +Comment[sk]=Natívny plasma widget napísaný v JavaScripte +Comment[sl]=Pravi gradnik za Plasmo, ki je napisan v JavaScriptu +Comment[sr]=Самосвојни плазма виџет написан у јаваскрипту +Comment[sr@ijekavian]=Самосвојни плазма виџет написан у јаваскрипту +Comment[sr@ijekavianlatin]=Samosvojni plasma vidžet napisan u JavaScriptu +Comment[sr@latin]=Samosvojni plasma vidžet napisan u JavaScriptu +Comment[sv]=Inbyggd grafisk Plasma-komponent skriven i Javascript +Comment[ta]=Native Plasma widget written in JavaScript +Comment[te]=జావాస్క్రిప్‍ట్‌లో వ్రాసిన నేటివ్ ప్లాజ్మా విడ్‍జ్‌ట్ +Comment[tg]=Модуль Plasma, написанный на языке JavaScript +Comment[th]=วิดเจ็ตพลาสมาที่ถูกเขียนด้วยจาวาสคริปต์ +Comment[tr]=JavaScript ile yazılmış gerçek Plasma gereci +Comment[ug]=JavaScript بىلەن يېزىلغان ئەسلى Plasma ۋىجېتى +Comment[uk]=Віджет Плазми, написаний на JavaScript +Comment[wa]=Ahesse askepieye po Plasma eyet scrîte e JavaScript +Comment[x-test]=xxNative Plasma widget written in JavaScriptxx +Comment[zh_CN]=使用 JavaScript 编写的原生 Plasma 部件 +Comment[zh_TW]=用 JavaScript 寫的原始 Plasma 元件 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop index 42e3d5825..3b0c00e8a 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-dataengine-javascript.desktop @@ -1,5 +1,69 @@ [Desktop Entry] Name=JavaScript DataEngine +Name[ar]=مشغل جافا سكربت +Name[ast]=Motor de datos JavaScript +Name[bg]=Ядро за данни на JavaScript +Name[bs]=Javascript pogon podataka +Name[ca]=Motor de dades de JavaScript +Name[ca@valencia]=Motor de dades de JavaScript +Name[cs]=Datový nástroj JavaScript +Name[csb]=Mòtór JavaScript +Name[da]=JavaScript-datamotor +Name[de]=JavaScript-Datenmodul +Name[el]=Μηχανή δεδομένων JavaScript +Name[en_GB]=JavaScript DataEngine +Name[eo]=Ĝavaskripta Datummodulo +Name[es]=Motor de datos JavaScript +Name[et]=JavaScripti andmemootor +Name[eu]=JavaScript datu-motorea +Name[fi]=JavaScript-datakone +Name[fr]=Moteur de données JavaScript +Name[fy]=JavaSkript gegevens motor +Name[ga]=Inneall Sonraí JavaScript +Name[gl]=Motor de datos de JavaScript +Name[gu]=જાવાસ્ક્રિપ્ટ માહિતીએન્જિન +Name[he]=מנוע נתונים של JavaScript +Name[hr]=JavaScript podatkovni mehanizam +Name[hu]=JavaScript-adatmodul +Name[ia]=JavaScript Motor de Datos (Data Engine) +Name[id]=Mesin Data JavaScript +Name[is]=JavaScript gagnavél +Name[it]=Motore di dati JavaScript +Name[ja]=JavaScript データエンジン +Name[kk]=JavaScript деректер тетігі +Name[km]=ម៉ាស៊ីន​ទិន្នន័យ JavaScript +Name[kn]=JavaScript DataEngine +Name[ko]=자바스크립트 데이터 엔진 +Name[lt]=JavaScript duomenų variklis +Name[lv]=JavaScript datu dzinējs +Name[ml]=ജാവാസ്ക്രിപ്റ്റ് ഡാറ്റാഎഞ്ചിന്‍ +Name[nb]=JavaScript datamotor +Name[nds]=JavaScript-Datenkarn +Name[nl]=JavaScript-data-engine +Name[nn]=JavaScript-datamotor +Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਡਾਟਾਇੰਜਣ +Name[pl]=Silnik danych JavaScript +Name[pt]=Motor de Dados do JavaScript +Name[pt_BR]=Mecanismo de dados JavaScript +Name[ro]=MotorDate JavaScript +Name[ru]=Поставщик данных (JavaScript) +Name[si]=JavaScript දත්ත එන්ජිම +Name[sk]=Dátový nástroj JavaScript +Name[sl]=Podatkovni pogon za JavaScript +Name[sr]=јаваскриптни датомотор +Name[sr@ijekavian]=јаваскриптни датомотор +Name[sr@ijekavianlatin]=JavaScript datomotor +Name[sr@latin]=JavaScript datomotor +Name[sv]=Javascript-datagränssnitt +Name[tg]=Иҷрогари JavaScript +Name[th]=กลไกข้อมูลของจาวาสคริปต์ +Name[tr]=JavaScript Veri Motoru +Name[ug]=JavaScript سانلىق مەلۇمات ماتورى +Name[uk]=Рушій даних JavaScript +Name[wa]=Moteur di dnêyes JavaScript +Name[x-test]=xxJavaScript DataEnginexx +Name[zh_CN]=JavaScript 数据引擎 +Name[zh_TW]=JavaScript 資料引擎 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script diff --git a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop index 2c896b488..5f47b3933 100644 --- a/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop +++ b/scriptengines/javascript/data/plasma-scriptengine-runner-javascript.desktop @@ -1,6 +1,154 @@ [Desktop Entry] Name=JavaScript Runner +Name[ar]=مشغل جافا سكربت +Name[ast]=Motor de javascript +Name[be@latin]=Uklučeńnie „JavaScript” +Name[bg]=Изпълнение на JavaScript +Name[bn_IN]=JavaScript Runner +Name[bs]=Javascript izvođač +Name[ca]=Executor de JavaScript +Name[ca@valencia]=Executor de JavaScript +Name[cs]=Spouštěč JavaScriptu +Name[csb]=Mòtór JavaScript +Name[da]=JavaScript-runner +Name[de]=JavaScript-Ausführung +Name[el]=Εκτελεστής JavaScript +Name[en_GB]=JavaScript Runner +Name[eo]=Ĝavaskripta ruligilo +Name[es]=Motor de javascript +Name[et]=JavaScripti käivitaja +Name[eu]=JavaScript abiarazlea +Name[fi]=JavaScript-suoritusohjelma +Name[fr]=Lanceur JavaScript +Name[fy]=JavaSkript rinner +Name[ga]=Feidhmitheoir JavaScript +Name[gl]=Executor de JavaScript +Name[gu]=જાવાસ્ક્રિપ્ટ ચલાવનાર +Name[he]=מריץ JavaScript +Name[hi]=जावास्क्रिप्ट चलाने वाला +Name[hne]=जावास्क्रिप्ट चलइया +Name[hr]=JavaScript Pokretač +Name[hu]=JavaScript-indító +Name[ia]=JavaScript Executor +Name[id]=Pelari JavaScript +Name[is]=JavaScript keyrari +Name[it]=Esecutore JavaScript +Name[ja]=JavaScript Runner +Name[kk]=JavaScript жеккіші +Name[km]=កម្មវិធី​រត់ JavaScript +Name[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ಚಾಲಕ +Name[ko]=자바스크립트 실행기 +Name[ku]=Xebatkara JavaScriptê +Name[lt]=JavaScript paleidiklis +Name[lv]=JavaScript darbinātājs +Name[mk]=Извршувач на JavaScript +Name[ml]=ജാവാസ്ക്രിപ്റ്റ് റണ്ണര്‍ +Name[mr]=जावास्क्रिप्ट चालक +Name[nb]=JavaScript-kjører +Name[nds]=JavaScript-Dreger +Name[nl]=JavaScript-runner +Name[nn]=JavaScript-køyrar +Name[or]=JavaScript ଚାଳକ +Name[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਰਨਰ +Name[pl]=Silnik JavaScript +Name[pt]=Execução de JavaScript +Name[pt_BR]=Mecanismo JavaScript +Name[ro]=Executor JavaScript +Name[ru]=JavaScript Runner +Name[si]=JavaScript ධාවකය +Name[sk]=Spúšťač JavaScriptu +Name[sl]=Zaganjalnik javascripta +Name[sr]=јаваскриптни извођач +Name[sr@ijekavian]=јаваскриптни извођач +Name[sr@ijekavianlatin]=JavaScript izvođač +Name[sr@latin]=JavaScript izvođač +Name[sv]=Kör Javascript +Name[ta]=JavaScript Runner +Name[te]=జావాస్క్రిప్‍ట్ నడుపునది +Name[tg]=Иҷрогари JavaScript +Name[th]=ตัวประมวลผลจาวาสคริปต์ +Name[tr]=JavaScript Çalıştırıcı +Name[ug]=JavaScript ئىجراچىسى +Name[uk]=Механізм запуску JavaScript +Name[wa]=Enondeu JavaScript +Name[x-test]=xxJavaScript Runnerxx +Name[zh_CN]=JavaScript 运行器 +Name[zh_TW]=JavaScript 執行器 Comment=JavaScript Runner +Comment[ar]=مشغل جافا سكربت +Comment[ast]=Motor de javascript +Comment[be@latin]=Uklučeńnie „JavaScript”. +Comment[bg]=Изпълнение на JavaScript +Comment[bn_IN]=JavaScript Runner +Comment[bs]=Javascript izvođač +Comment[ca]=Executor de JavaScript +Comment[ca@valencia]=Executor de JavaScript +Comment[cs]=Spouštěč JavaScriptu +Comment[csb]=Zrëszôcz JavaScript +Comment[da]=JavaScript-runner +Comment[de]=JavaScript-Ausführung +Comment[el]=Εκτελεστής JavaScript +Comment[en_GB]=JavaScript Runner +Comment[eo]=Ĝavaskripta ruligilo +Comment[es]=Motor de javascript +Comment[et]=JavaScripti käivitaja +Comment[eu]=JavaScript abiarazlea +Comment[fi]=JavaScript-suoritusohjelma +Comment[fr]=Lanceur JavaScript +Comment[fy]=JavaSkript rinner +Comment[ga]=Feidhmitheoir JavaScript +Comment[gl]=Executor de JavaScript +Comment[gu]=જાવાસ્ક્રિપ્ટ ચલાવનાર +Comment[he]=מריץ JavaScript +Comment[hi]=जावास्क्रिप्ट चलाने वाला +Comment[hne]=जावास्क्रिप्ट चलइया +Comment[hr]=JavaScript pokretač +Comment[hu]=JavaScript-indító +Comment[ia]=JavaScript Executor +Comment[id]=Pelari JavaScript +Comment[is]=JavaScript keyrari +Comment[it]=Esecutore JavaScript +Comment[ja]=JavaScript Runner +Comment[kk]=JavaScript жеккіші +Comment[km]=កម្មវិធី​រត់ JavaScript +Comment[kn]=ಜಾವಾ ವಿಧಿಗುಚ್ಛ (ಸ್ಕ್ರಿಪ್ಟ್) ಚಾಲಕ +Comment[ko]=자바스크립트 실행기 +Comment[ku]=Xebatkara JavaScriptê +Comment[lt]=JavaScript paleidiklis +Comment[lv]=JavaScript darbinātājs +Comment[mk]=Извршувач на JavaScript +Comment[ml]=ജാവാസ്ക്രിപ്റ്റ് റണ്ണര്‍ +Comment[mr]=जावास्क्रिप्ट चालक +Comment[nb]=JavaScript-kjører +Comment[nds]=JavaScript-Dreger +Comment[nl]=JavaScript-runner +Comment[nn]=JavaScript-køyrar +Comment[or]=JavaScript ଚାଳକ +Comment[pa]=ਜਾਵਾ-ਸਕ੍ਰਿਪਟ ਰਨਰ +Comment[pl]=Silnik JavaScript +Comment[pt]=Execução de JavaScript +Comment[pt_BR]=Mecanismo JavaScript +Comment[ro]=Executor JavaScript +Comment[ru]=Модуль запуска, написанный на языке JavaScript +Comment[si]=JavaScript Runner +Comment[sk]=Spúšťač JavaScriptu +Comment[sl]=Zaganjalnik javascripta +Comment[sr]=Јаваскриптни извођач +Comment[sr@ijekavian]=Јаваскриптни извођач +Comment[sr@ijekavianlatin]=JavaScript izvođač +Comment[sr@latin]=JavaScript izvođač +Comment[sv]=Kör Javascript +Comment[ta]=JavaScript Runner +Comment[te]=జావాస్క్రిప్‍ట్ నడుపునది +Comment[tg]=Иҷрогари JavaScript +Comment[th]=ตัวประมวลผลจาวาสคริปต์ +Comment[tr]=JavaScript Çalıştırıcı +Comment[ug]=JavaScript ئىجراچىسى +Comment[uk]=Механізм запуску JavaScript +Comment[wa]=Enondeu JavaScript +Comment[x-test]=xxJavaScript Runnerxx +Comment[zh_CN]=JavaScript 运行器 +Comment[zh_TW]=JavaScript 執行器 X-KDE-ServiceTypes=Plasma/ScriptEngine Type=Service Icon=text-x-script From b68fb0a060458aa8b113b67a3b6d9b157fcf4e2e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 12 Sep 2011 21:29:00 +0200 Subject: [PATCH 82/82] be sure to include ALL role names some dataengines can have a different set of keys for each item (ie metadata dataengine) the whole mapped roles must be the complete superset this is not very efficient, but unfortunately is necessary. (another reason why DataContainers should become models) --- declarativeimports/core/datamodel.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index d4f28c0a4..eb56b4fe1 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -262,19 +262,23 @@ void DataModel::setItems(const QString &sourceName, const QVariantList &list) if (!list.isEmpty()) { if (list.first().canConvert()) { - foreach (const QString& roleName, list.first().value().keys()) { - if (!m_roleIds.contains(roleName)) { - ++m_maxRoleId; - m_roleNames[m_maxRoleId] = roleName.toLatin1(); - m_roleIds[roleName] = m_maxRoleId; + foreach (const QVariant &item, list) { + foreach (const QString& roleName, item.value().keys()) { + if (!m_roleIds.contains(roleName)) { + ++m_maxRoleId; + m_roleNames[m_maxRoleId] = roleName.toLatin1(); + m_roleIds[roleName] = m_maxRoleId; + } } } } else { - foreach (const QString& roleName, list.first().value().keys()) { - if (!m_roleIds.contains(roleName)) { - ++m_maxRoleId; - m_roleNames[m_maxRoleId] = roleName.toLatin1(); - m_roleIds[roleName] = m_maxRoleId; + foreach (const QVariant &item, list) { + foreach (const QString& roleName, item.value().keys()) { + if (!m_roleIds.contains(roleName)) { + ++m_maxRoleId; + m_roleNames[m_maxRoleId] = roleName.toLatin1(); + m_roleIds[roleName] = m_maxRoleId; + } } } }