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 property var scope: scopes.getScope(currentIndex)
101 anchors { fill: parent; margins: units.gu(1) }
110 anchors { left: parent.left; right: parent.right }
112 onTextChanged: dashContent.scope.searchQuery = text
115 target: dashContent.scope
116 onSearchQueryChanged: searchField.text = dashContent.scope.searchQuery
123 verticalAlignment: Text.AlignBottom
128 anchors { left: parent.left; right: parent.right }
129 model: dashContent.scope ? dashContent.scope.categories : null
131 property Item selectedItem
133 delegate: OptionSelectorDelegate {
136 property string categoryId: model.categoryId
137 property string template: JSON.stringify(JSON.parse(model.rawRendererTemplate), null, " ");
139 onSelectedChanged: if (selected) categorySelector.selectedItem = categoryDelegate
148 text: categorySelector.selectedItem && categorySelector.selectedItem.template
153 text: "Override category"
155 PopupUtils.open(categoryEditor)
166 title: "Editing category definition"
169 id: categoryEditorArea
171 wrapMode: Text.WordWrap
172 text: categoryJson.text
175 onCancelClicked: PopupUtils.close(sheet)
177 PopupUtils.close(sheet);
178 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