From 3dc160666085bdec5076ad15655cd3ace23cd516 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 25 Jul 2018 13:56:35 -0300 Subject: Tweak how Play context menu item works --- todo.txt | 5 ++++- ui.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/todo.txt b/todo.txt index 76f0c2e..1993e64 100644 --- a/todo.txt +++ b/todo.txt @@ -88,7 +88,7 @@ TODO: Investigate performance issues with very very long ListScrollForms. TODO: At some point, putting mtui downloads in ~/.mtui - but preferrably with a more humanish structure - would be quite nice..! -TODO: Press "M" to show a context menu. +TODO: Press "M" to show a context menu. (Done!) TODO: Figure out a keybinding for Mark (in edit mode) - probably Ctrl-M. (I prefer Ctrl to be used for functions that will open a dialog of some @@ -96,3 +96,6 @@ TODO: Figure out a keybinding for Mark (in edit mode) - probably Ctrl-M. TODO: Only show scrollbars if the form is actually scrollable. (This would make context menus look better.) + +TODO: "Play" (now), in the context menu, should act like a queue-up-next, not a + queue-at-end. (Done!) diff --git a/ui.js b/ui.js index b42c24e..26512e4 100644 --- a/ui.js +++ b/ui.js @@ -123,10 +123,10 @@ class AppElement extends FocusElement { grouplikeListing.on('select (enter)', item => handleSelectFromMain(item)) grouplikeListing.on('select (space)', item => this.handleSpacePressed( () => handleSelectFromMain(item))) - grouplikeListing.on('play', item => this.queueGrouplikeItem(item, playNow)) + grouplikeListing.on('play', item => this.playGrouplikeItem(item)) grouplikeListing.on('queue (at end)', item => this.queueGrouplikeItem(item)) grouplikeListing.on('queue (shuffled)', item => this.shuffleQueueGrouplikeItem(item)) - grouplikeListing.on('queue (play next)', item => this.queueGrouplikeItem(item, true, this.playingTrack)) + grouplikeListing.on('queue (play next)', item => this.queueGrouplikeItem(item, playIfNothingElse, this.playingTrack)) grouplikeListing.on('menu', (item, opts) => this.menu.show(opts)) const updateListingsFor = item => { -- cgit 1.3.0-6-gf8a5