mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:47:34 +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:
parent
5bb79ea0a7
commit
eb21aa65d1
18 changed files with 58 additions and 111 deletions
|
@ -178,7 +178,7 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
|
|||
quick_sort(g_themes, [](auto& a, auto& b) { return a.name < b.name; });
|
||||
}
|
||||
|
||||
auto current_theme_name = GUI::WindowServerConnection::the().get_system_theme().theme_name();
|
||||
auto current_theme_name = GUI::WindowServerConnection::the().get_system_theme();
|
||||
|
||||
{
|
||||
int theme_identifier = 0;
|
||||
|
@ -186,8 +186,8 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
|
|||
auto action = GUI::Action::create_checkable(theme.name, [theme_identifier](auto&) {
|
||||
auto& theme = g_themes[theme_identifier];
|
||||
dbgln("Theme switched to {} at path {}", theme.name, theme.path);
|
||||
auto response = GUI::WindowServerConnection::the().set_system_theme(theme.path, theme.name);
|
||||
VERIFY(response.success());
|
||||
auto success = GUI::WindowServerConnection::the().set_system_theme(theme.path, theme.name);
|
||||
VERIFY(success);
|
||||
});
|
||||
if (theme.name == current_theme_name)
|
||||
action->set_checked(true);
|
||||
|
|
|
@ -171,12 +171,12 @@ void PageHost::page_did_request_alert(const String& message)
|
|||
|
||||
bool PageHost::page_did_request_confirm(const String& message)
|
||||
{
|
||||
return m_client.did_request_confirm(message).result();
|
||||
return m_client.did_request_confirm(message);
|
||||
}
|
||||
|
||||
String PageHost::page_did_request_prompt(const String& message, const String& default_)
|
||||
{
|
||||
return m_client.did_request_prompt(message, default_).response();
|
||||
return m_client.did_request_prompt(message, default_);
|
||||
}
|
||||
|
||||
void PageHost::page_did_change_favicon(const Gfx::Bitmap& favicon)
|
||||
|
@ -191,7 +191,7 @@ void PageHost::page_did_request_image_context_menu(const Gfx::IntPoint& content_
|
|||
|
||||
String PageHost::page_did_request_cookie(const URL& url, Web::Cookie::Source source)
|
||||
{
|
||||
return m_client.did_request_cookie(url, static_cast<u8>(source)).cookie();
|
||||
return m_client.did_request_cookie(url, static_cast<u8>(source));
|
||||
}
|
||||
|
||||
void PageHost::page_did_set_cookie(const URL& url, const Web::Cookie::ParsedCookie& cookie, Web::Cookie::Source source)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue