@@ -48,6 +48,7 @@ Item {
4848 // to be set from outside
4949 property int orientationAngle: 0
5050 property int orientation
51+ property QtObject deviceSpecificOrientationOverrides
5152 property int primaryOrientation
5253 property int nativeOrientation
5354 property real nativeWidth
@@ -159,7 +160,40 @@ Item {
159160 value: ApplicationManager
160161 }
161162
163+function serialize(object, maxDepth) {
164+ function _processObject(object, maxDepth, level) {
165+ var output = Array()
166+ var pad = " "
167+ if (maxDepth == undefined) {
168+ maxDepth = -1
169+ }
170+ if (level == undefined) {
171+ level = 0
172+ }
173+ var padding = Array(level + 1).join(pad)
174+
175+ output.push((Array.isArray(object) ? "[" : "{"))
176+ var fields = Array()
177+ for (var key in object) {
178+ var keyText = Array.isArray(object) ? "" : ("\"" + key + "\": ")
179+ if (typeof (object[key]) == "object" && key != "parent" && maxDepth != 0) {
180+ var res = _processObject(object[key], maxDepth > 0 ? maxDepth - 1 : -1, level + 1)
181+ fields.push(padding + pad + keyText + res)
182+ } else {
183+ fields.push(padding + pad + keyText + "\"" + object[key] + "\"")
184+ }
185+ }
186+ output.push(fields.join(",\n"))
187+ output.push(padding + (Array.isArray(object) ? "]" : "}"))
188+
189+ return output.join("\n")
190+ }
191+
192+ return _processObject(object, maxDepth)
193+}
194+
162195 Component.onCompleted: {
196+ console.log("JOSH: Shell: " + deviceSpecificOrientationOverrides.hello);
163197 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
164198 if (ApplicationManager.count > 0) {
165199 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
@@ -267,6 +301,8 @@ Item {
267301 }
268302 }
269303
304+ onLoaded: console.log("JOSH in shell loader: " + deviceSpecificOrientationOverrides.hello)
305+
270306 property bool interactive: tutorial.spreadEnabled
271307 && (!greeter || !greeter.shown)
272308 && panel.indicators.fullyClosed
@@ -336,6 +372,11 @@ Item {
336372 property: "nativeWidth"
337373 value: shell.nativeWidth
338374 }
375+ Binding {
376+ target: applicationsDisplayLoader.item
377+ property: "deviceSpecificOrientationOverrides"
378+ value: shell.deviceSpecificOrientationOverrides
379+ }
339380 Binding {
340381 target: applicationsDisplayLoader.item
341382 property: "nativeHeight"