MCPcopy Create free account
hub / github.com/Schneegans/Fly-Pie / get

Method get

src/prefs/ExampleMenu.js:29–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 // ---------------------------------------------------------------------- static methods
28
29 static get() {
30
31 // Translators: This is the name of the tutorial menu.
32 const menu = {name: _('Example Menu'), icon: 'flypie-symbolic-#555', children: []};
33 const items = this.getItems();
34
35 for (let i = 0; i < items[0].names.length; i++) {
36
37 const child = {name: items[0].names[i], icon: items[0].icons[i], children: []};
38 menu.children.push(child);
39
40 for (let i = 0; i < items[1].names.length; i++) {
41 const grandchild = {
42 name: child.name + items[1].names[i],
43 icon: items[1].icons[i],
44 children: []
45 };
46 child.children.push(grandchild);
47
48 for (let i = 0; i < items[2].names.length; i++) {
49 const grandgrandchild = {
50 name: grandchild.name + items[2].names[i],
51 icon: items[2].icons[i],
52 };
53 grandchild.children.push(grandgrandchild);
54 }
55 }
56 }
57
58 return menu;
59 }
60
61 // Is there a way to assign the same gettext comment to multiple strings...?
62 static getItems() {

Callers 6

constructorMethod · 0.45
setAnimationMethod · 0.45
implMethod · 0.45
constructorMethod · 0.45
updateMethod · 0.45
getDevicesMenuFunction · 0.45

Calls 1

getItemsMethod · 0.95

Tested by

no test coverage detected