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_TRANSLATION_CONTEXT 15 #define B_TRANSLATION_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->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); 54 alert->Go(); 55 } 56 57 58 int 59 main(int argc, char** argv) 60 { 61 VirtualMemory app; 62 app.Run(); 63 64 return 0; 65 } 66