diff options
author | networkException <git@nwex.de> | 2021-08-21 16:14:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 01:32:25 +0200 |
commit | 938051feb8d9340657251082f3fd4abffd57b813 (patch) | |
tree | 7d71e8c592b4915dcb4930fde8ba6739f60450f1 /Userland/Applications/Browser | |
parent | 54bbe52b5143954dcdb700207de43343e5102ab8 (diff) | |
download | serenity-938051feb8d9340657251082f3fd4abffd57b813.zip |
Everywhere: Use Core::ConfigFile::AllowWriting::Yes to allow writing
Diffstat (limited to 'Userland/Applications/Browser')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 8 | ||||
-rw-r--r-- | Userland/Applications/Browser/DownloadWidget.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 7b2743a812..8a8658d555 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -277,7 +277,7 @@ void BrowserWindow::build_menus() m_change_homepage_action = GUI::Action::create( "Set Homepage URL", [this](auto&) { - auto config = Core::ConfigFile::get_for_app("Browser"); + auto config = Core::ConfigFile::get_for_app("Browser", Core::ConfigFile::AllowWriting::Yes); String homepage_url = config->read_entry("Preferences", "Home", "about:blank"); if (GUI::InputBox::show(this, homepage_url, "Enter URL", "Change homepage URL") == GUI::InputBox::ExecOK) { if (URL(homepage_url).is_valid()) { @@ -300,7 +300,7 @@ void BrowserWindow::build_menus() auto action = GUI::Action::create_checkable( name, [&](auto&) { g_search_engine = url_format; - auto config = Core::ConfigFile::get_for_app("Browser"); + auto config = Core::ConfigFile::get_for_app("Browser", Core::ConfigFile::AllowWriting::Yes); config->write_entry("Preferences", "SearchEngine", g_search_engine); }, this); @@ -317,7 +317,7 @@ void BrowserWindow::build_menus() m_disable_search_engine_action = GUI::Action::create_checkable( "Disable", [](auto&) { g_search_engine = {}; - auto config = Core::ConfigFile::get_for_app("Browser"); + auto config = Core::ConfigFile::get_for_app("Browser", Core::ConfigFile::AllowWriting::Yes); config->write_entry("Preferences", "SearchEngine", g_search_engine); }, this); @@ -347,7 +347,7 @@ void BrowserWindow::build_menus() } g_search_engine = search_engine; - auto config = Core::ConfigFile::get_for_app("Browser"); + auto config = Core::ConfigFile::get_for_app("Browser", Core::ConfigFile::AllowWriting::Yes); config->write_entry("Preferences", "SearchEngine", g_search_engine); action.set_status_tip(search_engine); }); diff --git a/Userland/Applications/Browser/DownloadWidget.cpp b/Userland/Applications/Browser/DownloadWidget.cpp index d0c0e92a96..ee9aa889b6 100644 --- a/Userland/Applications/Browser/DownloadWidget.cpp +++ b/Userland/Applications/Browser/DownloadWidget.cpp @@ -90,7 +90,7 @@ DownloadWidget::DownloadWidget(const URL& url) m_close_on_finish_checkbox->set_checked(close_on_finish); m_close_on_finish_checkbox->on_checked = [&](bool checked) { - auto browser_config = Core::ConfigFile::get_for_app("Browser"); + auto browser_config = Core::ConfigFile::get_for_app("Browser", Core::ConfigFile::AllowWriting::Yes); browser_config->write_bool_entry("Preferences", "CloseDownloadWidgetOnFinish", checked); }; |