From 71db78a0f6402bc6c86540086d9d2c543a2527c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 28 Apr 2021 12:15:20 +0200 Subject: [PATCH] Use "window.close" action instead of "close-request" --- src/actions.js | 2 +- src/playlist.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/actions.js b/src/actions.js index e7a49dea..206d5799 100644 --- a/src/actions.js +++ b/src/actions.js @@ -77,7 +77,7 @@ function handleAction(action, window) player.playlistWidget.changeRepeatMode(); break; case 'quit': - clapperWidget.root.emit('close-request'); + clapperWidget.activate_action('window.close', null); break; case 'toggle_play': case 'next_chapter': diff --git a/src/playlist.js b/src/playlist.js index c16820b0..7e65d649 100644 --- a/src/playlist.js +++ b/src/playlist.js @@ -34,9 +34,7 @@ class ClapperPlaylistWidget extends Gtk.ListBox const itemIndex = item.get_index(); if(itemIndex === this.activeRowId) { - const root = this.get_root(); - root.emit('close-request'); - + this.activate_action('window.close', null); return; }