on xenial help sign in
Give you a hint that you did something wrong
fa27b1bAlbert Astals Cid
tools/menutool/menutool.qml+15
@@ -35,12 +35,20 @@ Item {
35 actions: { "unity": "/com/ubuntu/Menu/0" }
35 actions: { "unity": "/com/ubuntu/Menu/0" }
36 }
36 }
37
37
38+ readonly property bool hasMenus: repeater.count > 0
39+ Repeater {
40+ id: repeater
41+ model: menuModel
42+ delegate: Item {}
43+ }
44+
38 Panel {
45 Panel {
39 id: panel
46 id: panel
40
47
41 height: parent.height
48 height: parent.height
42 width: parent.width / 2
49 width: parent.width / 2
43 minimizedPanelHeight: units.gu(6)
50 minimizedPanelHeight: units.gu(6)
51+ visible: hasMenus
44
52
45 mode: "windowed"
53 mode: "windowed"
46
54
@@ -86,6 +94,7 @@ Item {
86 height: parent.height
94 height: parent.height
87 width: parent.width / 2
95 width: parent.width / 2
88 x: width
96 x: width
97+ visible: hasMenus
89
98
90 MenuBar {
99 MenuBar {
91 id: menuBar
100 id: menuBar
@@ -100,4 +109,10 @@ Item {
100 theme.name = "Ubuntu.Components.Themes.SuruDark";
109 theme.name = "Ubuntu.Components.Themes.SuruDark";
101 PanelState.title = "Drag here to open touch menu";
110 PanelState.title = "Drag here to open touch menu";
102 }
111 }
112+
113+ Text {
114+ anchors.centerIn: parent
115+ text: "The dbus address you gave has no menus. Make sure you read the README file."
116+ visible: !hasMenus
117+ }
103}
118}