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

List:       kde-commits
Subject:    playground/base/plasma/declarative-applets/replacements/microblog/contents/ui
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-04-09 17:40:07
Message-ID: 20110409174007.ADC28AC8D1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1227501 by mart:

only one datasource


 M  +1 -1      MessageWidget.qml  
 M  +11 -11    main.qml  


--- trunk/playground/base/plasma/declarative-applets/replacements/microblog/contents/ui/MessageWidget.qml \
#1227500:1227501 @@ -33,7 +33,7 @@
         anchors.top: padding.top
         width: 32
         height: 32
-        image: imagesDataSource.data["UserImages:"+serviceUrl][model['User']]
+        image: dataSource.data["UserImages:"+serviceUrl][model['User']]
     }
     Text {
         id: infoLabel
--- trunk/playground/base/plasma/declarative-applets/replacements/microblog/contents/ui/main.qml \
#1227500:1227501 @@ -46,9 +46,12 @@
         userName = plasmoid.readConfig("userName")
         password = plasmoid.readConfig("password")
 
-        messagesDataSource.connectedSources = \
                ["TimelineWithFriends:"+userName+"@"+serviceUrl]
-        imagesDataSource.connectedSources = ["UserImages:"+serviceUrl]
-        var service = \
messagesDataSource.serviceForSource(messagesDataSource.connectedSources[0]) +        \
if (!serviceUrl || !userName || !password) { +            return
+        }
+
+        dataSource.connectedSources = \
["TimelineWithFriends:"+userName+"@"+serviceUrl, "UserImages:"+serviceUrl] +        \
var service = dataSource.serviceForSource(dataSource.connectedSources[0])  var \
operation = service.operationDescription("auth");  operation.password = \
plasmoid.readConfig("password")  service.startOperationCall(operation);
@@ -57,7 +60,7 @@
     }
 
     PlasmaCore.DataSource {
-        id: messagesDataSource
+        id: dataSource
         engine: "microblog"
         interval: 50000
 
@@ -66,12 +69,9 @@
         }
     }
 
-    //Split images and messages: even if a datasource can take multiple sources, \
                their data must have the same keys
-    PlasmaCore.DataSource {
-        id: imagesDataSource
-        engine: "microblog"
-        interval: 5000
-    }
+    /*MainWidget {
+        anchors.fill: parent
+    }*/
 
     ListView {
         id: entryList
@@ -79,7 +79,7 @@
         clip: true
         spacing: 5
         model: PlasmaCore.DataModel {
-            dataSource: messagesDataSource
+            dataSource: dataSource
             keyRoleFilter: "[\\d]*"
         }
         header: PostingWidget {}


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

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