on xenial help sign in
Fix up indicators-client after refactoring
commit47a2527decd0d2b8d6c6fb554dfbdd31b65e9125 authorPete Woods <pete.woods@canonical.com> dateTue 14 Mar 2017, 16:41 (10 years ago) parent593d500
1 file changed+24−5
qml/Panel/Indicators/client/IndicatorRepresentation.qml+24−5
qml/Panel/Indicators/client/IndicatorRepresentation.qml+24−5
@@ -20,6 +20,7 @@
2020
2121import QtQuick 2.4
2222import Ubuntu.Components 1.3
23+import ".."
2324import "../.."
2425
2526Page {
@@ -77,11 +78,29 @@ Page {
7778
7879 Component {
7980 id: page
80− IndicatorPage {
81− identifier: model.identifier
82− busName: indicatorProperties.busName
83− actionsObjectPath: indicatorProperties.actionsObjectPath
84− menuObjectPath: indicatorProperties.menuObjectPath
81+ PanelMenuPage {
82+ objectName: model.identifier + "-page"
83+ submenuIndex: 0
84+
85+ menuModel: delegate.menuModel
86+
87+ factory: IndicatorMenuItemFactory {
88+ indicator: {
89+ var context = model.identifier;
90+ if (context && context.indexOf("fake-") === 0) {
91+ context = context.substring("fake-".length)
92+ }
93+ return context;
94+ }
95+ rootModel: delegate.menuModel
96+ }
97+
98+ IndicatorDelegate {
99+ id: delegate
100+ busName: indicatorProperties.busName
101+ actionsObjectPath: indicatorProperties.actionsObjectPath
102+ menuObjectPath: indicatorProperties.menuObjectPath
103+ }
85104 }
86105 }
87106 Component {