on xenial help sign in
Make scope dispatching work if fav scope is shown
commit8da608ca51be80205c5ff04fde1d8c9d65ca358f authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 19 Mar 2015, 16:25 (12 years ago) parent4d5d38e
2 files changed+26−18
qml/Dash/Dash.qml+26−13 qml/Dash/DashContent.qml−5
qml/Dash/Dash.qml+26−13
@@ -28,29 +28,42 @@ Showable {
2828
2929 visible: shown
3030
31+ Connections {
32+ target: UriHandler
33+ onOpened: {
34+ backToDashContent()
35+ dashContent.scope.performQuery(uris[0])
36+ }
37+ }
38+
3139 DashCommunicatorService {
3240 objectName: "dashCommunicatorService"
3341 onSetCurrentScopeRequested: {
3442 if (!isSwipe || !window.active || bottomEdgeController.progress != 0 || scopeItem.scope || dashContent.subPageShown) {
3543 if (bottomEdgeController.progress != 0 && window.active) animate = false;
3644 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
37− // Close dash overview and nested temp scopes in it
38− if (bottomEdgeController.progress != 0) {
39− bottomEdgeController.enableAnimation = window.active;
40− bottomEdgeController.progress = 0;
41− }
42− // Close normal temp scopes (e.g. App Store)
43− if (scopeItem.scope) {
44− scopeItem.backClicked();
45− }
46− // Close previews
47− if (dashContent.subPageShown) {
48− dashContent.closePreview();
49− }
45+ backToDashContent()
5046 }
5147 }
5248 }
5349
50+ function backToDashContent()
51+ {
52+ // Close dash overview and nested temp scopes in it
53+ if (bottomEdgeController.progress != 0) {
54+ bottomEdgeController.enableAnimation = window.active;
55+ bottomEdgeController.progress = 0;
56+ }
57+ // Close normal temp scopes (e.g. App Store)
58+ if (scopeItem.scope) {
59+ scopeItem.backClicked();
60+ }
61+ // Close previews
62+ if (dashContent.subPageShown) {
63+ dashContent.closePreview();
64+ }
65+ }
66+
5467 function setCurrentScope(scopeId, animate, reset) {
5568 var scopeIndex = -1;
5669 for (var i = 0; i < scopes.count; ++i) {
qml/Dash/DashContent.qml−5
@@ -63,11 +63,6 @@ Item {
6363 }
6464 }
6565
66− Connections {
67− target: UriHandler
68− onOpened: dashContentList.currentItem.theScope.performQuery(uris[0])
69− }
70−
7166 function setCurrentScopeAtIndex(index, animate, reset) {
7267 // if the scopes haven't loaded yet, then wait until they are.
7368 if (!scopes.loaded) {