on xenial help sign in
Remove unused AppInfo and VideoInfo files

. Approved by PS Jenkins bot, Michał Sawicz.

commitcf5942bd8dd20bbe385fee04443215ef6dedef26 authorAlbert Astals <albert.astals@canonical.com> dateTue 19 Nov 2013, 00:11 (13 years ago) parentf557b4efbf656a
2 files changed−173
Dash/Apps/AppInfo.qml−89 Dash/Video/VideoInfo.qml−84
Dash/Apps/AppInfo.qmldeleted−89
@@ -1,89 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−Row {
22− id: root
23− property alias icon: image.source
24− property alias appName: appNameLabel.text
25− property alias rating: ratingStars.rating
26− property int rated: 0
27− property int reviews: 0
28−
29− spacing: units.gu(2)
30−
31− UbuntuShape {
32− id: imageShape
33− width: units.gu(6)
34− height: units.gu(6)
35− image: Image {
36− id: image
37− sourceSize { width: imageShape.width; height: imageShape.height }
38− asynchronous: true
39− fillMode: Image.PreserveAspectFit
40− }
41− }
42−
43− Column {
44− spacing: units.gu(1)
45−
46− Label {
47− id: appNameLabel
48− fontSize: "large"
49− color: "white"
50− style: Text.Raised
51− styleColor: "black"
52− opacity: .9
53− }
54−
55− Row {
56− visible: root.rating >= 0
57− spacing: units.gu(1)
58−
59− RatingStars {
60− id: ratingStars
61− maximumRating: 10
62− }
63−
64− Label {
65− id: ratedLabel
66− objectName: "ratedLabel"
67− fontSize: "medium"
68− color: "white"
69− style: Text.Raised
70− styleColor: "black"
71− opacity: .6
72− //TRANSLATORS: Number of persons who rated this app
73− text: i18n.tr("(%1)").arg(root.rated)
74− }
75−
76− Label {
77− id: reviewsLabel
78− objectName: "reviewsLabel"
79− fontSize: "medium"
80− color: "white"
81− style: Text.Raised
82− styleColor: "black"
83− opacity: .6
84− //TRANSLATORS: Number of persons who wrote reviews for this app
85− text: i18n.tr("%1 review", "%1 reviews", root.reviews).arg(root.reviews)
86− }
87− }
88− }
89−}
Dash/Video/VideoInfo.qmldeleted−84
@@ -1,84 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import QtQuick.XmlListModel 2.0
19−
20−Item {
21− id: info
22− property string source
23−
24− property bool ready: nfo.status == XmlListModel.Ready || nfoTV.status == XmlListModel.Ready
25− property bool isMovie: true
26− property variant video: null
27− property variant tvShow: null
28−
29− function getActors() {
30− var c = []
31− if (video.actor1) c.push(video.actor1)
32− if (video.actor2) c.push(video.actor2)
33− if (video.actor3) c.push(video.actor3)
34− return c
35− }
36−
37− onSourceChanged: isMovie = true
38−
39− XmlListModel {
40− id: nfo
41− source: info.source
42− query: (isMovie) ? "/movie" : "/episodedetails"
43−
44− XmlRole { name: "title"; query: "title/string()" }
45− XmlRole { name: "year"; query: "year/number()" }
46− XmlRole { name: "runtime"; query: "runtime/number()" }
47− XmlRole { name: "rating"; query: "rating/number()" }
48− XmlRole { name: "plot"; query: "plot/string()" }
49− XmlRole { name: "director"; query: "director[1]/string()" }
50− XmlRole { name: "actor1"; query: "actor[1]/name/string()" }
51− XmlRole { name: "actor2"; query: "actor[2]/name/string()" }
52− XmlRole { name: "actor3"; query: "actor[3]/name/string()" }
53− XmlRole { name: "author"; query: "author[1]/string()" }
54− XmlRole { name: "season"; query: "season/number()" }
55− XmlRole { name: "episode"; query: "episode/number()" }
56−
57− XmlRole { name: "rentPrice"; query: "rent_price/string()" }
58− XmlRole { name: "buyPrice"; query: "buy_price/string()" }
59− XmlRole { name: "expires"; query: "expires/string()" }
60−
61− onStatusChanged: if (status == XmlListModel.Ready) {
62− if (count > 0) info.video = nfo.get(0)
63− else info.isMovie = false
64− } else if (status == XmlListModel.Error) info.isMovie = false
65− }
66−
67− XmlListModel {
68− id: nfoTV
69− source: (nfo.isMovie) ? "" : info.source.substring(0, info.source.lastIndexOf("/") + 1) + "tvshow.nfo"
70− query: "/tvshow"
71−
72− XmlRole { name: "title"; query: "title/string()" }
73−
74− onStatusChanged: if (status == XmlListModel.Ready) {
75− if (count > 0) info.tvShow = nfoTV.get(0)
76− } else if (status == XmlListModel.Error) {
77− // Search for tvshow.nfo in the directory above this one to cater
78− // for directory layout Show/Season
79− var path = info.source.split("/")
80− path.splice(-2, 2, "tvshow.nfo")
81− source = path.join("/")
82− }
83− }
84−}