mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
Browser: Use LibConfig instead of Core::ConfigFile
This commit is contained in:
parent
0cd4b8cbb7
commit
6ad63ae71c
4 changed files with 16 additions and 21 deletions
|
@ -10,8 +10,8 @@
|
|||
#include "Tab.h"
|
||||
#include "WindowActions.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
|
@ -52,6 +52,8 @@ int main(int argc, char** argv)
|
|||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
Config::pledge_domains("Browser");
|
||||
|
||||
// Connect to LaunchServer immediately and let it know that we won't ask for anything other than opening
|
||||
// the user's downloads directory.
|
||||
// FIXME: This should go away with a standalone download manager at some point.
|
||||
|
@ -95,9 +97,8 @@ int main(int argc, char** argv)
|
|||
|
||||
auto app_icon = GUI::Icon::default_icon("app-browser");
|
||||
|
||||
auto m_config = Core::ConfigFile::open_for_app("Browser");
|
||||
Browser::g_home_url = m_config->read_entry("Preferences", "Home", "about:blank");
|
||||
Browser::g_search_engine = m_config->read_entry("Preferences", "SearchEngine", {});
|
||||
Browser::g_home_url = Config::read_string("Browser", "Preferences", "Home", "about:blank");
|
||||
Browser::g_search_engine = Config::read_string("Browser", "Preferences", "SearchEngine", {});
|
||||
|
||||
auto ad_filter_list_or_error = Core::File::open(String::formatted("{}/BrowserContentFilters.txt", Core::StandardPaths::config_directory()), Core::OpenMode::ReadOnly);
|
||||
if (!ad_filter_list_or_error.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue