1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Userland: Make IPC results with one return value available directly

This changes client methods so that they return the IPC response's
return value directly - instead of the response struct - for IPC
methods which only have a single return value.
This commit is contained in:
Gunnar Beutner 2021-05-03 13:55:29 +02:00 committed by Andreas Kling
parent 5bb79ea0a7
commit eb21aa65d1
18 changed files with 58 additions and 111 deletions

View file

@ -48,12 +48,12 @@ MouseSettingsWindow::MouseSettingsWindow()
m_speed_slider->on_change = [&](const int value) {
m_speed_label->set_text(String::formatted("{} %", value));
};
const int slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().get_mouse_acceleration().factor();
const int slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().get_mouse_acceleration();
m_speed_slider->set_value(slider_value);
m_scroll_length_spinbox = *main_widget.find_descendant_of_type_named<GUI::SpinBox>("scroll_length_spinbox");
m_scroll_length_spinbox->set_min(WindowServer::scroll_step_size_min);
m_scroll_length_spinbox->set_value(GUI::WindowServerConnection::the().get_scroll_step_size().step_size());
m_scroll_length_spinbox->set_value(GUI::WindowServerConnection::the().get_scroll_step_size());
m_double_click_speed_label = *main_widget.find_descendant_of_type_named<GUI::Label>("double_click_speed_label");
m_double_click_speed_slider = *main_widget.find_descendant_of_type_named<GUI::HorizontalSlider>("double_click_speed_slider");
@ -62,7 +62,7 @@ MouseSettingsWindow::MouseSettingsWindow()
m_double_click_speed_slider->on_change = [&](const int value) {
m_double_click_speed_label->set_text(String::formatted("{} ms", value));
};
m_double_click_speed_slider->set_value(GUI::WindowServerConnection::the().get_double_click_speed().speed());
m_double_click_speed_slider->set_value(GUI::WindowServerConnection::the().get_double_click_speed());
m_ok_button = *main_widget.find_descendant_of_type_named<GUI::Button>("ok_button");
m_ok_button->on_click = [this](auto) {