on xenial help sign in
More renaming.
e12ee10Pawel Stolowski
Dash/Dash.qml+16−16
@@ -24,30 +24,30 @@ Showable {
24 id: dash
24 id: dash
25
25
26 property alias contentProgress: dashContent.contentProgress
26 property alias contentProgress: dashContent.contentProgress
27− property string showLensOnLoaded: "home.scope"
27+ property string showScopeOnLoaded: "home.scope"
28 property real contentScale: 1.0
28 property real contentScale: 1.0
29
29
30 width: units.gu(40)
30 width: units.gu(40)
31 height: units.gu(71)
31 height: units.gu(71)
32
32
33− function setCurrentLens(lensId, animate, reset) {
33+ function setCurrentScope(scopeId, animate, reset) {
34− var lensIndex = filteredLenses.findFirst(Scopes.RoleId, lensId)
34+ var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId)
35
35
36− if (lensIndex == -1) {
36+ if (scopeIndex == -1) {
37− console.warn("No match for lens with id: %1".arg(lensId))
37+ console.warn("No match for scope with id: %1".arg(scopeId))
38 return
38 return
39 }
39 }
40
40
41− if (lensIndex == dashContent.currentIndex && !reset) {
41+ if (scopeIndex == dashContent.currentIndex && !reset) {
42− // the lens is already the current one
42+ // the scope is already the current one
43 return
43 return
44 }
44 }
45
45
46− dashContent.setCurrentLensAtIndex(lensIndex, animate, reset)
46+ dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
47 }
47 }
48
48
49 SortFilterProxyModel {
49 SortFilterProxyModel {
50− id: filteredLenses
50+ id: filteredScopes
51 model: Scopes {
51 model: Scopes {
52 id: scopes
52 id: scopes
53 }
53 }
@@ -60,17 +60,17 @@ Showable {
60 DashContent {
60 DashContent {
61 id: dashContent
61 id: dashContent
62 anchors.fill: parent
62 anchors.fill: parent
63− model: filteredLenses
63+ model: filteredScopes
64 scopes: scopes
64 scopes: scopes
65 onMovementStarted: dashbar.startNavigation()
65 onMovementStarted: dashbar.startNavigation()
66 onMovementEnded: dashbar.stopNavigation()
66 onMovementEnded: dashbar.stopNavigation()
67 onContentFlickStarted: dashbar.finishNavigation()
67 onContentFlickStarted: dashbar.finishNavigation()
68 onContentEndReached: dashbar.finishNavigation()
68 onContentEndReached: dashbar.finishNavigation()
69 onPreviewShown: dashbar.finishNavigation()
69 onPreviewShown: dashbar.finishNavigation()
70− onLensLoaded: {
70+ onScopeLoaded: {
71− if (lensId == dash.showLensOnLoaded) {
71+ if (scopeId == dash.showScopeOnLoaded) {
72− dash.setCurrentLens(lensId, false, false)
72+ dash.setCurrentScope(scopeId, false, false)
73− dash.showLensOnLoaded = ""
73+ dash.showScopeOnLoaded = ""
74 }
74 }
75 }
75 }
76 scale: dash.contentScale
76 scale: dash.contentScale
@@ -82,9 +82,9 @@ Showable {
82 anchors.bottom: parent.bottom
82 anchors.bottom: parent.bottom
83 anchors.left: parent.left
83 anchors.left: parent.left
84 anchors.right: parent.right
84 anchors.right: parent.right
85− model: filteredLenses
85+ model: filteredScopes
86 currentIndex: dashContent.currentIndex
86 currentIndex: dashContent.currentIndex
87− onItemSelected: dashContent.setCurrentLensAtIndex(index, true, false)
87+ onItemSelected: dashContent.setCurrentScopeAtIndex(index, true, false)
88 opacity: dash.contentScale == 1.0 ? 1.0 : 0.0
88 opacity: dash.contentScale == 1.0 ? 1.0 : 0.0
89 Behavior on opacity { NumberAnimation { easing.type: Easing.OutQuad; duration: 150 } }
89 Behavior on opacity { NumberAnimation { easing.type: Easing.OutQuad; duration: 150 } }
90 }
90 }
Dash/DashApps.qml+4−4
@@ -21,8 +21,8 @@ import "../Components"
21import "../Components/ListItems"
21import "../Components/ListItems"
22import "Apps"
22import "Apps"
23
23
24−LensView {
24+ScopeView {
25− id: lensView
25+ id: scopeView
26
26
27 // FIXME: a way to aggregate these models would be ideal
27 // FIXME: a way to aggregate these models would be ideal
28 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
28 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
@@ -40,7 +40,7 @@ LensView {
40 }
40 }
41
41
42 Binding {
42 Binding {
43− target: lensView.lens
43+ target: scopeView.scope
44 property: "searchQuery"
44 property: "searchQuery"
45 value: pageHeader.searchQuery
45 value: pageHeader.searchQuery
46 }
46 }
@@ -177,7 +177,7 @@ LensView {
177 width: categoryView.width
177 width: categoryView.width
178 text: i18n.tr("Apps")
178 text: i18n.tr("Apps")
179 searchEntryEnabled: true
179 searchEntryEnabled: true
180− searchHistory: lensView.searchHistory
180+ searchHistory: scopeView.searchHistory
181 }
181 }
182 }
182 }
183}
183}
Dash/DashBar.qml+3−3
@@ -97,10 +97,10 @@ Item {
97
97
98 Image {
98 Image {
99 anchors.centerIn: parent
99 anchors.centerIn: parent
100− /* FIXME: should be 'source: lens.iconHint' but the
100+ /* FIXME: should be 'source: scope.iconHint' but the
101− lenses do not contain the right icons yet
101+ scopes do not contain the right icons yet
102 */
102 */
103− source: "graphics/lensIcons/%1.png".arg(lens.name)
103+ source: "graphics/lensIcons/%1.png".arg(scope.name)
104 height: iconSize
104 height: iconSize
105 width: iconSize
105 width: iconSize
106 // opacity: index == currentIndex ? 1 : 1 // same opacity for now
106 // opacity: index == currentIndex ? 1 : 1 // same opacity for now
Dash/DashContent.qml+14−14
@@ -33,23 +33,23 @@ Item {
33 signal contentFlickStarted()
33 signal contentFlickStarted()
34 signal contentEndReached()
34 signal contentEndReached()
35 signal previewShown()
35 signal previewShown()
36− signal lensLoaded(string lensId)
36+ signal scopeLoaded(string scopeId)
37 signal positionedAtBeginning()
37 signal positionedAtBeginning()
38
38
39− // If we set the current lens index before the scopes have been added,
39+ // If we set the current scope index before the scopes have been added,
40 // then we need to wait until the loaded signals gets emitted from the scopes
40 // then we need to wait until the loaded signals gets emitted from the scopes
41 property var set_current_index: undefined
41 property var set_current_index: undefined
42 Connections {
42 Connections {
43 target: scopes
43 target: scopes
44 onLoadedChanged: {
44 onLoadedChanged: {
45 if (scopes.loaded && set_current_index != undefined) {
45 if (scopes.loaded && set_current_index != undefined) {
46− setCurrentLensAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
46+ setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
47 set_current_index = undefined;
47 set_current_index = undefined;
48 }
48 }
49 }
49 }
50 }
50 }
51
51
52− function setCurrentLensAtIndex(index, animate, reset) {
52+ function setCurrentScopeAtIndex(index, animate, reset) {
53 var storedMoveDuration = dashContentList.highlightMoveDuration
53 var storedMoveDuration = dashContentList.highlightMoveDuration
54 var storedMoveSpeed = dashContentList.highlightMoveVelocity
54 var storedMoveSpeed = dashContentList.highlightMoveVelocity
55 if (!animate) {
55 if (!animate) {
@@ -79,12 +79,12 @@ Item {
79 }
79 }
80 }
80 }
81
81
82− property var lensDelegateMapping: {"mockmusicmaster.scope": "DashMusic.qml",
82+ property var scopeDelegateMapping: {"mockmusicmaster.scope": "DashMusic.qml",
83 "applications.scope": "DashApps.qml",
83 "applications.scope": "DashApps.qml",
84 "home.scope": "DashHome.qml",
84 "home.scope": "DashHome.qml",
85 "mockvideosmaster.scope": "DashVideos.qml",
85 "mockvideosmaster.scope": "DashVideos.qml",
86 }
86 }
87− property string genericLens: "GenericLensView.qml"
87+ property string genericScope: "GenericScopeView.qml"
88
88
89 ListView {
89 ListView {
90 id: dashContentList
90 id: dashContentList
@@ -102,7 +102,7 @@ Item {
102 highlightMoveDuration: 250
102 highlightMoveDuration: 250
103 highlightRangeMode: ListView.StrictlyEnforceRange
103 highlightRangeMode: ListView.StrictlyEnforceRange
104 /* FIXME: workaround rendering issue due to use of ShaderEffectSource in
104 /* FIXME: workaround rendering issue due to use of ShaderEffectSource in
105− UbuntuShape. While switching from the home lens to the People lens the
105+ UbuntuShape. While switching from the home scope to the People scope the
106 rendering would block midway.
106 rendering would block midway.
107 */
107 */
108 cacheBuffer: 2147483647
108 cacheBuffer: 2147483647
@@ -112,7 +112,7 @@ Item {
112 // If the number of items is less than the current index, then need to reset to another item.
112 // If the number of items is less than the current index, then need to reset to another item.
113 onCountChanged: {
113 onCountChanged: {
114 if (currentIndex >= count)
114 if (currentIndex >= count)
115− dashContent.setCurrentLensAtIndex(count-1, true, true)
115+ dashContent.setCurrentScopeAtIndex(count-1, true, true)
116 }
116 }
117
117
118 delegate:
118 delegate:
@@ -121,20 +121,20 @@ Item {
121 height: ListView.view.height
121 height: ListView.view.height
122 asynchronous: true
122 asynchronous: true
123 source: {
123 source: {
124− var customLens = lensDelegateMapping[lens.id]
124+ var customScope = scopeDelegateMapping[scope.id]
125− if (customLens) {
125+ if (customScope) {
126− return customLens
126+ return customScope
127 } else {
127 } else {
128− return genericLens
128+ return genericScope
129 }
129 }
130 }
130 }
131 onLoaded: {
131 onLoaded: {
132− item.lens = Qt.binding(function() { return lens })
132+ item.scope = Qt.binding(function() { return scope })
133 item.isCurrent = Qt.binding(function() { return ListView.isCurrentItem })
133 item.isCurrent = Qt.binding(function() { return ListView.isCurrentItem })
134 item.searchHistory = Qt.binding(function() { return shell.searchHistory })
134 item.searchHistory = Qt.binding(function() { return shell.searchHistory })
135 dashContentList.movementStarted.connect(item.movementStarted)
135 dashContentList.movementStarted.connect(item.movementStarted)
136 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
136 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
137− dashContent.lensLoaded(item.lens.id)
137+ dashContent.scopeLoaded(item.scope.id)
138 }
138 }
139 Connections {
139 Connections {
140 target: item
140 target: item
Dash/DashHome.qml+3−3
@@ -25,7 +25,7 @@ import "Video"
25import "Music"
25import "Music"
26import "People"
26import "People"
27
27
28−LensView {
28+ScopeView {
29 id: root
29 id: root
30
30
31 onMovementStarted: listView.showHeader()
31 onMovementStarted: listView.showHeader()
@@ -94,7 +94,7 @@ LensView {
94
94
95 Connections {
95 Connections {
96 target: dashContent
96 target: dashContent
97− onLensLoaded: switch (lensId) {
97+ onScopeLoaded: switch (scopeId) {
98 case "mockmusicmaster.scope":
98 case "mockmusicmaster.scope":
99 musicFilter.model = dashContent.scopes.get("mockmusicmaster.scope").results
99 musicFilter.model = dashContent.scopes.get("mockmusicmaster.scope").results
100 break;
100 break;
@@ -154,7 +154,7 @@ LensView {
154 onLoaded: {
154 onLoaded: {
155 item.model = categoryModels[modelName]
155 item.model = categoryModels[modelName]
156
156
157− //FIXME: workaround for lack of previews for videos in Home lens.
157+ //FIXME: workaround for lack of previews for videos in Home scope.
158 //Need to connect to the clicked() signal here and act upon it here instead.
158 //Need to connect to the clicked() signal here and act upon it here instead.
159 if (component === "VideosGrid") {
159 if (component === "VideosGrid") {
160 function playVideo(index, data) {
160 function playVideo(index, data) {
Dash/DashMusic.qml+6−6
@@ -20,8 +20,8 @@ import "../Components"
20import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
21import "Music"
21import "Music"
22
22
23−LensView {
23+ScopeView {
24− id: lensView
24+ id: scopeView
25
25
26 property var categoryNames: [
26 property var categoryNames: [
27 i18n.tr("Featured"),
27 i18n.tr("Featured"),
@@ -37,7 +37,7 @@ LensView {
37 onMovementStarted: categoryView.showHeader()
37 onMovementStarted: categoryView.showHeader()
38
38
39 Binding {
39 Binding {
40− target: lensView.lens
40+ target: scopeView.scope
41 property: "searchQuery"
41 property: "searchQuery"
42 value: pageHeader.searchQuery
42 value: pageHeader.searchQuery
43 }
43 }
@@ -67,7 +67,7 @@ LensView {
67 ListViewWithPageHeader {
67 ListViewWithPageHeader {
68 id: categoryView
68 id: categoryView
69 anchors.fill: parent
69 anchors.fill: parent
70− model: lensView.categories
70+ model: scopeView.categories
71
71
72 onAtYEndChanged: if (atYEnd) endReached()
72 onAtYEndChanged: if (atYEnd) endReached()
73 onMovingChanged: if (moving && atYEnd) endReached()
73 onMovingChanged: if (moving && atYEnd) endReached()
@@ -80,7 +80,7 @@ LensView {
80
80
81 Loader {
81 Loader {
82 anchors { top: parent.top; left: parent.left; right: parent.right }
82 anchors { top: parent.top; left: parent.left; right: parent.right }
83− sourceComponent: lensView.getRenderer(base.categoryId)
83+ sourceComponent: scopeView.getRenderer(base.categoryId)
84 onLoaded: {
84 onLoaded: {
85 item.model = results
85 item.model = results
86 }
86 }
@@ -98,7 +98,7 @@ LensView {
98 width: categoryView.width
98 width: categoryView.width
99 text: i18n.tr("Music")
99 text: i18n.tr("Music")
100 searchEntryEnabled: true
100 searchEntryEnabled: true
101− searchHistory: lensView.searchHistory
101+ searchHistory: scopeView.searchHistory
102 }
102 }
103 }
103 }
104}
104}
Dash/DashPeople.qml+6−6
@@ -23,8 +23,8 @@ import "../Components"
23import "../Components/ListItems" as ListItems
23import "../Components/ListItems" as ListItems
24import "People"
24import "People"
25
25
26−LensView {
26+ScopeView {
27− id: lensView
27+ id: scopeView
28 property alias previewShown: previewLoader.onScreen
28 property alias previewShown: previewLoader.onScreen
29
29
30 property var categoryNames: [
30 property var categoryNames: [
@@ -41,7 +41,7 @@ LensView {
41 onMovementStarted: categoryView.showHeader()
41 onMovementStarted: categoryView.showHeader()
42
42
43 Binding {
43 Binding {
44− target: lensView.lens
44+ target: scopeView.scope
45 property: "searchQuery"
45 property: "searchQuery"
46 value: pageHeader.searchQuery
46 value: pageHeader.searchQuery
47 }
47 }
@@ -89,7 +89,7 @@ LensView {
89 ListViewWithPageHeader {
89 ListViewWithPageHeader {
90 id: categoryView
90 id: categoryView
91 anchors.fill: parent
91 anchors.fill: parent
92− model: lensView.categories
92+ model: scopeView.categories
93 onAtYEndChanged: if (atYEnd) endReached()
93 onAtYEndChanged: if (atYEnd) endReached()
94 onMovingChanged: if (moving && atYEnd) endReached()
94 onMovingChanged: if (moving && atYEnd) endReached()
95 clipListView: !previewLoader.onScreen
95 clipListView: !previewLoader.onScreen
@@ -122,7 +122,7 @@ LensView {
122 width: categoryView.width
122 width: categoryView.width
123 text: i18n.tr("People")
123 text: i18n.tr("People")
124 searchEntryEnabled: true
124 searchEntryEnabled: true
125− searchHistory: lensView.searchHistory
125+ searchHistory: scopeView.searchHistory
126 }
126 }
127 }
127 }
128
128
@@ -210,7 +210,7 @@ LensView {
210
210
211 PeoplePreviewData {
211 PeoplePreviewData {
212 id: previewData
212 id: previewData
213− lens: lensView.lens
213+ scope: scopeView.scope
214 property Data model
214 property Data model
215
215
216 onError: previewLoader.open = false
216 onError: previewLoader.open = false
Dash/DashVideos.qml+6−6
@@ -20,8 +20,8 @@ import "../Components"
20import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
21import "Video"
21import "Video"
22
22
23−LensView {
23+ScopeView {
24− id: lensView
24+ id: scopeView
25 property alias previewShown: previewLoader.onScreen
25 property alias previewShown: previewLoader.onScreen
26
26
27 property var categoryNames: [
27 property var categoryNames: [
@@ -38,7 +38,7 @@ LensView {
38 onMovementStarted: categoryView.showHeader()
38 onMovementStarted: categoryView.showHeader()
39
39
40 Binding {
40 Binding {
41− target: lensView.lens
41+ target: scopeView.scope
42 property: "searchQuery"
42 property: "searchQuery"
43 value: pageHeader.searchQuery
43 value: pageHeader.searchQuery
44 }
44 }
@@ -100,7 +100,7 @@ LensView {
100 ListViewWithPageHeader {
100 ListViewWithPageHeader {
101 id: categoryView
101 id: categoryView
102 anchors.fill: parent
102 anchors.fill: parent
103− model: lensView.categories
103+ model: scopeView.categories
104 clipListView: !previewLoader.onScreen
104 clipListView: !previewLoader.onScreen
105
105
106 onAtYEndChanged: if (atYEnd) endReached()
106 onAtYEndChanged: if (atYEnd) endReached()
@@ -115,7 +115,7 @@ LensView {
115 Loader {
115 Loader {
116 id: loader
116 id: loader
117 anchors { top: parent.top; left: parent.left; right: parent.right }
117 anchors { top: parent.top; left: parent.left; right: parent.right }
118− sourceComponent: lensView.getRenderer(base.categoryId)
118+ sourceComponent: scopeView.getRenderer(base.categoryId)
119 onLoaded: {
119 onLoaded: {
120 item.model = results
120 item.model = results
121 }
121 }
@@ -154,7 +154,7 @@ LensView {
154 width: categoryView.width
154 width: categoryView.width
155 text: i18n.tr("Videos")
155 text: i18n.tr("Videos")
156 searchEntryEnabled: true
156 searchEntryEnabled: true
157− searchHistory: lensView.searchHistory
157+ searchHistory: scopeView.searchHistory
158 }
158 }
159 }
159 }
160
160
Dash/GenericLensView.qml → Dash/GenericScopeView.qmlrenamed+5−5
@@ -20,8 +20,8 @@ import "../Components"
20import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
21import "../Components/IconUtil.js" as IconUtil
21import "../Components/IconUtil.js" as IconUtil
22
22
23−LensView {
23+ScopeView {
24− id: lensView
24+ id: scopeView
25
25
26 onIsCurrentChanged: {
26 onIsCurrentChanged: {
27 pageHeader.resetSearch();
27 pageHeader.resetSearch();
@@ -30,7 +30,7 @@ LensView {
30 onMovementStarted: categoryView.showHeader()
30 onMovementStarted: categoryView.showHeader()
31
31
32 Binding {
32 Binding {
33− target: lensView.lens
33+ target: scopeView.scope
34 property: "searchQuery"
34 property: "searchQuery"
35 value: pageHeader.searchQuery
35 value: pageHeader.searchQuery
36 }
36 }
@@ -46,7 +46,7 @@ LensView {
46 ListViewWithPageHeader {
46 ListViewWithPageHeader {
47 id: categoryView
47 id: categoryView
48 anchors.fill: parent
48 anchors.fill: parent
49− model: lensView.categories
49+ model: scopeView.categories
50 onAtYEndChanged: if (atYEnd) endReached()
50 onAtYEndChanged: if (atYEnd) endReached()
51 onMovingChanged: if (moving && atYEnd) endReached()
51 onMovingChanged: if (moving && atYEnd) endReached()
52
52
@@ -89,7 +89,7 @@ LensView {
89 id: pageHeader
89 id: pageHeader
90 objectName: "pageHeader"
90 objectName: "pageHeader"
91 width: categoryView.width
91 width: categoryView.width
92− text: lensView.lens.name
92+ text: scopeView.scope.name
93 searchEntryEnabled: true
93 searchEntryEnabled: true
94 }
94 }
95 }
95 }
Dash/People/PeopleFilterGrid.qml+1−1
@@ -54,7 +54,7 @@ FilterGrid {
54 // - FilterGrid is "height: childrenRect.height" so all delegates are always loaded
54 // - FilterGrid is "height: childrenRect.height" so all delegates are always loaded
55 // TODO: Optimize this by:
55 // TODO: Optimize this by:
56 // - not loading all delegates all the time and remove layer.enabled and/or
56 // - not loading all delegates all the time and remove layer.enabled and/or
57− // - destroy whole lens when not visible/needed to free the GPU memory
57+ // - destroy whole scope when not visible/needed to free the GPU memory
58 layer.enabled: true
58 layer.enabled: true
59
59
60 dataModel: data
60 dataModel: data
Dash/People/PeoplePreview.qml+2−2
@@ -47,7 +47,7 @@ DashPreview {
47 visible: preview.model != undefined && preview.model.status != undefined
47 visible: preview.model != undefined && preview.model.status != undefined
48 model: preview.model
48 model: preview.model
49 property int index: 1
49 property int index: 1
50− // FIXME that should trigger the action on the lens/scope, when there's support
50+ // FIXME that should trigger the action on the scope, when there's support
51 onClicked: shell.activateApplication("/usr/share/applications/%1-webapp.desktop".arg(model.statusService), "--homepage=%1".arg(model.statusPostUri))
51 onClicked: shell.activateApplication("/usr/share/applications/%1-webapp.desktop".arg(model.statusService), "--homepage=%1".arg(model.statusPostUri))
52 }
52 }
53
53
@@ -69,7 +69,7 @@ DashPreview {
69 delegate: Phone {
69 delegate: Phone {
70 objectName: "phoneField" + index
70 objectName: "phoneField" + index
71 model: preview.model
71 model: preview.model
72− // FIXME these should trigger actions on the lens/scope, when there's support
72+ // FIXME these should trigger actions on the scope, when there's support
73 onPhoneClicked: shell.activateApplication("/usr/share/applications/phone-app.desktop", "call://%1".arg(number.replace(/[^\d\+]/g, "")))
73 onPhoneClicked: shell.activateApplication("/usr/share/applications/phone-app.desktop", "call://%1".arg(number.replace(/[^\d\+]/g, "")))
74 onTextClicked: shell.activateApplication("/usr/share/applications/phone-app.desktop", "message://%1".arg(number.replace(/[^\d\+]/g, "")))
74 onTextClicked: shell.activateApplication("/usr/share/applications/phone-app.desktop", "message://%1".arg(number.replace(/[^\d\+]/g, "")))
75 }
75 }
Dash/LensView.qml → Dash/ScopeView.qmlrenamed+4−4
@@ -19,7 +19,7 @@ import Utils 0.1
19import Unity 0.1
19import Unity 0.1
20
20
21FocusScope {
21FocusScope {
22− property Scope lens
22+ property Scope scope
23 property SortFilterProxyModel categories: categoryFilter
23 property SortFilterProxyModel categories: categoryFilter
24 property bool isCurrent
24 property bool isCurrent
25 property ListModel searchHistory
25 property ListModel searchHistory
@@ -29,17 +29,17 @@ FocusScope {
29 signal positionedAtBeginning
29 signal positionedAtBeginning
30
30
31 // FIXME delay the search so that daemons have time to settle
31 // FIXME delay the search so that daemons have time to settle
32− onLensChanged: timer.restart()
32+ onScopeChanged: timer.restart()
33
33
34 Timer {
34 Timer {
35 id: timer
35 id: timer
36 interval: 2000
36 interval: 2000
37− onTriggered: lens.searchQuery = ""
37+ onTriggered: scope.searchQuery = ""
38 }
38 }
39
39
40 SortFilterProxyModel {
40 SortFilterProxyModel {
41 id: categoryFilter
41 id: categoryFilter
42− model: lens.categories
42+ model: scope.categories
43 dynamicSortFilter: true
43 dynamicSortFilter: true
44 filterRole: Categories.RoleCount
44 filterRole: Categories.RoleCount
45 filterRegExp: /^0$/
45 filterRegExp: /^0$/
plugins/Unity/scopes.cpp+1−1
@@ -33,7 +33,7 @@ Scopes::Scopes(QObject *parent)
33 , m_unityScopes(std::make_shared<unity::dash::GSettingsScopes>())
33 , m_unityScopes(std::make_shared<unity::dash::GSettingsScopes>())
34 , m_loaded(false)
34 , m_loaded(false)
35{
35{
36− m_roles[Scopes::RoleLens] = "lens";
36+ m_roles[Scopes::RoleLens] = "scope";
37 m_roles[Scopes::RoleId] = "id";
37 m_roles[Scopes::RoleId] = "id";
38 m_roles[Scopes::RoleVisible] = "visible";
38 m_roles[Scopes::RoleVisible] = "visible";
39
39
plugins/Unity/scopes.h+1−1
@@ -61,7 +61,7 @@ public:
61 Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const;
61 Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const;
62
62
63 Q_INVOKABLE QVariant get(int row) const;
63 Q_INVOKABLE QVariant get(int row) const;
64− Q_INVOKABLE QVariant get(const QString& lens_id) const;
64+ Q_INVOKABLE QVariant get(const QString& scope_id) const;
65
65
66 QHash<int, QByteArray> roleNames() const;
66 QHash<int, QByteArray> roleNames() const;
67
67
tests/autopilot/unity8/tests/testcases.py+1−1
@@ -73,7 +73,7 @@ class TestShell(ShellTestCase, TestShellHelpers):
73 super(TestShell, self).setUp("%sx%s" % (self.app_width / divisor, self.app_height / divisor), "%s" % (self.grid_unit_px / divisor))
73 super(TestShell, self).setUp("%sx%s" % (self.app_width / divisor, self.app_height / divisor), "%s" % (self.grid_unit_px / divisor))
74
74
75 dash = self.main_window.get_dash()
75 dash = self.main_window.get_dash()
76− self.assertThat(dash.showLensOnLoaded, Eventually(Equals(""), timeout=30))
76+ self.assertThat(dash.showScopeOnLoaded, Eventually(Equals(""), timeout=30))
77
77
78 def test_show_hud(self):
78 def test_show_hud(self):
79 hud = self.main_window.get_hud()
79 hud = self.main_window.get_hud()