mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI
This commit is contained in:
parent
2f2671f2d3
commit
7c8541b914
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