2import Ubuntu.Components 1.3
3import Unity.Application 0.1
4import Unity.ApplicationMenu 0.1
5import Unity.Indicators 0.1 as Indicators
9 property alias surfaceManager: sMgrHandler.target
14 var fakeMenuPath = "/" + surface.persistentId.replace(/\W+/g, "");
16 ApplicationMenuRegistry.RegisterSurfaceMenu(surface.persistentId, fakeMenuPath, fakeMenuPath, ":1");
17 Indicators.UnityMenuModelCache.setCachedModelData(fakeMenuPath, generateTestData(4, 3, 2, 3, "menu"));
20 ApplicationMenuRegistry.UnregisterSurfaceMenu(persistentSurfaceId, "/app");
24 function generateTestData(length, depth, submenuInterval, separatorInterval, prefix, root) {
26 if (root === undefined) root = true;
28 if (prefix === undefined) prefix = "menu"
30 for (var i = 0; i < length; i++) {
32 var menuCode = String.fromCharCode(i+65);
34 var isSeparator = !root && separatorInterval > 0 && ((i+1) % separatorInterval == 0);
37 "label": prefix + "&" + menuCode,
39 "isSeparator": isSeparator,
42 "action": prefix + menuCode,
50 var isSubmenu = root === undefined || root === true || (submenuInterval > 0 && ((i+1) % submenuInterval == 0));
51 if (isSubmenu && !isSeparator && depth > 1) {
52 row["submenu"] = generateTestData(length, depth-1, submenuInterval, separatorInterval, prefix + menuCode + ".", false);
60 property var singleCheckable: [{
62 "label": "checkable1",
67 "action": "checkable1",
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