on xenial help sign in
Store in scopes list
0eef252Albert Astals
qml/Dash/Dash.qml+5−6
@@ -109,8 +109,6 @@ Showable {
109 onOpenScope: {
109 onOpenScope: {
110 scopeThatOpenedScope = currentScope;
110 scopeThatOpenedScope = currentScope;
111 scopeItem.scope = scope;
111 scopeItem.scope = scope;
112− scopesOverview.currentTab = 1;
113− scopesOverview.ensureAllScopeVisible(scope.id);
114 x = -width;
112 x = -width;
115 }
113 }
116 onScopeLoaded: {
114 onScopeLoaded: {
@@ -128,10 +126,6 @@ Showable {
128 if (!running && dashContent.x == 0) {
126 if (!running && dashContent.x == 0) {
129 dashContent.scopeThatOpenedScope.closeScope(scopeItem.scope);
127 dashContent.scopeThatOpenedScope.closeScope(scopeItem.scope);
130 scopeItem.scope = null;
128 scopeItem.scope = null;
131− if (bottomEdgeController.progress == 0) {
132− // Set tab to Favorites only if we are not showing the overview
133− scopesOverview.currentTab = 0;
134− }
135 }
129 }
136 }
130 }
137 }
131 }
@@ -158,6 +152,11 @@ Showable {
158 bottomEdgeController.enableAnimation = true;
152 bottomEdgeController.enableAnimation = true;
159 bottomEdgeController.progress = 0;
153 bottomEdgeController.progress = 0;
160 }
154 }
155+ onStoreClicked: {
156+ bottomEdgeController.enableAnimation = true;
157+ bottomEdgeController.progress = 0;
158+ dashContent.currentScope.performQuery("scope://com.canonical.scopes.clickstore");
159+ }
161 onRequestFavorite: {
160 onRequestFavorite: {
162 // TODO This is not yet implemented in the backend
161 // TODO This is not yet implemented in the backend
163 scopes.setFavorite(scopeId, favorite);
162 scopes.setFavorite(scopeId, favorite);
qml/Dash/PageHeader.qml+9
@@ -30,6 +30,7 @@ Item {
30 property bool showBackButton: false
30 property bool showBackButton: false
31 property string title
31 property string title
32
32
33+ property bool storeEntryEnabled: false
33 property bool searchEntryEnabled: false
34 property bool searchEntryEnabled: false
34 property bool settingsEnabled: false
35 property bool settingsEnabled: false
35 property bool favoriteEnabled: false
36 property bool favoriteEnabled: false
@@ -46,6 +47,7 @@ Item {
46 property var scopeStyle: null
47 property var scopeStyle: null
47
48
48 signal backClicked()
49 signal backClicked()
50+ signal storeClicked()
49 signal settingsClicked()
51 signal settingsClicked()
50 signal favoriteClicked()
52 signal favoriteClicked()
51
53
@@ -253,6 +255,13 @@ Item {
253 }
255 }
254
256
255 actions: [
257 actions: [
258+ Action {
259+ objectName: "store"
260+ text: i18n.tr("Store")
261+ iconName: "ubuntu-store-symbolic"
262+ visible: root.storeEntryEnabled
263+ onTriggered: root.storeClicked();
264+ },
256 Action {
265 Action {
257 objectName: "search"
266 objectName: "search"
258 text: i18n.tr("Search")
267 text: i18n.tr("Search")
qml/Dash/ScopesList.qml+3
@@ -28,6 +28,7 @@ Item {
28
28
29 // Signals
29 // Signals
30 signal backClicked()
30 signal backClicked()
31+ signal storeClicked()
31 signal requestFavorite(string scopeId, bool favorite)
32 signal requestFavorite(string scopeId, bool favorite)
32
33
33 ScopeStyle {
34 ScopeStyle {
@@ -49,8 +50,10 @@ Item {
49 title: i18n.tr("My Feeds")
50 title: i18n.tr("My Feeds")
50 width: parent.width
51 width: parent.width
51 showBackButton: true
52 showBackButton: true
53+ storeEntryEnabled: true
52 searchEntryEnabled: true
54 searchEntryEnabled: true
53 onBackClicked: root.backClicked()
55 onBackClicked: root.backClicked()
56+ onStoreClicked: root.storeClicked();
54 }
57 }
55
58
56 Flickable {
59 Flickable {