2 * Copyright (C) 2013 Canonical, Ltd.
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.
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.
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/>.
18import Ubuntu.Components 0.1
19import Unity.Indicators 0.1 as Indicators
25 property QtObject indicatorsModel: null
26 property bool __contentActive: false
27 property alias currentIndex : menus.currentIndex
28 property color backgroundColor: "#221e1c" // FIXME not in palette yet
29 property int contentReleaseInterval: 20000
33 color: backgroundColor
35 signal menuSelected(int index)
37 function activateContent() {
38 contentReleaseTimer.stop();
39 __contentActive = true;
42 function releaseContent() {
44 contentReleaseTimer.restart();
51 anchors.bottom: parent.bottom
52 anchors.top: header.bottom
55 spacing: units.gu(0.5)
57 orientation: ListView.Horizontal
58 model: indicatorsModel
60 //FIXME: This will make sure that all plugins still alive
61 //check bug https://bugs.launchpad.net/manhattan/+bug/1088945 for more details
62 cacheBuffer: 2147483647
66 property bool contentActive: content.__contentActive && menuActivator.content[index].active
68 onContentActiveChanged: {
69 if (contentActive && item) {
71 } else if (!contentActive && item) {
80 // Reset the indicator states
81 if (!visible && item && item["reset"]) {
88 for(var pName in indicatorProperties) {
89 if (item.hasOwnProperty(pName)) {
90 item[pName] = indicatorProperties[pName];
93 if (contentActive && menus.visible) {
98 // Need to use a binding because the handle height changes.
99 // FIXME: Dont know why we're using handle height (introduces dep).. Check with design about bottom margin
102 property: "anchors.bottomMargin"
112 property alias title: pageHeader.text
114 color: backgroundColor
115 opacity: pageHeader.opacity
120 height: childrenRect.height
129 if (indicatorsModel && menus.currentIndex >= 0 && menus.currentIndex < indicatorsModel.count)
130 return indicatorsModel.data(menus.currentIndex, Indicators.IndicatorsModelRole.Title);
137 id: contentReleaseTimer
139 interval: contentReleaseInterval
141 __contentActive = false;
142 menuActivator.clear();
146 Indicators.MenuContentActivator {
148 running: content.__contentActive
149 baseIndex: content.currentIndex
150 count: indicatorsModel.count
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