2 * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
25 property QtObject menu
26 property QtObject listView
27 property QtObject actionGroup
28 property variant widgetsMap
29 property bool isCurrentItem
30 readonly property bool empty: (__loader.source !== "" && __loader.status == Loader.Ready) ? __loader.item.state === "EMPTY" : true
32 signal selectItem(int targetIndex)
34 implicitHeight: (__loader.status === Loader.Ready) ? __loader.item.implicitHeight : 0
40 if (!__menuFactory.menu || !__menuFactory.menu.extra || !__menuFactory.widgetsMap) {
44 var widgetType = __menuFactory.menu.extra.canonical_type
47 sourceFile = __menuFactory.widgetsMap.find(widgetType)
50 if (widgetType === "com.canonical.indicator.root") {
52 // Try discovery the item based on the basic properties
53 } else if (menu.hasSection) {
54 sourceFile = "SectionMenu.qml"
56 sourceFile = "Menu.qml"
62 if (status == Loader.Ready) {
63 item.listViewIsCurrentItem = __menuFactory.isCurrentItem
67 // Binding all properties for the item, to make sure that any change in the
68 // property will be propagated to the __loader.item at any time
71 property: "listViewIsCurrentItem"
73 when: (__loader.status == Loader.Ready)
78 property: "actionGroup"
79 value: __menuFactory.actionGroup
80 when: (__loader.status == Loader.Ready)
86 value: __menuFactory.menu
87 when: (__loader.status == Loader.Ready)
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