~ubuntu-branches/ubuntu/vivid/muon/vivid-proposed

« back to all changes in this revision

Viewing changes to discover/qml/Helpers.js

Tags: upstream-1.3.65
ImportĀ upstreamĀ versionĀ 1.3.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function getFeatured(model, data) {
 
2
    if(!app.appBackend || app.appBackend.isReloading() || data==null)
 
3
        return
 
4
    
 
5
    for(var packageName in data) {
 
6
        var currentData = data[packageName]
 
7
        var application = app.appBackend.applicationByPackageName(currentData.package)
 
8
        if(application==null) {
 
9
//             console.log("application "+ currentData.package+" not found")
 
10
            continue
 
11
        }
 
12
        var image = currentData.image
 
13
        if(image == null)
 
14
            image = application.screenshotUrl
 
15
        model.append({
 
16
            "text": application.name,
 
17
            "color": "red",
 
18
            "image": image,
 
19
            "icon": application.icon,
 
20
            "comment": application.comment,
 
21
            "packageName": currentData.package })
 
22
    }
 
23
}
 
 
b'\\ No newline at end of file'