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
21import "Previews" as Previews
26 property var scope: null
27 property var scopeStyle: null
29 property alias open: previewListView.open
30 property alias model: previewListView.model
31 property alias currentIndex: previewListView.currentIndex
32 property alias currentItem: previewListView.currentItem
33 property alias count: previewListView.count
35 readonly property bool processing: currentItem && (!currentItem.previewModel.loaded
36 || currentItem.previewModel.processingAction)
40 objectName: "pageHeader"
42 title: scope ? scope.name : ""
44 searchEntryEnabled: false
45 scopeStyle: root.scopeStyle
47 onBackClicked: root.open = false
52 objectName: "listView"
59 orientation: ListView.Horizontal
60 highlightRangeMode: ListView.StrictlyEnforceRange
61 snapMode: ListView.SnapOneItem
62 boundsBehavior: Flickable.DragAndOvershootBounds
63 highlightMoveDuration: 250
64 flickDeceleration: units.gu(625)
65 maximumFlickVelocity: width * 5
68 property bool open: false
72 // Cancel any pending preview requests or actions
73 if (previewListView.currentItem && previewListView.currentItem.previewData !== undefined) {
74 previewListView.currentItem.previewData.cancelAction();
76 scope.cancelActivation();
81 delegate: Previews.Preview {
83 objectName: "preview" + index
84 height: previewListView.height
85 width: previewListView.width
87 isCurrent: ListView.isCurrentItem
90 var previewStack = root.scope.preview(result);
91 return previewStack.getPreviewModel(0);
93 scopeStyle: root.scopeStyle
98 id: processingMouseArea
99 objectName: "processingMouseArea"
104 bottom: parent.bottom
107 enabled: root.processing
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