Commit 0eebfbb3 authored by camilo higuita's avatar camilo higuita

bring back some features: dedicated apppend icon, dont autoclose mainplaylist...

bring back some features: dedicated apppend icon, dont autoclose mainplaylist in modal mode, correctly create cache directory in android, add save list to mainplaylist
parent 8d5635fb
......@@ -401,7 +401,7 @@ Maui.ApplicationWindow
id: _drawer
width: visible ? Math.min(Kirigami.Units.gridUnit * (Kirigami.Settings.isMobile? 18 : 15), root.width) : 0
modal: !isWide
closePolicy: Popup.CloseOnEscapse | Popup.NoAutoClose
height: _drawer.modal ? implicitHeight - _mainPage.footer.height : implicitHeight
MainPlaylist
......
......@@ -247,11 +247,10 @@ inline QString getNameFromLocation(const QString &str)
}
const QString SettingPath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)+"/vvave/").toLocalFile();
const QString ArtworkPath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/vvave/artwork/").toString();
const QString CollectionDBPath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/vvave/").toLocalFile();
#ifdef Q_OS_ANDROID
const QString CachePath = BAE::ArtworkPath;
const QString CachePath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/vvave/").toString();
#else
const QString CachePath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)+"/vvave/").toString();
#endif
......
......@@ -23,7 +23,7 @@ BabeList
property bool trackNumberVisible
property bool coverArtVisible : false
property bool allowMenu: true
property bool showQuickActions : true
property bool group : false
property alias contextMenu : contextMenu
......@@ -52,15 +52,14 @@ BabeList
ToolButton
{
id : playAllBtn
// text: qsTr("Play all")
icon.name : "media-playlist-play"
onClicked: playAll()
},
ToolButton
{
id: appendBtn
// text: qsTr("Append")
icon.name : "media-playlist-append"//"media-repeat-track-amarok"
icon.name : "media-playlist-append"
onClicked: appendAll()
}]
......@@ -186,7 +185,8 @@ BabeList
listView.header: Maui.ToolBar
{
Kirigami.Theme.backgroundColor: control.Kirigami.Theme.backgroundColor
Kirigami.Theme.inherit: false
// Kirigami.Theme.backgroundColor: control.Kirigami.Theme.backgroundColor
visible: _filterButton.checked && _filterButton.visible
width: control.width
position: ToolBar.Header
......@@ -259,7 +259,7 @@ BabeList
onOpenWithClicked: Maui.FM.openLocation([list.get(listView.currentIndex).url])
onRemoveClicked:
onDeleteClicked:
{
_removeDialog.index= listView.currentIndex
_removeDialog.open()
......@@ -337,12 +337,10 @@ BabeList
delegate: TableDelegate
{
id: delegate
width: listView.width
number : trackNumberVisible ? true : false
coverArt : coverArtVisible ? (control.width > 200) : coverArtVisible
showQuickActions: control.showQuickActions
onPressAndHold: if(Kirigami.Settings.isMobile && allowMenu) openItemMenu(index)
onRightClicked: if(allowMenu) openItemMenu(index)
......@@ -424,7 +422,7 @@ BabeList
if(list.count > 0)
{
for(var i = 0; i < list.count; ++i)
trackList.push(list.get(i).url)
trackList.push(listModel.get(i).url)
playlistDialog.tracks = trackList
playlistDialog.open()
......
......@@ -15,13 +15,12 @@ Maui.ItemDelegate
isCurrentItem: ListView.isCurrentItem || isSelected
property bool showQuickActions: true
property bool number : false
property bool coverArt : false
property bool showEmblem: true
property bool keepEmblemOverlay: selectionMode
property bool isSelected : false
property string trackMood : model.color
readonly property color bgColor : Kirigami.Theme.backgroundColor
......@@ -99,5 +98,14 @@ Maui.ItemDelegate
iconVisible: !control.sameAlbum && control.coverArt
imageSource: model.artwork ? model.artwork : "qrc:/assets/cover.png"
}
ToolButton
{
Layout.fillHeight: true
Layout.preferredWidth: implicitWidth
visible: showQuickActions && (Kirigami.Settings.isMobile ? true : control.hovered)
icon.name: "media-playlist-append"
onClicked: control.append()
}
}
}
......@@ -34,10 +34,10 @@ Menu
signal infoClicked()
signal copyToClicked()
signal appendClicked()
signal deleteClicked()
property alias menuItem : control.contentData
MenuItem
{
text: qsTr("Select...")
......@@ -84,6 +84,17 @@ Menu
}
}
MenuItem
{
text: qsTr("Remove")
onTriggered:
{
removeClicked()
list.remove(listView.currentIndex)
close()
}
}
MenuSeparator{}
MenuItem
......@@ -94,7 +105,7 @@ Menu
favClicked()
close()
}
}
}
MenuItem
{
......@@ -167,12 +178,11 @@ Menu
MenuItem
{
text: qsTr("Remove")
text: qsTr("Delete")
Kirigami.Theme.textColor: Kirigami.Theme.negativeTextColor
onTriggered:
{
removeClicked()
// listModel.remove(list.currentIndex)
deleteClicked()
close()
}
}
......
......@@ -63,6 +63,12 @@ Maui.ToolBar
}
}
rightContent: ToolButton
{
icon.name: "document-save"
onClicked: mainPlaylist.table.saveList()
}
middleContent: ListView
{
id: _listView
......
......@@ -59,6 +59,7 @@ Maui.Page
holder.body: "Start putting together your playlist!"
holder.emojiSize: Maui.Style.iconSizes.huge
onRowClicked: play(index)
showQuickActions: false
onArtworkDoubleClicked: contextMenu.babeIt(index)
......
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