on xenial help sign in
Give you a hint that you did something wrong
commitfa27b1b1ae4f0206113d3d2f80664b915cbfb2cb authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 3 Mar 2017, 13:16 (10 years ago) parentd554efd
1 file changed+15
tools/menutool/menutool.qml+15
tools/menutool/menutool.qml+15
@@ -35,12 +35,20 @@ Item {
3535 actions: { "unity": "/com/ubuntu/Menu/0" }
3636 }
3737
38+ readonly property bool hasMenus: repeater.count > 0
39+ Repeater {
40+ id: repeater
41+ model: menuModel
42+ delegate: Item {}
43+ }
44+
3845 Panel {
3946 id: panel
4047
4148 height: parent.height
4249 width: parent.width / 2
4350 minimizedPanelHeight: units.gu(6)
51+ visible: hasMenus
4452
4553 mode: "windowed"
4654
@@ -86,6 +94,7 @@ Item {
8694 height: parent.height
8795 width: parent.width / 2
8896 x: width
97+ visible: hasMenus
8998
9099 MenuBar {
91100 id: menuBar
@@ -100,4 +109,10 @@ Item {
100109 theme.name = "Ubuntu.Components.Themes.SuruDark";
101110 PanelState.title = "Drag here to open touch menu";
102111 }
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+ }
103118}