diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 9589ca6658..c539474003 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -16,6 +16,7 @@ #include "Tab.h" #include #include +#include #include #include #include @@ -274,6 +275,13 @@ void BrowserWindow::build_menus() add_color_scheme_action("Dark", Web::CSS::PreferredColorScheme::Dark); } + settings_menu.add_separator(); + auto open_settings_action = GUI::Action::create("&Settings...", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/settings.png").release_value_but_fixme_should_propagate_errors(), + [](auto&) { + Core::Process::spawn("/bin/BrowserSettings"); + }); + settings_menu.add_action(move(open_settings_action)); + auto& debug_menu = add_menu("&Debug"); debug_menu.add_action(GUI::Action::create( "Dump &DOM Tree", g_icon_bag.dom_tree, [this](auto&) { @@ -544,7 +552,7 @@ void BrowserWindow::config_string_did_change(String const& domain, String const& else if (key == "Home") Browser::g_home_url = value; - // TODO: ColorScheme + // TODO: ColorScheme } void BrowserWindow::config_bool_did_change(String const& domain, String const& group, String const& key, bool value) diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index 4048580bab..39770d437a 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -57,7 +57,7 @@ ErrorOr serenity_main(Main::Arguments arguments) return 1; } - TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath")); + TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath proc exec")); const char* specified_url = nullptr; @@ -83,6 +83,7 @@ ErrorOr serenity_main(Main::Arguments arguments) TRY(Core::System::unveil("/tmp/portal/image", "rw")); TRY(Core::System::unveil("/tmp/portal/webcontent", "rw")); TRY(Core::System::unveil("/tmp/portal/request", "rw")); + TRY(Core::System::unveil("/bin/BrowserSettings", "x")); TRY(Core::System::unveil(nullptr, nullptr)); auto app_icon = GUI::Icon::default_icon("app-browser");