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 <Catalog.h> 12#include <TextView.h> 13 14 15#undef B_TRANSLATION_CONTEXT 16#define B_TRANSLATION_CONTEXT "VirtualMemoryApp" 17 18 19VirtualMemory::VirtualMemory() 20 : BApplication("application/x-vnd.Haiku-VirtualMemory") 21{ 22} 23 24 25VirtualMemory::~VirtualMemory() 26{ 27} 28 29 30void 31VirtualMemory::ReadyToRun() 32{ 33 BWindow* window = new SettingsWindow(); 34 window->Show(); 35} 36 37 38void 39VirtualMemory::AboutRequested() 40{ 41 BAlert* alert = new BAlert("about", B_TRANSLATE("VirtualMemory\n" 42 "\twritten by Axel Dörfler\n" 43 "\tCopyright 2005, Haiku.\n"), B_TRANSLATE("OK")); 44 BTextView* view = alert->TextView(); 45 BFont font; 46 47 view->SetStylable(true); 48 49 view->GetFont(&font); 50 font.SetSize(18); 51 font.SetFace(B_BOLD_FACE); 52 view->SetFontAndColor(0, 13, &font); 53 54 alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); 55 alert->Go(); 56} 57 58 59int 60main(int argc, char** argv) 61{ 62 VirtualMemory app; 63 app.Run(); 64 65 return 0; 66} 67