mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI
This commit is contained in:
parent
2f2671f2d3
commit
7c8541b914
Notes:
sideshowbarker
2024-07-17 10:39:48 +09:00
Author: https://github.com/MacDue
Commit: 7c8541b914
Pull-request: https://github.com/SerenityOS/serenity/pull/13999
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/linusg
7 changed files with 39 additions and 26 deletions
|
@ -16,7 +16,6 @@
|
|||
#include "Tab.h"
|
||||
#include <Applications/Browser/BrowserWindowGML.h>
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/Process.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibCore/Stream.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
|
@ -27,6 +26,7 @@
|
|||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Process.h>
|
||||
#include <LibGUI/SeparatorWidget.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
|
@ -301,8 +301,8 @@ void BrowserWindow::build_menus()
|
|||
|
||||
settings_menu.add_separator();
|
||||
auto open_settings_action = GUI::Action::create("&Settings", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/settings.png").release_value_but_fixme_should_propagate_errors(),
|
||||
[](auto&) {
|
||||
MUST(Core::Process::spawn("/bin/BrowserSettings"));
|
||||
[this](auto&) {
|
||||
GUI::Process::spawn_or_show_error(this, "/bin/BrowserSettings");
|
||||
});
|
||||
settings_menu.add_action(move(open_settings_action));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue