delegate close action to the browser window

This commit is contained in:
yggverse 2024-09-09 07:45:17 +03:00
parent 881e1b78d6
commit 3f4a5536ca
6 changed files with 23 additions and 15 deletions

View file

@ -151,6 +151,20 @@ Browser::Browser(
"<Primary>Right"
);
// Init actions
const auto ACTION__QUIT = add_action(
"quit",
[this]
{
close();
}
);
APP->set_accel_for_action(
"win.quit",
"<Primary>q"
);
// Init widget
set_title(
_("Yoda")
@ -164,6 +178,7 @@ Browser::Browser(
// Init components
browserHeader = Gtk::make_managed<browser::Header>(
ACTION__DEBUG,
ACTION__QUIT,
ACTION__MAIN_TAB_APPEND,
ACTION__MAIN_TAB_CLOSE_ACTIVE,
ACTION__MAIN_TAB_CLOSE_ALL,