xref: /haiku/src/preferences/virtualmemory/VirtualMemory.cpp (revision 4466b89c65970de4c7236ac87faa2bee4589f413)
1 /*
2  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include "VirtualMemory.h"
8 #include "SettingsWindow.h"
9 
10 #include <Alert.h>
11 #include <TextView.h>
12 
13 
14 #undef B_TRANSLATE_CONTEXT
15 #define B_TRANSLATE_CONTEXT "VirtualMemoryApp"
16 
17 
18 VirtualMemory::VirtualMemory()
19 	: BApplication("application/x-vnd.Haiku-VirtualMemory")
20 {
21 }
22 
23 
24 VirtualMemory::~VirtualMemory()
25 {
26 }
27 
28 
29 void
30 VirtualMemory::ReadyToRun()
31 {
32 	BWindow* window = new SettingsWindow();
33 	window->Show();
34 }
35 
36 
37 void
38 VirtualMemory::AboutRequested()
39 {
40 	BAlert* alert = new BAlert("about", B_TRANSLATE("VirtualMemory\n"
41 		"\twritten by Axel Dörfler\n"
42 		"\tCopyright 2005, Haiku.\n"), B_TRANSLATE("OK"));
43 	BTextView* view = alert->TextView();
44 	BFont font;
45 
46 	view->SetStylable(true);
47 
48 	view->GetFont(&font);
49 	font.SetSize(18);
50 	font.SetFace(B_BOLD_FACE);
51 	view->SetFontAndColor(0, 13, &font);
52 
53 	alert->Go();
54 }
55 
56 
57 int
58 main(int argc, char** argv)
59 {
60 	VirtualMemory app;
61 	app.Run();
62 
63 	return 0;
64 }
65