on xenial help sign in
Store in scopes list

Doesn't go to the "special" scopes category yet, in discussion

commit0eef25247297f8fdee380838dcf90182be8740ad authorAlbert Astals <albert.astals@canonical.com> dateMon 22 Sep 2014, 11:53 (12 years ago) parenta592402
3 files changed+17−6
qml/Dash/Dash.qml+5−6 qml/Dash/PageHeader.qml+9 qml/Dash/ScopesList.qml+3
qml/Dash/Dash.qml+5−6
@@ -109,8 +109,6 @@ Showable {
109109 onOpenScope: {
110110 scopeThatOpenedScope = currentScope;
111111 scopeItem.scope = scope;
112− scopesOverview.currentTab = 1;
113− scopesOverview.ensureAllScopeVisible(scope.id);
114112 x = -width;
115113 }
116114 onScopeLoaded: {
@@ -128,10 +126,6 @@ Showable {
128126 if (!running && dashContent.x == 0) {
129127 dashContent.scopeThatOpenedScope.closeScope(scopeItem.scope);
130128 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− }
135129 }
136130 }
137131 }
@@ -158,6 +152,11 @@ Showable {
158152 bottomEdgeController.enableAnimation = true;
159153 bottomEdgeController.progress = 0;
160154 }
155+ onStoreClicked: {
156+ bottomEdgeController.enableAnimation = true;
157+ bottomEdgeController.progress = 0;
158+ dashContent.currentScope.performQuery("scope://com.canonical.scopes.clickstore");
159+ }
161160 onRequestFavorite: {
162161 // TODO This is not yet implemented in the backend
163162 scopes.setFavorite(scopeId, favorite);
qml/Dash/PageHeader.qml+9
@@ -30,6 +30,7 @@ Item {
3030 property bool showBackButton: false
3131 property string title
3232
33+ property bool storeEntryEnabled: false
3334 property bool searchEntryEnabled: false
3435 property bool settingsEnabled: false
3536 property bool favoriteEnabled: false
@@ -46,6 +47,7 @@ Item {
4647 property var scopeStyle: null
4748
4849 signal backClicked()
50+ signal storeClicked()
4951 signal settingsClicked()
5052 signal favoriteClicked()
5153
@@ -253,6 +255,13 @@ Item {
253255 }
254256
255257 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+ },
256265 Action {
257266 objectName: "search"
258267 text: i18n.tr("Search")
qml/Dash/ScopesList.qml+3
@@ -28,6 +28,7 @@ Item {
2828
2929 // Signals
3030 signal backClicked()
31+ signal storeClicked()
3132 signal requestFavorite(string scopeId, bool favorite)
3233
3334 ScopeStyle {
@@ -49,8 +50,10 @@ Item {
4950 title: i18n.tr("My Feeds")
5051 width: parent.width
5152 showBackButton: true
53+ storeEntryEnabled: true
5254 searchEntryEnabled: true
5355 onBackClicked: root.backClicked()
56+ onStoreClicked: root.storeClicked();
5457 }
5558
5659 Flickable {