1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 19:05:08 +00:00

LibGUI: Add back/forward actions to GCommonActions

This commit is contained in:
Andreas Kling 2019-10-05 09:21:55 +02:00
parent ee64d99a96
commit 7dd03b7846
4 changed files with 16 additions and 6 deletions

View file

@ -110,13 +110,13 @@ int main(int argc, char* argv[])
free(path);
};
go_back_action = GAction::create("Go Back", { Mod_Alt, Key_Left }, GraphicsBitmap::load_from_file("/res/icons/16x16/go-back.png"), [&](const GAction&) {
go_back_action = GCommonActions::make_go_back_action([&](auto&) {
history.go_back();
update_actions();
open_page(history.current());
});
go_forward_action = GAction::create("Go Forward", { Mod_Alt, Key_Right }, GraphicsBitmap::load_from_file("/res/icons/16x16/go-forward.png"), [&](const GAction&) {
go_forward_action = GCommonActions::make_go_forward_action([&](auto&) {
history.go_forward();
update_actions();
open_page(history.current());