Commit dbca6238 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Move applications source menu to the left of the toolbar

It's the most global action of them all
parent d278a003
......@@ -80,6 +80,37 @@ DiscoverPage {
topMargin: Kirigami.Units.smallSpacing
bottomMargin: Kirigami.Units.smallSpacing
}
ToolButton {
text: i18n("Application Sources")
tooltip: i18n("Allows to choose the source that will be used for browsing applications")
menu: Menu {
id: backendsMenu
}
enabled: menu.items.length>0
ExclusiveGroup {
id: select
}
Instantiator {
model: ResourcesModel.applicationBackends
delegate: MenuItem {
text: modelData.displayName
checkable: true
checked: ResourcesModel.currentApplicationBackend == modelData
onTriggered: ResourcesModel.currentApplicationBackend = modelData
exclusiveGroup: select
}
onObjectAdded: {
backendsMenu.insertItem(index, object)
}
onObjectRemoved: {
object.destroy()
}
}
}
ToolButton {
// iconName: "list-add"
text: i18n("Add Source")
......@@ -128,35 +159,6 @@ DiscoverPage {
}
}
ToolButton {
text: i18n("Application Sources")
menu: Menu {
id: backendsMenu
}
enabled: menu.items.length>0
ExclusiveGroup {
id: select
}
Instantiator {
model: ResourcesModel.applicationBackends
delegate: MenuItem {
text: modelData.displayName
checkable: true
checked: ResourcesModel.currentApplicationBackend == modelData
onTriggered: ResourcesModel.currentApplicationBackend = modelData
exclusiveGroup: select
}
onObjectAdded: {
backendsMenu.insertItem(index, object)
}
onObjectRemoved: {
object.destroy()
}
}
}
ToolButton {
text: i18n("Help...")
menu: Menu {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment