WindowServer: Move configuration file to /etc/WindowServer.ini
This was in the /etc/WindowServer/ directory which had nothing else in it, so let's just get rid of the directory and move this up one step.
This commit is contained in:
parent
b88b19272e
commit
def1f1444a
Notes:
sideshowbarker
2024-07-18 18:53:42 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/def1f1444ae
9 changed files with 13 additions and 13 deletions
|
@ -74,7 +74,7 @@ The `unveil()` system call was first introduced by OpenBSD.
|
|||
unveil("/res", "r");
|
||||
|
||||
// Allow the process to read, write, and create the config file:
|
||||
unveil("/etc/WindowServer/WindowServer.ini", "rwc");
|
||||
unveil("/etc/WindowServer.ini", "rwc");
|
||||
|
||||
// Allow the process to execute Calendar:
|
||||
unveil("/bin/Calendar", "x");
|
||||
|
|
|
@ -46,8 +46,8 @@ $CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so
|
|||
# the permissions needed in the image.
|
||||
chmod -R g+rX,o+rX "$SERENITY_SOURCE_DIR"/Base/* mnt/
|
||||
|
||||
chmod 660 mnt/etc/WindowServer/WindowServer.ini
|
||||
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
|
||||
chmod 660 mnt/etc/WindowServer.ini
|
||||
chown $window_uid:$window_gid mnt/etc/WindowServer.ini
|
||||
echo "/bin/sh" > mnt/etc/shells
|
||||
|
||||
chown 0:$wheel_gid mnt/bin/su
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
unset gtk2_theme gtk3_theme theme path
|
||||
|
||||
+ if [[ "$os" == "SerenityOS" ]]; then
|
||||
+ theme=$(ini /etc/WindowServer/WindowServer.ini Theme Name)
|
||||
+ theme=$(ini /etc/WindowServer.ini Theme Name)
|
||||
+ if [ -z "$theme" ]; then
|
||||
+ theme="Default"
|
||||
+ fi
|
||||
|
|
|
@ -175,7 +175,7 @@ void DisplaySettingsWidget::create_frame()
|
|||
|
||||
void DisplaySettingsWidget::load_current_settings()
|
||||
{
|
||||
auto ws_config(Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini"));
|
||||
auto ws_config(Core::ConfigFile::open("/etc/WindowServer.ini"));
|
||||
auto wm_config = Core::ConfigFile::get_for_app("WindowManager");
|
||||
|
||||
/// Wallpaper path ////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -253,7 +253,7 @@ void DisplaySettingsWidget::load_current_settings()
|
|||
void DisplaySettingsWidget::send_settings_to_window_server()
|
||||
{
|
||||
// Store the current screen resolution and scale factor in case the user wants to revert to it.
|
||||
auto ws_config(Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini"));
|
||||
auto ws_config(Core::ConfigFile::open("/etc/WindowServer.ini"));
|
||||
Gfx::IntSize current_resolution;
|
||||
current_resolution.set_width(ws_config->read_num_entry("Screen", "Width", 1024));
|
||||
current_resolution.set_height(ws_config->read_num_entry("Screen", "Height", 768));
|
||||
|
|
|
@ -20,7 +20,7 @@ AppletManager::AppletManager()
|
|||
{
|
||||
s_the = this;
|
||||
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
|
||||
auto order = wm_config->read_entry("Applet", "Order");
|
||||
order_vector = order.split(',');
|
||||
}
|
||||
|
|
|
@ -738,7 +738,7 @@ OwnPtr<Messages::WindowServer::SetSystemThemeResponse> ClientConnection::handle(
|
|||
|
||||
OwnPtr<Messages::WindowServer::GetSystemThemeResponse> ClientConnection::handle(const Messages::WindowServer::GetSystemTheme&)
|
||||
{
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
|
||||
auto name = wm_config->read_entry("Theme", "Name");
|
||||
return make<Messages::WindowServer::GetSystemThemeResponse>(name);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ NonnullRefPtr<Cursor> WindowManager::get_cursor(const String& name)
|
|||
|
||||
void WindowManager::reload_config()
|
||||
{
|
||||
m_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||
m_config = Core::ConfigFile::open("/etc/WindowServer.ini");
|
||||
|
||||
m_double_click_speed = m_config->read_num_entry("Input", "DoubleClickSpeed", 250);
|
||||
m_hidden_cursor = get_cursor("Hidden");
|
||||
|
@ -1547,7 +1547,7 @@ bool WindowManager::update_theme(String theme_path, String theme_name)
|
|||
});
|
||||
MenuManager::the().did_change_theme();
|
||||
AppletManager::the().did_change_theme();
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
|
||||
wm_config->write_entry("Theme", "Name", theme_name);
|
||||
wm_config->sync();
|
||||
Compositor::the().invalidate_occlusions();
|
||||
|
|
|
@ -34,8 +34,8 @@ int main(int, char**)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (unveil("/etc/WindowServer/WindowServer.ini", "rwc") < 0) {
|
||||
perror("unveil /etc/WindowServer/WindowServer.ini");
|
||||
if (unveil("/etc/WindowServer.ini", "rwc") < 0) {
|
||||
perror("unveil /etc/WindowServer.ini");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ int main(int, char**)
|
|||
return 1;
|
||||
}
|
||||
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
|
||||
auto wm_config = Core::ConfigFile::open("/etc/WindowServer.ini");
|
||||
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
|
||||
|
||||
auto theme = Gfx::load_system_theme(String::formatted("/res/themes/{}.ini", theme_name));
|
||||
|
|
Loading…
Add table
Reference in a new issue