@@ -32,6 +32,7 @@ Item {
3232
3333 property bool searchEntryEnabled: false
3434 property bool settingsEnabled: false
35+ property bool favoriteEnabled: false
3536 property ListModel searchHistory: SearchHistoryModel
3637 property alias searchQuery: searchTextField.text
3738 property alias searchHint: searchTextField.placeholderText
@@ -41,13 +42,12 @@ Item {
4142 property int paginationCount: 0
4243 property int paginationIndex: -1
4344
44− // TODO We should use foreground for the icons
45− // of the toolbar but unfortunately Action does not have
46− // the keyColor property as Icon does :-/
45+ property var scope: null
4746 property var scopeStyle: null
4847
4948 signal backClicked()
5049 signal settingsClicked()
50+ signal favoriteClicked()
5151
5252 onScopeStyleChanged: refreshLogo()
5353 onSearchQueryChanged: {
@@ -257,6 +257,7 @@ Item {
257257 actions: [
258258 Action {
259259 objectName: "search"
260+ text: i18n.tr("Search")
260261 iconName: "search"
261262 visible: root.searchEntryEnabled
262263 onTriggered: {
@@ -266,12 +267,23 @@ Item {
266267 },
267268 Action {
268269 objectName: "settings"
270+ text: i18n.tr("Settings")
269271 iconName: "settings"
270272 visible: root.settingsEnabled
271273 onTriggered: {
272274 root.settingsClicked()
273275 }
276+ },
277+ Action {
278+ objectName: "favorite"
279+ text: root.scope && root.scope.favorite ? i18n.tr("Remove from Dash") : i18n.tr("Add to Dash")
280+ iconName: root.scope && root.scope.favorite ? "starred" : "non-starred"
281+ visible: root.favoriteEnabled
282+ onTriggered: {
283+ root.favoriteClicked()
284+ }
274285 }
286+
275287 ]
276288 }
277289