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 Ubuntu.Components.Popups 0.1
36 // Fake greeter object
48 SortFilterProxyModel {
53 dynamicSortFilter: true
55 filterRole: Scopes.RoleVisible
56 filterRegExp: RegExp("^true$")
60 anchors.fill: dashContent
65 anchors.fill: dashContent
66 source: root.width > root.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
67 fillMode: Image.PreserveAspectCrop
68 horizontalAlignment: Image.AlignRight
69 verticalAlignment: Image.AlignTop
76 searchHistory: SearchHistoryModel { }
77 property Scope scope: scopes.get(currentIndex)
102 anchors { fill: parent; margins: units.gu(1) }
111 anchors { left: parent.left; right: parent.right }
113 onTextChanged: dashContent.scope.searchQuery = text
116 target: dashContent.scope
117 onSearchQueryChanged: searchField.text = dashContent.scope.searchQuery
124 verticalAlignment: Text.AlignBottom
129 anchors { left: parent.left; right: parent.right }
130 model: dashContent.scope ? dashContent.scope.categories : null
132 property Item selectedItem
134 delegate: OptionSelectorDelegate {
137 property string categoryId: model.categoryId
138 property string template: JSON.stringify(JSON.parse(model.rawRendererTemplate), null, " ");
140 onSelectedChanged: if (selected) categorySelector.selectedItem = categoryDelegate
149 text: categorySelector.selectedItem && categorySelector.selectedItem.template
154 text: "Override category"
156 PopupUtils.open(categoryEditor)
167 title: "Editing category definition"
170 id: categoryEditorArea
172 wrapMode: Text.WordWrap
173 text: categoryJson.text
176 onCancelClicked: PopupUtils.close(sheet)
178 PopupUtils.close(sheet);
179 dashContent.scope.categories.overrideCategoryJson(categorySelector.selectedItem.categoryId, categoryEditorArea.text);
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