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
68 searchHistory: SearchHistoryModel { }
69 property Scope scope: scopes.get(currentIndex)
94 anchors { fill: parent; margins: units.gu(1) }
103 anchors { left: parent.left; right: parent.right }
105 onTextChanged: dashContent.scope.searchQuery = text
108 target: dashContent.scope
109 onSearchQueryChanged: searchField.text = dashContent.scope.searchQuery
116 verticalAlignment: Text.AlignBottom
121 anchors { left: parent.left; right: parent.right }
122 model: dashContent.scope ? dashContent.scope.categories : null
124 property Item selectedItem
126 delegate: OptionSelectorDelegate {
129 property string categoryId: model.categoryId
130 property string template: JSON.stringify(JSON.parse(model.rawRendererTemplate), null, " ");
132 onSelectedChanged: if (selected) categorySelector.selectedItem = categoryDelegate
141 text: categorySelector.selectedItem && categorySelector.selectedItem.template
146 text: "Override category"
148 PopupUtils.open(categoryEditor)
159 title: "Editing category definition"
162 id: categoryEditorArea
164 wrapMode: Text.WordWrap
165 text: categoryJson.text
168 onCancelClicked: PopupUtils.close(sheet)
170 PopupUtils.close(sheet);
171 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