Commit 1672409d authored by camilo higuita's avatar camilo higuita
Browse files

add holder actions to add sources in case colleciton is empty

parent d6b7536e
......@@ -56,7 +56,7 @@ BinPackArguments: false
# don't move parameters to own lines if they are not all on the same
BinPackParameters: false
# In case we have an if statement whith multiple lines the operator should be at the beginning of the line
# In case we have an if statement with multiple lines the operator should be at the beginning of the line
# but we do not want to break assignments
BreakBeforeBinaryOperators: NonAssignment
......@@ -79,7 +79,7 @@ SpaceAfterTemplateKeyword: false
AlwaysBreakTemplateDeclarations: true
# macros for which the opening brace stays attached.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
# keep lambda formatting multi-line if not empty
AllowShortLambdasOnASingleLine: Empty
......
......@@ -290,11 +290,7 @@ Maui.ApplicationWindow
{
text: i18n("Settings")
icon.name: "settings-configure"
onTriggered:
{
_dialogLoader.sourceComponent = _settingsDialogComponent
dialog.open()
}
onTriggered: openSettingsDialog()
}
MenuItem
......@@ -479,4 +475,10 @@ Maui.ApplicationWindow
root.y = Screen.desktopAvailableHeight - root.preferredMiniModeSize - Maui.Style.space.big
}
}
function openSettingsDialog()
{
_dialogLoader.sourceComponent = _settingsDialogComponent
dialog.open()
}
}
......@@ -26,6 +26,14 @@ StackView
{
id: albumsViewGrid
holder.emoji: "qrc:/assets/dialog-information.svg"
holder.actions:[
Action
{
text: i18n("Add sources")
onTriggered: openSettingsDialog()
}
]
onAlbumCoverClicked: control.populateTable(album, artist)
}
......
......@@ -39,6 +39,11 @@ StackView
emoji: "qrc:/assets/dialog-information.svg"
title : i18n("No Folders!")
body: i18n("Add new music to your sources to browse by folders")
Action
{
text: i18n("Add sources")
onTriggered: openSettingsDialog()
}
}
Maui.ListBrowser
......
import QtQuick.Controls 2.13
import "BabeTable"
import "../db/Queries.js" as Q
......@@ -7,14 +9,28 @@ BabeTable
{
trackNumberVisible: false
coverArtVisible: false
holder.emoji: "qrc:/assets/dialog-information.svg"
holder.title : i18n("No Tracks!")
holder.body: i18n("Add new music sources")
holder.actions:[
Action
{
text: i18n("Add sources")
onTriggered: openSettingsDialog()
},
Action
{
text: i18n("Open file")
}
]
onRowClicked: Player.quickPlay(listModel.get(index))
onAppendTrack: Player.addTrack(listModel.get(index))
onPlayAll: Player.playAllModel(listModel.list)
onAppendAll: Player.appendAllModel( listModel.list)
onAppendAll: Player.appendAllModel(listModel.list)
onQueueTrack: Player.queueTracks([listModel.get(index)], index)
list.query: Q.GET.allTracks
......
Supports Markdown
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