Applicatiosn/OS/ShutDown.app: Update MessageBox API
This commit is contained in:
parent
bfa41f334b
commit
b7952b1cb8
1 changed files with 11 additions and 17 deletions
|
@ -2,24 +2,18 @@ Gui.App();
|
||||||
|
|
||||||
U0 @shutdown_callback(U64 o)
|
U0 @shutdown_callback(U64 o)
|
||||||
{
|
{
|
||||||
if (!o)
|
Window* win = NULL;
|
||||||
return;
|
|
||||||
if (o(Window*)->signature == WIN_SIGNATURE) {
|
if (o(Window*)->signature == WIN_SIGNATURE) {
|
||||||
Compositor.DestroyWindow(o(Window*));
|
win = o;
|
||||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
} else {
|
||||||
return;
|
if (o(Widget*)->tag) {
|
||||||
}
|
System.PowerOff();
|
||||||
switch (o(Widget*)->tag) {
|
} else {
|
||||||
case TRUE:
|
win = o(Widget*)->parent_win;
|
||||||
System.PowerOff();
|
}
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Compositor.DestroyWindow(o(Widget*)->parent_win);
|
|
||||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
|
||||||
return;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
Compositor.DestroyWindow(win);
|
||||||
|
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Alert("Do you want to shut down this computer?",
|
MessageBox.Confirm("Do you want to shut down this computer?", &@shutdown_callback);
|
||||||
"[\"OK\",\"Cancel\"]", &@shutdown_callback);
|
|
Loading…
Add table
Add a link
Reference in a new issue