Browser+BrowserSettings: Add preference for new tab

This commit is contained in:
Xexxa 2022-06-25 21:08:17 +02:00 committed by Linus Groh
commit 6571455499
Notes: sideshowbarker 2024-07-17 09:57:27 +09:00
6 changed files with 58 additions and 10 deletions

View file

@ -31,6 +31,7 @@ namespace Browser {
String g_search_engine;
String g_home_url;
String g_new_tab_url;
Vector<String> g_content_filters;
bool g_content_filters_enabled { true };
Vector<String> g_proxies;
@ -94,6 +95,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app_icon = GUI::Icon::default_icon("app-browser");
Browser::g_home_url = Config::read_string("Browser", "Preferences", "Home", "file:///res/html/misc/welcome.html");
Browser::g_new_tab_url = Config::read_string("Browser", "Preferences", "NewTab", "file:///res/html/misc/welcome.html");
Browser::g_search_engine = Config::read_string("Browser", "Preferences", "SearchEngine", {});
Browser::g_content_filters_enabled = Config::read_bool("Browser", "Preferences", "EnableContentFilters", true);