« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui.js b/ui.js
index 5302c7c..1c673a5 100644
--- a/ui.js
+++ b/ui.js
@@ -62,8 +62,7 @@ class AppElement extends FocusElement {
     this.form.addInput(this.queueListingElement, false)
 
     this.queueListingElement.on('queue', item => this.playGrouplikeItem(item))
-    this.queueListingElement.on('remove (backspace)', item => this.unqueueGrouplikeItem(item))
-    this.queueListingElement.on('remove (x)', item => this.unqueueGrouplikeItem(item))
+    this.queueListingElement.on('remove', item => this.unqueueGrouplikeItem(item))
     this.queueListingElement.on('shuffle', () => this.shuffleQueue())
     this.queueListingElement.on('clear', () => this.clearQueue())
     this.queueListingElement.on('select main listing',
@@ -135,7 +134,7 @@ class AppElement extends FocusElement {
       }
     }
 
-    grouplikeListing.on('remove (x)', item => {
+    grouplikeListing.on('remove', item => {
       if (this.editMode) {
         const parent = item[parentSymbol]
         const index = parent.items.indexOf(item)
@@ -756,7 +755,7 @@ class GrouplikeListingElement extends FocusElement {
     if (this.grouplike.items.length) {
       for (const item of this.grouplike.items) {
         const itemElement = new GrouplikeItemElement(item, this.recordStore)
-        for (const evtName of ['download', 'remove (backspace)', 'remove (x)', 'mark', 'browse', 'queue', 'menu']) {
+        for (const evtName of ['download', 'remove', 'mark', 'browse', 'queue', 'menu']) {
           itemElement.on(evtName, (...data) => this.emit(evtName, item, ...data))
         }
         form.addInput(itemElement)
@@ -932,10 +931,8 @@ class GrouplikeItemElement extends Button {
       } else {
         this.emit('queue', {where: 'next', play: true})
       }
-    } else if (telc.isBackspace(keyBuf)) {
-      this.emit('remove (backspace)')
     } else if (telc.isCaselessLetter(keyBuf, 'x')) {
-      this.emit('remove (x)')
+      this.emit('remove')
     /*
     } else if (telc.isCaselessLetter(keyBuf, 'm')) {
       this.emit('mark')