getting the album name from titleLabel and adding ellipsis after 'Download' option
This commit is contained in:
@@ -201,14 +201,9 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
|
||||
a.page.contr.DoAddTracksToPlaylistWorkflow(
|
||||
sharedutil.TracksToIDs(a.page.tracks))
|
||||
}),
|
||||
fyne.NewMenuItem("Download", func() {
|
||||
go func() {
|
||||
album, err := a.page.mp.GetAlbum(a.albumID)
|
||||
if err != nil {
|
||||
log.Print("Error while getting the album: ", album)
|
||||
}
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks, album.Name)
|
||||
}()
|
||||
fyne.NewMenuItem("Download...", func() {
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks, a.titleLabel.String())
|
||||
|
||||
}))
|
||||
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader {
|
||||
a.page.contr.DoAddTracksToPlaylistWorkflow(
|
||||
sharedutil.TracksToIDs(a.page.tracks))
|
||||
}),
|
||||
fyne.NewMenuItem("Download", func() {
|
||||
fyne.NewMenuItem("Download...", func() {
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks, a.playlistInfo.Name)
|
||||
}))
|
||||
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))
|
||||
|
||||
@@ -175,7 +175,7 @@ func (g *GridViewItem) showContextMenu(pos fyne.Position) {
|
||||
fyne.NewMenuItem("Shuffle", func() { g.onPlay(true) }),
|
||||
fyne.NewMenuItem("Add to queue", g.onAddToQueue),
|
||||
fyne.NewMenuItem("Add to playlist...", g.onAddToPlaylist),
|
||||
fyne.NewMenuItem("Download", g.onDownload)),
|
||||
fyne.NewMenuItem("Download...", g.onDownload)),
|
||||
fyne.CurrentApp().Driver().CanvasForObject(g))
|
||||
}
|
||||
g.menu.ShowAtPosition(pos)
|
||||
|
||||
@@ -510,7 +510,7 @@ func (t *Tracklist) onShowContextMenu(e *fyne.PointEvent, trackIdx int) {
|
||||
}
|
||||
}))
|
||||
t.ctxMenu.Items = append(t.ctxMenu.Items,
|
||||
fyne.NewMenuItem("Download", func() {
|
||||
fyne.NewMenuItem("Download...", func() {
|
||||
t.onDownload(t.selectedTracks(), "Selected tracks")
|
||||
}))
|
||||
t.ctxMenu.Items = append(t.ctxMenu.Items, fyne.NewMenuItemSeparator())
|
||||
|
||||
Reference in New Issue
Block a user