xref: /haiku/src/tests/servers/registrar/user_shutdown_reply.cpp (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
1 /*
2  * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include <Alert.h>
7 #include <Application.h>
8 
9 class TestApp : public BApplication {
10 public:
11 	TestApp()
12 		: BApplication("application/x-vnd.haiku.user-shutdown-reply")
13 	{
14 	}
15 
16 	virtual bool QuitRequested()
17 	{
18 		BAlert *alert = new BAlert("Quit App?",
19 			"Quit application user_shutdown_reply?",
20 			"Quit", "Cancel", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
21 		int32 result = alert->Go();
22 
23 		return (result == 0);
24 	}
25 };
26 
27 int
28 main()
29 {
30 	TestApp app;
31 	app.Run();
32 
33 	return 0;
34 }
35