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 readonly property int currentMenuIndex : menus.currentIndex
28 property color backgroundColor: "#221e1c" // FIXME not in palette yet
29 property int contentReleaseInterval: 20000
33 color: backgroundColor
35 function setCurrentMenuIndex(index) {
36 if (currentMenuIndex !== index) {
37 menus.currentIndex = index;
41 function activateContent() {
42 contentReleaseTimer.stop();
43 __contentActive = true;
46 function releaseContent() {
48 contentReleaseTimer.restart();
55 anchors.bottom: parent.bottom
56 anchors.top: header.bottom
59 spacing: units.gu(0.5)
61 orientation: ListView.Horizontal
62 model: indicatorsModel
64 //FIXME: This will make sure that all plugins still alive
65 //check bug https://bugs.launchpad.net/manhattan/+bug/1088945 for more details
66 cacheBuffer: 2147483647
70 property bool contentActive: content.__contentActive && menuActivator.content[index].active
72 onContentActiveChanged: {
73 if (contentActive && item) {
75 } else if (!contentActive && item) {
84 // Reset the indicator states
85 if (!visible && item && item["reset"]) {
92 for(var pName in indicatorProperties) {
93 if (item.hasOwnProperty(pName)) {
94 item[pName] = indicatorProperties[pName];
97 if (contentActive && menus.visible) {
102 // Need to use a binding because the handle height changes.
103 // FIXME: Dont know why we're using handle height (introduces dep).. Check with design about bottom margin
106 property: "anchors.bottomMargin"
116 property alias title: pageHeader.text
118 color: backgroundColor
119 opacity: pageHeader.opacity
124 height: childrenRect.height
133 if (indicatorsModel && menus.currentIndex >= 0 && menus.currentIndex < indicatorsModel.count)
134 return indicatorsModel.data(menus.currentIndex, Indicators.IndicatorsModelRole.Title);
141 id: contentReleaseTimer
143 interval: contentReleaseInterval
145 __contentActive = false;
146 menuActivator.clear();
150 Indicators.MenuContentActivator {
152 running: content.__contentActive
153 baseIndex: content.currentMenuIndex
154 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