summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applets/Audio/main.cpp2
-rw-r--r--Userland/Applications/Browser/BrowserWindow.cpp8
-rw-r--r--Userland/Applications/Browser/DownloadWidget.cpp2
-rw-r--r--Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp2
-rw-r--r--Userland/Applications/FileManager/main.cpp2
-rw-r--r--Userland/Applications/HexEditor/HexEditorWidget.cpp2
-rw-r--r--Userland/Applications/IRCClient/IRCClient.cpp2
-rw-r--r--Userland/Applications/KeyboardSettings/main.cpp2
-rw-r--r--Userland/Applications/MailSettings/MailSettingsWindow.cpp2
-rw-r--r--Userland/Applications/Terminal/main.cpp2
-rw-r--r--Userland/Applications/TextEditor/MainWidget.cpp2
-rw-r--r--Userland/Games/2048/main.cpp2
-rw-r--r--Userland/Games/Chess/main.cpp2
-rw-r--r--Userland/Games/FlappyBug/main.cpp2
-rw-r--r--Userland/Games/Hearts/main.cpp2
-rw-r--r--Userland/Games/Minesweeper/Field.cpp4
-rw-r--r--Userland/Games/Snake/SnakeGame.cpp2
-rw-r--r--Userland/Games/Solitaire/main.cpp2
-rw-r--r--Userland/Games/Spider/main.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Desktop.cpp2
-rw-r--r--Userland/Services/AudioServer/main.cpp2
-rw-r--r--Userland/Services/WindowServer/ClientConnection.cpp2
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp2
-rw-r--r--Userland/Utilities/ini.cpp2
-rw-r--r--Userland/Utilities/keymap.cpp2
25 files changed, 29 insertions, 29 deletions
diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp
index a39611ea85..1d00dee0ad 100644
--- a/Userland/Applets/Audio/main.cpp
+++ b/Userland/Applets/Audio/main.cpp
@@ -211,7 +211,7 @@ int main(int argc, char** argv)
return 1;
}
- auto config = Core::ConfigFile::get_for_app("AudioApplet");
+ auto config = Core::ConfigFile::get_for_app("AudioApplet", Core::ConfigFile::AllowWriting::Yes);
// To not upset the audio server state, we responsibly read this once.
auto audio_master_config = Core::ConfigFile::get_for_app("Audio");
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);
};
diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
index b2a5028aaa..ccda3af442 100644
--- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
+++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
@@ -118,7 +118,7 @@ void BackgroundSettingsWidget::load_current_settings()
void BackgroundSettingsWidget::apply_settings()
{
- auto wm_config = Core::ConfigFile::get_for_app("WindowManager");
+ auto wm_config = Core::ConfigFile::get_for_app("WindowManager", Core::ConfigFile::AllowWriting::Yes);
wm_config->write_entry("Background", "Wallpaper", m_monitor_widget->wallpaper());
if (!m_monitor_widget->wallpaper().is_empty()) {
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp
index 466728cb7e..4e09c9aa47 100644
--- a/Userland/Applications/FileManager/main.cpp
+++ b/Userland/Applications/FileManager/main.cpp
@@ -75,7 +75,7 @@ int main(int argc, char** argv)
return 1;
}
- RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("FileManager");
+ RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("FileManager", Core::ConfigFile::AllowWriting::Yes);
Core::ArgsParser args_parser;
bool is_desktop_mode { false }, is_selection_mode { false }, ignore_path_resolution { false };
diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp
index a3110ecda5..c064a7f8b2 100644
--- a/Userland/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp
@@ -35,7 +35,7 @@ HexEditorWidget::HexEditorWidget()
{
load_from_gml(hex_editor_window_gml);
- m_config = Core::ConfigFile::get_for_app("HexEditor");
+ m_config = Core::ConfigFile::get_for_app("HexEditor", Core::ConfigFile::AllowWriting::Yes);
m_toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
diff --git a/Userland/Applications/IRCClient/IRCClient.cpp b/Userland/Applications/IRCClient/IRCClient.cpp
index d4f3692ab1..f95a6cc7a1 100644
--- a/Userland/Applications/IRCClient/IRCClient.cpp
+++ b/Userland/Applications/IRCClient/IRCClient.cpp
@@ -47,7 +47,7 @@ IRCClient::IRCClient(String server, int port)
: m_nickname("seren1ty")
, m_client_window_list_model(IRCWindowListModel::create(*this))
, m_log(IRCLogBuffer::create())
- , m_config(Core::ConfigFile::get_for_app("IRCClient"))
+ , m_config(Core::ConfigFile::get_for_app("IRCClient", Core::ConfigFile::AllowWriting::Yes))
{
struct passwd* user_pw = getpwuid(getuid());
m_socket = Core::TCPSocket::construct(this);
diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp
index 091621cfde..5e30a1dc9f 100644
--- a/Userland/Applications/KeyboardSettings/main.cpp
+++ b/Userland/Applications/KeyboardSettings/main.cpp
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
return 1;
}
- auto config = Core::ConfigFile::get_for_app("KeyboardSettings");
+ auto config = Core::ConfigFile::get_for_app("KeyboardSettings", Core::ConfigFile::AllowWriting::Yes);
if (unveil(config->filename().characters(), "rwc") < 0) {
perror("unveil");
return 1;
diff --git a/Userland/Applications/MailSettings/MailSettingsWindow.cpp b/Userland/Applications/MailSettings/MailSettingsWindow.cpp
index b3c7aeb893..c968a715f4 100644
--- a/Userland/Applications/MailSettings/MailSettingsWindow.cpp
+++ b/Userland/Applications/MailSettings/MailSettingsWindow.cpp
@@ -43,7 +43,7 @@ void MailSettingsWindow::write_values()
MailSettingsWindow::MailSettingsWindow()
{
- m_config = Core::ConfigFile::get_for_app("Mail");
+ m_config = Core::ConfigFile::get_for_app("Mail", Core::ConfigFile::AllowWriting::Yes);
if (unveil(m_config->filename().characters(), "rwc") < 0) {
perror("unveil");
GUI::Application::the()->quit();
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp
index dd67defb99..baaec8313c 100644
--- a/Userland/Applications/Terminal/main.cpp
+++ b/Userland/Applications/Terminal/main.cpp
@@ -291,7 +291,7 @@ int main(int argc, char** argv)
return 1;
}
- RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal");
+ RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal", Core::ConfigFile::AllowWriting::Yes);
Core::File::ensure_parent_directories(config->filename());
int ptm_fd;
diff --git a/Userland/Applications/TextEditor/MainWidget.cpp b/Userland/Applications/TextEditor/MainWidget.cpp
index 1c03a0035c..ac98492029 100644
--- a/Userland/Applications/TextEditor/MainWidget.cpp
+++ b/Userland/Applications/TextEditor/MainWidget.cpp
@@ -47,7 +47,7 @@ MainWidget::MainWidget()
{
load_from_gml(text_editor_window_gml);
- m_config = Core::ConfigFile::get_for_app("TextEditor");
+ m_config = Core::ConfigFile::get_for_app("TextEditor", Core::ConfigFile::AllowWriting::Yes);
m_toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp
index 22a5d5fd94..eb7b9aeccf 100644
--- a/Userland/Games/2048/main.cpp
+++ b/Userland/Games/2048/main.cpp
@@ -37,7 +37,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
- auto config = Core::ConfigFile::get_for_app("2048");
+ auto config = Core::ConfigFile::get_for_app("2048", Core::ConfigFile::AllowWriting::Yes);
size_t board_size = config->read_num_entry("", "board_size", 4);
u32 target_tile = config->read_num_entry("", "target_tile", 2048);
diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp
index e4679f75ab..b883eb9a98 100644
--- a/Userland/Games/Chess/main.cpp
+++ b/Userland/Games/Chess/main.cpp
@@ -26,7 +26,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
auto& widget = window->set_main_widget<ChessWidget>();
- RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Chess");
+ RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Chess", Core::ConfigFile::AllowWriting::Yes);
if (pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec", nullptr) < 0) {
perror("pledge");
diff --git a/Userland/Games/FlappyBug/main.cpp b/Userland/Games/FlappyBug/main.cpp
index a8209337c8..cfce33f1a7 100644
--- a/Userland/Games/FlappyBug/main.cpp
+++ b/Userland/Games/FlappyBug/main.cpp
@@ -22,7 +22,7 @@ int main(int argc, char** argv)
}
auto app = GUI::Application::construct(argc, argv);
- auto config = Core::ConfigFile::get_for_app("FlappyBug");
+ auto config = Core::ConfigFile::get_for_app("FlappyBug", Core::ConfigFile::AllowWriting::Yes);
if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) {
perror("pledge");
diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp
index 8a020d4b69..73c9b8da21 100644
--- a/Userland/Games/Hearts/main.cpp
+++ b/Userland/Games/Hearts/main.cpp
@@ -26,7 +26,7 @@ int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
auto app_icon = GUI::Icon::default_icon("app-hearts");
- auto config = Core::ConfigFile::get_for_app("Hearts");
+ auto config = Core::ConfigFile::get_for_app("Hearts", Core::ConfigFile::AllowWriting::Yes);
if (pledge("stdio recvfd sendfd rpath wpath cpath", nullptr) < 0) {
perror("pledge");
diff --git a/Userland/Games/Minesweeper/Field.cpp b/Userland/Games/Minesweeper/Field.cpp
index 26c563745d..9191552be4 100644
--- a/Userland/Games/Minesweeper/Field.cpp
+++ b/Userland/Games/Minesweeper/Field.cpp
@@ -488,7 +488,7 @@ void Field::set_field_size(size_t rows, size_t columns, size_t mine_count)
if (m_rows == rows && m_columns == columns && m_mine_count == mine_count)
return;
{
- auto config = Core::ConfigFile::get_for_app("Minesweeper");
+ auto config = Core::ConfigFile::get_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
config->write_num_entry("Game", "MineCount", mine_count);
config->write_num_entry("Game", "Rows", rows);
config->write_num_entry("Game", "Columns", columns);
@@ -503,7 +503,7 @@ void Field::set_field_size(size_t rows, size_t columns, size_t mine_count)
void Field::set_single_chording(bool enabled)
{
- auto config = Core::ConfigFile::get_for_app("Minesweeper");
+ auto config = Core::ConfigFile::get_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
m_single_chording = enabled;
config->write_bool_entry("Minesweeper", "SingleChording", m_single_chording);
}
diff --git a/Userland/Games/Snake/SnakeGame.cpp b/Userland/Games/Snake/SnakeGame.cpp
index 328a0ae255..e8bf10737e 100644
--- a/Userland/Games/Snake/SnakeGame.cpp
+++ b/Userland/Games/Snake/SnakeGame.cpp
@@ -131,7 +131,7 @@ void SnakeGame::timer_event(Core::TimerEvent&)
m_high_score = m_score;
m_high_score_text = String::formatted("Best: {}", m_high_score);
update(high_score_rect());
- auto config = Core::ConfigFile::get_for_app("Snake");
+ auto config = Core::ConfigFile::get_for_app("Snake", Core::ConfigFile::AllowWriting::Yes);
config->write_num_entry("Snake", "HighScore", m_high_score);
}
update(score_rect());
diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp
index 7bec5ccf4d..a51fca313b 100644
--- a/Userland/Games/Solitaire/main.cpp
+++ b/Userland/Games/Solitaire/main.cpp
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
auto app_icon = GUI::Icon::default_icon("app-solitaire");
- auto config = Core::ConfigFile::get_for_app("Solitaire");
+ auto config = Core::ConfigFile::get_for_app("Solitaire", Core::ConfigFile::AllowWriting::Yes);
if (pledge("stdio recvfd sendfd rpath wpath cpath", nullptr) < 0) {
perror("pledge");
diff --git a/Userland/Games/Spider/main.cpp b/Userland/Games/Spider/main.cpp
index 262474811d..fa2c8cd4d3 100644
--- a/Userland/Games/Spider/main.cpp
+++ b/Userland/Games/Spider/main.cpp
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
auto app_icon = GUI::Icon::default_icon("app-spider");
- auto config = Core::ConfigFile::get_for_app("Spider");
+ auto config = Core::ConfigFile::get_for_app("Spider", Core::ConfigFile::AllowWriting::Yes);
if (pledge("stdio recvfd sendfd rpath wpath cpath", nullptr) < 0) {
perror("pledge");
diff --git a/Userland/Libraries/LibGUI/Desktop.cpp b/Userland/Libraries/LibGUI/Desktop.cpp
index ee4b56d530..90c05247d1 100644
--- a/Userland/Libraries/LibGUI/Desktop.cpp
+++ b/Userland/Libraries/LibGUI/Desktop.cpp
@@ -59,7 +59,7 @@ bool Desktop::set_wallpaper(const StringView& path, bool save_config)
auto ret_val = WindowServerConnection::the().wait_for_specific_message<Messages::WindowClient::SetWallpaperFinished>()->success();
if (ret_val && save_config) {
- RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("WindowManager");
+ RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("WindowManager", Core::ConfigFile::AllowWriting::Yes);
dbgln("Saving wallpaper path '{}' to config file at {}", path, config->filename());
config->write_entry("Background", "Wallpaper", path);
config->sync();
diff --git a/Userland/Services/AudioServer/main.cpp b/Userland/Services/AudioServer/main.cpp
index e2f38f7652..1eeea8d4e3 100644
--- a/Userland/Services/AudioServer/main.cpp
+++ b/Userland/Services/AudioServer/main.cpp
@@ -17,7 +17,7 @@ int main(int, char**)
return 1;
}
- auto config = Core::ConfigFile::get_for_app("Audio");
+ auto config = Core::ConfigFile::get_for_app("Audio", Core::ConfigFile::AllowWriting::Yes);
if (unveil(config->filename().characters(), "rwc") < 0) {
perror("unveil");
return 1;
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp
index 2214b0f465..035f329047 100644
--- a/Userland/Services/WindowServer/ClientConnection.cpp
+++ b/Userland/Services/WindowServer/ClientConnection.cpp
@@ -777,7 +777,7 @@ Messages::WindowServer::SetSystemFontsResponse ClientConnection::set_system_font
WindowManager::the().invalidate_after_theme_or_font_change();
- auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
+ auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini", Core::ConfigFile::AllowWriting::Yes);
wm_config->write_entry("Fonts", "Default", default_font_query);
wm_config->write_entry("Fonts", "FixedWidth", fixed_width_font_query);
return true;
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index 5212baad15..3bfd4ebab5 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -66,7 +66,7 @@ RefPtr<Cursor> WindowManager::get_cursor(String const& name)
void WindowManager::reload_config()
{
- m_config = Core::ConfigFile::open("/etc/WindowServer.ini");
+ m_config = Core::ConfigFile::open("/etc/WindowServer.ini", Core::ConfigFile::AllowWriting::Yes);
unsigned virtual_desktop_rows = (unsigned)m_config->read_num_entry("VirtualDesktop", "Rows", default_window_stack_rows);
unsigned virtual_desktop_columns = (unsigned)m_config->read_num_entry("VirtualDesktop", "Columns", default_window_stack_columns);
diff --git a/Userland/Utilities/ini.cpp b/Userland/Utilities/ini.cpp
index 72db021dca..2c164eead8 100644
--- a/Userland/Utilities/ini.cpp
+++ b/Userland/Utilities/ini.cpp
@@ -34,7 +34,7 @@ int main(int argc, char** argv)
return 1;
}
- auto config = Core::ConfigFile::open(path);
+ auto config = Core::ConfigFile::open(path, value_to_write ? Core::ConfigFile::AllowWriting::Yes : Core::ConfigFile::AllowWriting::No);
if (value_to_write) {
config->write_entry(group, key, value_to_write);
diff --git a/Userland/Utilities/keymap.cpp b/Userland/Utilities/keymap.cpp
index 5fb65d2bae..693a044805 100644
--- a/Userland/Utilities/keymap.cpp
+++ b/Userland/Utilities/keymap.cpp
@@ -68,7 +68,7 @@ int main(int argc, char** argv)
return rc;
}
- auto mapper_config(Core::ConfigFile::open("/etc/Keyboard.ini"));
+ auto mapper_config(Core::ConfigFile::open("/etc/Keyboard.ini", Core::ConfigFile::AllowWriting::Yes));
mapper_config->write_entry("Mapping", "Keymap", path);
mapper_config->sync();