1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Port all apps to GApplication.

This commit is contained in:
Andreas Kling 2019-02-11 14:56:23 +01:00
parent 9483b39227
commit 3351f1ccc1
10 changed files with 48 additions and 106 deletions

View file

@ -2,7 +2,7 @@
#include <LibGUI/GWindow.h>
#include <LibGUI/GWidget.h>
#include <LibGUI/GButton.h>
#include <LibGUI/GEventLoop.h>
#include <LibGUI/GApplication.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
@ -19,17 +19,17 @@ void handle_sigchld(int)
ASSERT(pid > 0);
}
int main(int, char**)
int main(int argc, char** argv)
{
signal(SIGCHLD, handle_sigchld);
GApplication app(argc, argv);
GEventLoop loop;
signal(SIGCHLD, handle_sigchld);
auto* launcher_window = make_launcher_window();
launcher_window->set_should_exit_app_on_close(true);
launcher_window->show();
return loop.exec();
return app.exec();
}
class LauncherButton final : public GButton {