2 * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
21import Ubuntu.Components 0.1
22import Ubuntu.Components.ListItems 0.1 as ListItem
23import Unity.Indicators 0.1 as Indicators
25Indicators.BaseMenuItem {
27 implicitHeight: units.gu(5.5)
29 property bool checked: false
30 property bool secure: false
31 property bool adHoc: false
32 property int signalStrength: 0
33 property alias label: _label.text
38 // Can't rely on binding. Checked is assigned on click.
39 checkBoxActive.checked = checked;
43 checkBoxActive.clicked();
53 leftMargin: menuItem.__contentsMargins
54 verticalCenter: parent.verticalCenter
66 height: Math.min(units.gu(5), parent.height - units.gu(1))
68 left: checkBoxActive.right
69 leftMargin: units.gu(1)
70 verticalCenter: parent.verticalCenter
74 var imageName = "nm-signal-100"
77 imageName = "nm-adhoc";
78 } else if (signalStrength == 0) {
79 imageName = "nm-signal-00";
80 } else if (signalStrength <= 25) {
81 imageName = "nm-signal-25";
82 } else if (signalStrength <= 50) {
83 imageName = "nm-signal-50";
84 } else if (signalStrength <= 75) {
85 imageName = "nm-signal-75";
87 return "image://theme/" + imageName;
94 left: iconSignal.right
95 leftMargin: units.gu(1)
96 verticalCenter: parent.verticalCenter
97 right: iconSecure.visible ? iconSecure.left : parent.right
98 rightMargin: menuItem.__contentsMargins
100 elide: Text.ElideRight
101 opacity: label.enabled ? 1.0 : 0.5
107 source: "qrc:/indicators/artwork/network/secure.svg"
110 height: Math.min(units.gu(4), parent.height - units.gu(1))
113 rightMargin: units.gu(1)
114 verticalCenter: parent.verticalCenter
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list