[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bplasma-mobile=5D_/=3A_use_appletstrip_containment_b?=
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-02-28 22:16:48
Message-ID: 20110228221648.9F6CCA60C9 () git ! kde ! org
[Download RAW message or body]

Git commit ec407e2725825a8e218862296f2a6f386a95a62a by Marco Martin.
Committed on 28/02/2011 at 23:16.
Pushed by mart into branch 'master'.

use appletstrip containment by default on tablet

M  +1    -0    containments/CMakeLists.txt     
A  +6    -0    containments/appletstrip/CMakeLists.txt         [License: UNKNOWN]  *
A  +65   -0    containments/appletstrip/package/contents/ui/PlasmoidContainer.qml     \
[License: LGPL (v2+)] A  +118  -0    \
containments/appletstrip/package/contents/ui/main.qml         [License: LGPL (v2+)] A \
+19   -0    containments/appletstrip/package/metadata.desktop         [License: \
UNKNOWN]  * A  +19   -0    containments/appletstrip/plasma-applet-appletstrip.desktop \
[License: UNKNOWN]  * D  +0    -6    research/applets/appletstrip/CMakeLists.txt     
D  +0    -65   research/applets/appletstrip/package/contents/ui/PlasmoidContainer.qml \
 D  +0    -118  research/applets/appletstrip/package/contents/ui/main.qml     
D  +0    -19   research/applets/appletstrip/package/metadata.desktop     
D  +0    -19   research/applets/appletstrip/plasma-applet-appletstrip.desktop     
M  +3    -3    shell/data/plasma-tablet-homescreen/plasma-default-layoutrc     

The files marked with a * at the end have a non valid license. Please read: \
http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are \
listed at that page.


http://commits.kde.org/plasma-mobile/ec407e2725825a8e218862296f2a6f386a95a62a

diff --git a/containments/CMakeLists.txt b/containments/CMakeLists.txt
index 62d1fec..3c90d04 100644
--- a/containments/CMakeLists.txt
+++ b/containments/CMakeLists.txt
@@ -1,4 +1,5 @@
 if(NOT WIN32)
+add_subdirectory(appletstrip)
 add_subdirectory(mobiledesktop)
 add_subdirectory(mobilelauncher)
 
diff --git a/containments/appletstrip/CMakeLists.txt \
b/containments/appletstrip/CMakeLists.txt new file mode 100644
index 0000000..531c871
--- /dev/null
+++ b/containments/appletstrip/CMakeLists.txt
@@ -0,0 +1,6 @@
+project(appletstrip)
+
+install(DIRECTORY package/ DESTINATION \
${DATA_INSTALL_DIR}/plasma/plasmoids/org.kde.appletstrip PATTERN .svn EXCLUDE) +
+install(FILES plasma-applet-appletstrip.desktop
+        DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/containments/appletstrip/package/contents/ui/PlasmoidContainer.qml \
b/containments/appletstrip/package/contents/ui/PlasmoidContainer.qml new file mode \
100644 index 0000000..71bd0c2
--- /dev/null
+++ b/containments/appletstrip/package/contents/ui/PlasmoidContainer.qml
@@ -0,0 +1,65 @@
+/*
+ *   Copyright 2011 Marco Martin <mart@kde.org>
+ *
+ *   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 QtQuick 1.0
+import org.kde.plasma.core 0.1 as PlasmaCore
+
+Item {
+    id: plasmoidContainer
+    anchors.top: appletsRow.top
+    anchors.bottom: appletsRow.bottom
+
+    property QGraphicsWidget applet
+
+    onAppletChanged: {
+        applet.appletDestroyed.connect(appletDestroyed)
+        applet.parent = plasmoidContainer
+        applet.x = 0
+        applet.y = 0
+        height = main.width/2
+    }
+
+    function appletDestroyed()
+    {
+        plasmoidContainer.destroy()
+    }
+
+    PlasmaCore.Svg {
+        id: iconsSvg
+        imagePath: "widgets/configuration-icons"
+    }
+
+    ActionButton {
+        id: removeButton
+        svg: iconsSvg
+        elementId: "close"
+        z: applet.z + 1
+
+        action: applet.action("remove")
+    }
+
+    onHeightChanged: {
+        if (applet) {
+            applet.height = height
+            var ratio = applet.preferredSize.width/applet.preferredSize.height
+            applet.width = main.width/2
+            width = applet.width
+        }
+    }
+}
\ No newline at end of file
diff --git a/containments/appletstrip/package/contents/ui/main.qml \
b/containments/appletstrip/package/contents/ui/main.qml new file mode 100644
index 0000000..2ce8acb
--- /dev/null
+++ b/containments/appletstrip/package/contents/ui/main.qml
@@ -0,0 +1,118 @@
+/*
+ *   Copyright 2011 Marco Martin <mart@kde.org>
+ *
+ *   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
+import org.kde.qtextracomponents 0.1 as QtExtra
+
+Item {
+    id: main
+    signal shrinkRequested
+
+    Component.onCompleted: {
+
+        plasmoid.containmentType = "CustomContainment"
+
+        plasmoid.appletAdded.connect(addApplet)
+
+        for (var i = 0; i < plasmoid.applets.length; ++i) {
+            var applet = plasmoid.applets[i]
+            print(applet)
+            addApplet(applet, 0);
+        }
+    }
+
+
+    function addApplet(applet, pos)
+    {
+        var component = Qt.createComponent("PlasmoidContainer.qml");
+        var plasmoidContainer = component.createObject(appletsRow, {"x": pos.x, "y": \
pos.y}); +        plasmoidContainer.applet = applet
+
+        /* this will be used for inserting in custom positions
+        var oldChildren = appletsRow.children
+        for (var child in oldChildren) {
+            child.parent = 0
+        }
+        for (var child in oldChildren) {
+            child.parent = appletsRow
+        }*/
+    }
+
+
+    PlasmaCore.Theme {
+        id: theme
+    }
+
+    PlasmaCore.Svg {
+        id: iconsSvg
+        imagePath: "widgets/action-overlays"
+    }
+
+    Item {
+        anchors.top: parent.top
+        anchors.bottom: parent.bottom
+        anchors.left: parent.left
+        anchors.right: parent.right
+        Flickable {
+            id: appletsFlickable
+            anchors.top: parent.top
+            anchors.bottom: parent.bottom
+            anchors.horizontalCenter: parent.horizontalCenter
+            clip: true
+            interactive:true
+            contentWidth: mainRow.width
+            contentHeight: mainRow.height
+
+            width: Math.min(parent.width, appletsRow.width)
+
+            Row {
+                id: mainRow
+                Row {
+                    id: appletsRow
+                    height: appletsFlickable.height
+                    add: Transition {
+                        NumberAnimation {
+                            properties: "x"
+                            easing.type: Easing.OutBounce
+                            duration: 250
+                        }
+                    }
+                    move: Transition {
+                        NumberAnimation {
+                            properties: "x"
+                            easing.type: Easing.OutBounce
+                            duration: 250
+                        }
+                    }
+                }
+                Item {
+                    anchors.top: parent.top
+                    anchors.bottom: parent.bottom
+                    width: main.width/2
+                    ActionButton {
+                        anchors.centerIn: parent
+                        elementId: "add-normal"
+                        action: plasmoid.action("add widgets")
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/containments/appletstrip/package/metadata.desktop \
b/containments/appletstrip/package/metadata.desktop new file mode 100644
index 0000000..442cc30
--- /dev/null
+++ b/containments/appletstrip/package/metadata.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Applets strip
+Icon=user-desktop
+Type=Service
+X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
+
+X-KDE-ParentAppp=plasma-mobile
+X-Plasma-API=declarativeappletscript
+X-Plasma-MainScript=ui/main.qml
+X-KDE-PluginInfo-Author=Marco Martin
+X-KDE-PluginInfo-Email=mart@kde.org
+X-KDE-PluginInfo-Name=org.kde.appletstrip
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://plasma.kde.org/
+X-KDE-PluginInfo-Category=Windows and Tasks
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL v2+
+X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/containments/appletstrip/plasma-applet-appletstrip.desktop \
b/containments/appletstrip/plasma-applet-appletstrip.desktop new file mode 100644
index 0000000..442cc30
--- /dev/null
+++ b/containments/appletstrip/plasma-applet-appletstrip.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Applets strip
+Icon=user-desktop
+Type=Service
+X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
+
+X-KDE-ParentAppp=plasma-mobile
+X-Plasma-API=declarativeappletscript
+X-Plasma-MainScript=ui/main.qml
+X-KDE-PluginInfo-Author=Marco Martin
+X-KDE-PluginInfo-Email=mart@kde.org
+X-KDE-PluginInfo-Name=org.kde.appletstrip
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://plasma.kde.org/
+X-KDE-PluginInfo-Category=Windows and Tasks
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL v2+
+X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/research/applets/appletstrip/CMakeLists.txt \
b/research/applets/appletstrip/CMakeLists.txt deleted file mode 100644
index e4d54f5..0000000
--- a/research/applets/appletstrip/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-project(news)
-
-install(DIRECTORY package/ DESTINATION \
                ${DATA_INSTALL_DIR}/plasma/plasmoids/org.kde.quickdialer-qml PATTERN \
                .svn EXCLUDE)
-
-install(FILES plasma-applet-quickdialer-qml.desktop
-        DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/research/applets/appletstrip/package/contents/ui/PlasmoidContainer.qml \
b/research/applets/appletstrip/package/contents/ui/PlasmoidContainer.qml deleted file \
mode 100644 index 71bd0c2..0000000
--- a/research/applets/appletstrip/package/contents/ui/PlasmoidContainer.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *   Copyright 2011 Marco Martin <mart@kde.org>
- *
- *   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 QtQuick 1.0
-import org.kde.plasma.core 0.1 as PlasmaCore
-
-Item {
-    id: plasmoidContainer
-    anchors.top: appletsRow.top
-    anchors.bottom: appletsRow.bottom
-
-    property QGraphicsWidget applet
-
-    onAppletChanged: {
-        applet.appletDestroyed.connect(appletDestroyed)
-        applet.parent = plasmoidContainer
-        applet.x = 0
-        applet.y = 0
-        height = main.width/2
-    }
-
-    function appletDestroyed()
-    {
-        plasmoidContainer.destroy()
-    }
-
-    PlasmaCore.Svg {
-        id: iconsSvg
-        imagePath: "widgets/configuration-icons"
-    }
-
-    ActionButton {
-        id: removeButton
-        svg: iconsSvg
-        elementId: "close"
-        z: applet.z + 1
-
-        action: applet.action("remove")
-    }
-
-    onHeightChanged: {
-        if (applet) {
-            applet.height = height
-            var ratio = applet.preferredSize.width/applet.preferredSize.height
-            applet.width = main.width/2
-            width = applet.width
-        }
-    }
-}
\ No newline at end of file
diff --git a/research/applets/appletstrip/package/contents/ui/main.qml \
b/research/applets/appletstrip/package/contents/ui/main.qml deleted file mode 100644
index 2ce8acb..0000000
--- a/research/applets/appletstrip/package/contents/ui/main.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *   Copyright 2011 Marco Martin <mart@kde.org>
- *
- *   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
-import org.kde.qtextracomponents 0.1 as QtExtra
-
-Item {
-    id: main
-    signal shrinkRequested
-
-    Component.onCompleted: {
-
-        plasmoid.containmentType = "CustomContainment"
-
-        plasmoid.appletAdded.connect(addApplet)
-
-        for (var i = 0; i < plasmoid.applets.length; ++i) {
-            var applet = plasmoid.applets[i]
-            print(applet)
-            addApplet(applet, 0);
-        }
-    }
-
-
-    function addApplet(applet, pos)
-    {
-        var component = Qt.createComponent("PlasmoidContainer.qml");
-        var plasmoidContainer = component.createObject(appletsRow, {"x": pos.x, "y": \
                pos.y});
-        plasmoidContainer.applet = applet
-
-        /* this will be used for inserting in custom positions
-        var oldChildren = appletsRow.children
-        for (var child in oldChildren) {
-            child.parent = 0
-        }
-        for (var child in oldChildren) {
-            child.parent = appletsRow
-        }*/
-    }
-
-
-    PlasmaCore.Theme {
-        id: theme
-    }
-
-    PlasmaCore.Svg {
-        id: iconsSvg
-        imagePath: "widgets/action-overlays"
-    }
-
-    Item {
-        anchors.top: parent.top
-        anchors.bottom: parent.bottom
-        anchors.left: parent.left
-        anchors.right: parent.right
-        Flickable {
-            id: appletsFlickable
-            anchors.top: parent.top
-            anchors.bottom: parent.bottom
-            anchors.horizontalCenter: parent.horizontalCenter
-            clip: true
-            interactive:true
-            contentWidth: mainRow.width
-            contentHeight: mainRow.height
-
-            width: Math.min(parent.width, appletsRow.width)
-
-            Row {
-                id: mainRow
-                Row {
-                    id: appletsRow
-                    height: appletsFlickable.height
-                    add: Transition {
-                        NumberAnimation {
-                            properties: "x"
-                            easing.type: Easing.OutBounce
-                            duration: 250
-                        }
-                    }
-                    move: Transition {
-                        NumberAnimation {
-                            properties: "x"
-                            easing.type: Easing.OutBounce
-                            duration: 250
-                        }
-                    }
-                }
-                Item {
-                    anchors.top: parent.top
-                    anchors.bottom: parent.bottom
-                    width: main.width/2
-                    ActionButton {
-                        anchors.centerIn: parent
-                        elementId: "add-normal"
-                        action: plasmoid.action("add widgets")
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/research/applets/appletstrip/package/metadata.desktop \
b/research/applets/appletstrip/package/metadata.desktop deleted file mode 100644
index 442cc30..0000000
--- a/research/applets/appletstrip/package/metadata.desktop
+++ /dev/null
@@ -1,19 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Applets strip
-Icon=user-desktop
-Type=Service
-X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
-
-X-KDE-ParentAppp=plasma-mobile
-X-Plasma-API=declarativeappletscript
-X-Plasma-MainScript=ui/main.qml
-X-KDE-PluginInfo-Author=Marco Martin
-X-KDE-PluginInfo-Email=mart@kde.org
-X-KDE-PluginInfo-Name=org.kde.appletstrip
-X-KDE-PluginInfo-Version=1.0
-X-KDE-PluginInfo-Website=http://plasma.kde.org/
-X-KDE-PluginInfo-Category=Windows and Tasks
-X-KDE-PluginInfo-Depends=
-X-KDE-PluginInfo-License=GPL v2+
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/research/applets/appletstrip/plasma-applet-appletstrip.desktop \
b/research/applets/appletstrip/plasma-applet-appletstrip.desktop deleted file mode \
100644 index 442cc30..0000000
--- a/research/applets/appletstrip/plasma-applet-appletstrip.desktop
+++ /dev/null
@@ -1,19 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Applets strip
-Icon=user-desktop
-Type=Service
-X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
-
-X-KDE-ParentAppp=plasma-mobile
-X-Plasma-API=declarativeappletscript
-X-Plasma-MainScript=ui/main.qml
-X-KDE-PluginInfo-Author=Marco Martin
-X-KDE-PluginInfo-Email=mart@kde.org
-X-KDE-PluginInfo-Name=org.kde.appletstrip
-X-KDE-PluginInfo-Version=1.0
-X-KDE-PluginInfo-Website=http://plasma.kde.org/
-X-KDE-PluginInfo-Category=Windows and Tasks
-X-KDE-PluginInfo-Depends=
-X-KDE-PluginInfo-License=GPL v2+
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/shell/data/plasma-tablet-homescreen/plasma-default-layoutrc \
b/shell/data/plasma-tablet-homescreen/plasma-default-layoutrc index ecb542a..1ac7ee0 \
                100644
--- a/shell/data/plasma-tablet-homescreen/plasma-default-layoutrc
+++ b/shell/data/plasma-tablet-homescreen/plasma-default-layoutrc
@@ -5,7 +5,7 @@ formfactor=0
 geometry=0,0,800,480
 immutability=1
 location=1
-plugin=newspaper
+plugin=org.kde.appletstrip
 orientation=1
 screen=0
 zvalue=0
@@ -48,7 +48,7 @@ formfactor=0
 geometry=0,0,800,480
 immutability=1
 location=1
-plugin=newspaper
+plugin=org.kde.appletstrip
 orientation=1
 screen=0
 zvalue=0
@@ -90,7 +90,7 @@ formfactor=0
 geometry=0,0,800,480
 immutability=1
 location=1
-plugin=newspaper
+plugin=org.kde.appletstrip
 orientation=1
 screen=0
 zvalue=0


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic