@@ -48,6 +48,7 @@ Item {
48 // to be set from outside
48 // to be set from outside
49 property int orientationAngle: 0
49 property int orientationAngle: 0
50 property int orientation
50 property int orientation
51+ property QtObject deviceSpecificOrientationOverrides
51 property int primaryOrientation
52 property int primaryOrientation
52 property int nativeOrientation
53 property int nativeOrientation
53 property real nativeWidth
54 property real nativeWidth
@@ -159,7 +160,40 @@ Item {
159 value: ApplicationManager
160 value: ApplicationManager
163+function serialize(object, maxDepth) {
164+ function _processObject(object, maxDepth, level) {
165+ var output = Array()
167+ if (maxDepth == undefined) {
170+ if (level == undefined) {
173+ var padding = Array(level + 1).join(pad)
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)
183+ fields.push(padding + pad + keyText + "\"" + object[key] + "\"")
186+ output.push(fields.join(",\n"))
187+ output.push(padding + (Array.isArray(object) ? "]" : "}"))
189+ return output.join("\n")
192+ return _processObject(object, maxDepth)
162 Component.onCompleted: {
195 Component.onCompleted: {
196+ console.log("JOSH: Shell: " + deviceSpecificOrientationOverrides.hello);
163 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
197 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
164 if (ApplicationManager.count > 0) {
198 if (ApplicationManager.count > 0) {
165 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
199 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
@@ -267,6 +301,8 @@ Item {
304+ onLoaded: console.log("JOSH in shell loader: " + deviceSpecificOrientationOverrides.hello)
270 property bool interactive: tutorial.spreadEnabled
306 property bool interactive: tutorial.spreadEnabled
271 && (!greeter || !greeter.shown)
307 && (!greeter || !greeter.shown)
272 && panel.indicators.fullyClosed
308 && panel.indicators.fullyClosed
@@ -336,6 +372,11 @@ Item {
336 property: "nativeWidth"
372 property: "nativeWidth"
337 value: shell.nativeWidth
373 value: shell.nativeWidth
376+ target: applicationsDisplayLoader.item
377+ property: "deviceSpecificOrientationOverrides"
378+ value: shell.deviceSpecificOrientationOverrides
339 Binding {
380 Binding {
340 target: applicationsDisplayLoader.item
381 target: applicationsDisplayLoader.item
341 property: "nativeHeight"
382 property: "nativeHeight"