Merge lp:~saviq/unity8/preview-overview into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1161
Merged at revision: 1170
Proposed branch: lp:~saviq/unity8/preview-overview
Merge into: lp:unity8
Diff against target: 39 lines (+11/-4)
1 file modified
qml/Dash/ScopesOverview.qml (+11/-4)
To merge this branch: bzr merge lp:~saviq/unity8/preview-overview
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Mirco Müller (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+230903@code.launchpad.net

Commit message

Support previews for scopes in overview and hook up preview processing to activity indicator.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
No.

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.

 * Did you make sure that your branch does not contain spurious tags?
Yes.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

See inline comment.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

> What should currentIndex be, -1 or index?:)

This is basically forcing the ListView to do what we need by resetting
it to invalid and then back to the real thing.

Revision history for this message
Michał Sawicz (saviq) wrote :

Sorry... it's already in silo and the only concern was explained :/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/ScopesOverview.qml'
2--- qml/Dash/ScopesOverview.qml 2014-08-11 19:02:29 +0000
3+++ qml/Dash/ScopesOverview.qml 2014-08-14 22:20:19 +0000
4@@ -32,7 +32,7 @@
5 property alias currentTab: tabBar.currentTab
6
7 // Properties used by parent
8- readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing
9+ readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing || previewListView.processing
10 property bool growingDashFromPos: false
11 readonly property bool searching: scope && scope.searchQuery == ""
12 readonly property bool showingNonFavoriteScope: tempScopeItem.scope != null
13@@ -366,7 +366,16 @@
14 }
15
16 function itemPressedAndHeld(index, itemModel, resultsModel, limitedCategoryItemCount) {
17- // Do nothing
18+ if (itemModel.uri.indexOf("scope://") === 0) {
19+ // Preview can call openScope so make sure restorePosition and restoreSize are set
20+ scopesOverviewXYScaler.restorePosition = undefined;
21+ scopesOverviewXYScaler.restoreSize = allCardSize;
22+
23+ previewListView.model = resultsModel;
24+ previewListView.currentIndex = -1;
25+ previewListView.currentIndex = index;
26+ previewListView.open = true;
27+ }
28 }
29 }
30
31@@ -455,8 +464,6 @@
32 anchors.left: scopesOverviewContent.right
33 }
34
35-
36-
37 Item {
38 id: scopesOverviewXYScaler
39 width: parent.width

Subscribers

People subscribed via source and target branches