@@ -54,7 +54,6 @@ Item {
54 property string appId1
54 property string appId1
56 onFocusedAppIdChanged: {
56 onFocusedAppIdChanged: {
57− print("focused appid changed", priv.focusedAppId)
58 if (priv.focusedAppId.length > 0) {
57 if (priv.focusedAppId.length > 0) {
59 var focusedApp = ApplicationManager.findApplication(focusedAppId);
58 var focusedApp = ApplicationManager.findApplication(focusedAppId);
60 if (focusedApp.stage == ApplicationInfoInterface.SideStage) {
59 if (focusedApp.stage == ApplicationInfoInterface.SideStage) {
@@ -105,17 +104,14 @@ Item {
105 Connections {
104 Connections {
106 target: ApplicationManager
105 target: ApplicationManager
107 onFocusRequested: {
106 onFocusRequested: {
109 if (spreadView.interactive) {
107 if (spreadView.interactive) {
110 spreadView.snapTo(priv.indexOf(appId));
108 spreadView.snapTo(priv.indexOf(appId));
112−// priv.switchToApp(appId);
113 ApplicationManager.focusApplication(appId)
110 ApplicationManager.focusApplication(appId)
117 onApplicationRemoved: {
114 onApplicationRemoved: {
119 if (priv.mainStageAppId == appId) {
115 if (priv.mainStageAppId == appId) {
120 priv.mainStageAppId = "";
116 priv.mainStageAppId = "";
@@ -127,15 +123,6 @@ Item {
127 spreadView.contentX = 0;
123 spreadView.contentX = 0;
130− onApplicationAdded: {
135− function printStack() {
136− for (var i = 0; i < ApplicationManager.count; i++) {
137− print("AppMan item", i, ":", ApplicationManager.get(i).appId)
141 Flickable {
128 Flickable {
@@ -187,7 +174,6 @@ Item {
187 if (ApplicationManager.count <= 2) {
174 if (ApplicationManager.count <= 2) {
188 return -1;
175 return -1;
190− print("nextinstack calculation! appId0", priv.appId0, "appid1", priv.appId1, "MS", priv.mainStageAppId, "SS", priv.sideStageAppId)
191 if (priv.appId0 == priv.mainStageAppId || priv.appId0 == priv.sideStageAppId) {
177 if (priv.appId0 == priv.mainStageAppId || priv.appId0 == priv.sideStageAppId) {
192 if (priv.appId1 == priv.mainStageAppId || priv.appId1 == priv.sideStageAppId) {
178 if (priv.appId1 == priv.mainStageAppId || priv.appId1 == priv.sideStageAppId) {
193 return 2;
179 return 2;
@@ -196,12 +182,10 @@ Item {
197 return 0;
183 return 0;
198 case "overlay":
184 case "overlay":
199− print("foo", priv.appId0, priv.appId1)
200 return 1;
185 return 1;
202− print("unhandled nextInStack case!!!!!");
187+ print("Unhandled nextInStack case! This shouldn't happen any more when the Dash is an app!");
203 return -1;
188 return -1;
206 property int nextZInStack: indexToZIndex(nextInStack)
190 property int nextZInStack: indexToZIndex(nextInStack)
@@ -251,8 +235,6 @@ Item {
251 snapAnimation.start();
235 snapAnimation.start();
252 } else if (contentX < phase1Width) {
236 } else if (contentX < phase1Width) {
253 snapTo(1)
237 snapTo(1)
254−// } else if (contentX < phase1Width + units.gu(5)) {
257 // Add 1 pixel to make sure we definitely hit positionMarker4 even with rounding errors of the animation.
239 // Add 1 pixel to make sure we definitely hit positionMarker4 even with rounding errors of the animation.
258 snapAnimation.targetContentX = spreadView.width * spreadView.positionMarker4 + 1;
240 snapAnimation.targetContentX = spreadView.width * spreadView.positionMarker4 + 1;
@@ -260,9 +242,7 @@ Item {
262 function snapTo(index) {
244 function snapTo(index) {
263− print("snapping to index", index)
264 spreadView.selectedIndex = index;
245 spreadView.selectedIndex = index;
265−// root.fullscreen = ApplicationManager.get(index).fullscreen;
266 snapAnimation.targetContentX = 0;
246 snapAnimation.targetContentX = 0;
267 snapAnimation.start();
247 snapAnimation.start();
@@ -315,7 +295,6 @@ Item {
315 target: spreadView
295 target: spreadView
316 property: "contentX"
296 property: "contentX"
317 to: snapAnimation.targetContentX
297 to: snapAnimation.targetContentX
318−// duration: UbuntuAnimation.SlowDuration
319 duration: UbuntuAnimation.FastDuration
298 duration: UbuntuAnimation.FastDuration
@@ -400,7 +379,7 @@ Item {
400 onReleased: {
379 onReleased: {
401 if (priv.mainStageAppId) {
380 if (priv.mainStageAppId) {
402 var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
381 var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
403− sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
382+ sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0;
404 sideStageDragSnapAnimation.start();
383 sideStageDragSnapAnimation.start();
406 sideStageDragHandle.dragging = false;
385 sideStageDragHandle.dragging = false;
@@ -513,8 +492,6 @@ Item {
513 width: root.dragAreaWidth
492 width: root.dragAreaWidth
514 direction: Direction.Leftwards
493 direction: Direction.Leftwards
516−// Rectangle { anchors.fill: parent; color: "#4400FF00"}
518 property bool attachedToView: false
495 property bool attachedToView: false
519 property var gesturePoints: new Array()
496 property var gesturePoints: new Array()