mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-12 05:59:53 +02:00
Meta: Add files to repository
This commit is contained in:
BIN
Applications/OS/ShutDown.app/Icon.png
Normal file
BIN
Applications/OS/ShutDown.app/Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 875 B |
25
Applications/OS/ShutDown.app/Run.HC
Normal file
25
Applications/OS/ShutDown.app/Run.HC
Normal file
@@ -0,0 +1,25 @@
|
||||
Gui.App();
|
||||
|
||||
U0 @shutdown_callback(U64 o)
|
||||
{
|
||||
if (!o)
|
||||
return;
|
||||
if (o(Window*)->signature == WIN_SIGNATURE) {
|
||||
Compositor.DestroyWindow(o(Window*));
|
||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
||||
return;
|
||||
}
|
||||
switch (o(Widget*)->tag) {
|
||||
case TRUE:
|
||||
System.PowerOff();
|
||||
break;
|
||||
default:
|
||||
Compositor.DestroyWindow(o(Widget*)->parent_win);
|
||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Alert("Do you want to shut down this computer?",
|
||||
"[\"OK\",\"Cancel\"]", &@shutdown_callback);
|
||||
Reference in New Issue
Block a user