mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
Browser: Add option to open BrowserSettings from Browser :^)
This commit is contained in:
parent
1606f70f0c
commit
8aa1c7f5b0
2 changed files with 11 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "Tab.h"
|
#include "Tab.h"
|
||||||
#include <Applications/Browser/BrowserWindowGML.h>
|
#include <Applications/Browser/BrowserWindowGML.h>
|
||||||
#include <LibConfig/Client.h>
|
#include <LibConfig/Client.h>
|
||||||
|
#include <LibCore/Process.h>
|
||||||
#include <LibCore/StandardPaths.h>
|
#include <LibCore/StandardPaths.h>
|
||||||
#include <LibCore/Stream.h>
|
#include <LibCore/Stream.h>
|
||||||
#include <LibGUI/AboutDialog.h>
|
#include <LibGUI/AboutDialog.h>
|
||||||
|
@ -274,6 +275,13 @@ void BrowserWindow::build_menus()
|
||||||
add_color_scheme_action("Dark", Web::CSS::PreferredColorScheme::Dark);
|
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");
|
auto& debug_menu = add_menu("&Debug");
|
||||||
debug_menu.add_action(GUI::Action::create(
|
debug_menu.add_action(GUI::Action::create(
|
||||||
"Dump &DOM Tree", g_icon_bag.dom_tree, [this](auto&) {
|
"Dump &DOM Tree", g_icon_bag.dom_tree, [this](auto&) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
return 1;
|
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;
|
const char* specified_url = nullptr;
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
|
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
|
||||||
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
|
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
|
||||||
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
|
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
|
||||||
|
TRY(Core::System::unveil("/bin/BrowserSettings", "x"));
|
||||||
TRY(Core::System::unveil(nullptr, nullptr));
|
TRY(Core::System::unveil(nullptr, nullptr));
|
||||||
|
|
||||||
auto app_icon = GUI::Icon::default_icon("app-browser");
|
auto app_icon = GUI::Icon::default_icon("app-browser");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue