mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +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
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "ClockWidget.h"
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/Process.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Process.h>
|
||||
#include <LibGUI/SeparatorWidget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Font/FontDatabase.h>
|
||||
|
@ -153,8 +153,8 @@ ClockWidget::ClockWidget()
|
|||
m_calendar_launcher->set_fixed_size(24, 24);
|
||||
m_calendar_launcher->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-calendar.png").release_value_but_fixme_should_propagate_errors());
|
||||
m_calendar_launcher->set_tooltip("Calendar");
|
||||
m_calendar_launcher->on_click = [](auto) {
|
||||
MUST(Core::Process::spawn("/bin/Calendar"));
|
||||
m_calendar_launcher->on_click = [this](auto) {
|
||||
GUI::Process::spawn_or_show_error(window(), "/bin/Calendar");
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue