@@ -1,144 +0,0 @@
3− * Copyright (C) 2016 Canonical Ltd.
5− * This program is free software: you can redistribute it and/or modify it
6− * under the terms of the GNU General Public License version 3, as published
7− * by the Free Software Foundation.
9− * This program is distributed in the hope that it will be useful, but
10− * WITHOUT ANY WARRANTY; without even the implied warranties of
11− * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12− * PURPOSE. See the GNU General Public License for more details.
14− * You should have received a copy of the GNU General Public License along
15− * with this program. If not, see <http://www.gnu.org/licenses/>.
19−import QtQuick.Layouts 1.1
20−import Ubuntu.Components 1.3
21−import Ubuntu.Components.ListItems 1.3 as ListItems
22−import Ubuntu.SystemSettings.Update 1.0
27− property bool batchMode
28− property int status // A UpdateManager::Status
29− property bool requireRestart: false
30− property int updatesCount: 0
31− property bool online: false
33− property bool hidden: {
35− case UpdateManager.StatusNetworkError:
36− case UpdateManager.StatusServerError:
40− (updatesCount <= 1 && status === UpdateManager.StatusIdle) ||
45− signal requestInstall()
49− UbuntuNumberAnimation {}
60− Behavior on opacity {
61− UbuntuNumberAnimation {}
64− opacity: visible ? 1 : 0
67− case UpdateManager.StatusCheckingClickUpdates:
68− case UpdateManager.StatusCheckingImageUpdates:
69− case UpdateManager.StatusCheckingAllUpdates:
76− running: parent.visible
80− objectName: "checkLabel"
81− Layout.fillWidth: true
82− elide: Text.ElideRight
83− text: i18n.tr("Checking for updates…")
87− objectName: "updatesGlobalStopButton"
88− text: i18n.tr("Stop")
90− Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
100− spacing: units.gu(2)
102− Behavior on opacity {
103− UbuntuNumberAnimation {}
106− opacity: visible ? 1 : 0
108− var canInstall = g.status === UpdateManager.StatusIdle;
109− return canInstall && updatesCount > 1;
113− objectName: "updatesGlobalInfoLabel"
114− // // TRANSLATORS: %1 is number of software updates available.
115− text: i18n.tr("%1 update available",
116− "%1 updates available",
117− updatesCount).arg(updatesCount)
118− Layout.fillWidth: true
122− objectName: "updatesGlobalInstallButton"
124− if (g.requireRestart === true) {
125− return i18n.tr("Update all…");
127− return i18n.tr("Update all");
130− onClicked: g.requestInstall()
131− color: theme.palette.normal.positive
132− strokeColor: "transparent"
136− ListItems.ThinDivider {
141− bottom: parent.bottom