mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Close app when removing active item from playlist
Make playlist remove button act the same as close button for currently playing file. This allows using it to close the app without leaving fullscreen.
This commit is contained in:
@@ -22,10 +22,12 @@ class ClapperPlaylistWidget extends Gtk.ListBox
|
||||
{
|
||||
const itemIndex = item.get_index();
|
||||
|
||||
/* TODO: Handle this case somehow (should app quit?)
|
||||
* or disable remove button */
|
||||
if(itemIndex === this.activeRowId)
|
||||
if(itemIndex === this.activeRowId) {
|
||||
const root = this.get_root();
|
||||
root.emit('close-request');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(itemIndex < this.activeRowId)
|
||||
this.activeRowId--;
|
||||
|
Reference in New Issue
Block a user