1f877fb74SAxel Dörfler /* 2987acd11SAdrien Destugues * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3f877fb74SAxel Dörfler * Distributed under the terms of the MIT License. 4f877fb74SAxel Dörfler */ 5f877fb74SAxel Dörfler 6f877fb74SAxel Dörfler 7f877fb74SAxel Dörfler #include "VirtualMemory.h" 8f877fb74SAxel Dörfler #include "SettingsWindow.h" 9f877fb74SAxel Dörfler 10f877fb74SAxel Dörfler #include <Alert.h> 11*b8838e91SHamish Morrison #include <Catalog.h> 12f877fb74SAxel Dörfler #include <TextView.h> 13f877fb74SAxel Dörfler 14f877fb74SAxel Dörfler 15546208a5SOliver Tappe #undef B_TRANSLATION_CONTEXT 16546208a5SOliver Tappe #define B_TRANSLATION_CONTEXT "VirtualMemoryApp" 17eb7157a4SAdrien Destugues 18eb7157a4SAdrien Destugues VirtualMemory()19f877fb74SAxel DörflerVirtualMemory::VirtualMemory() 20f877fb74SAxel Dörfler : BApplication("application/x-vnd.Haiku-VirtualMemory") 21f877fb74SAxel Dörfler { 22f877fb74SAxel Dörfler } 23f877fb74SAxel Dörfler 24f877fb74SAxel Dörfler ~VirtualMemory()25f877fb74SAxel DörflerVirtualMemory::~VirtualMemory() 26f877fb74SAxel Dörfler { 27f877fb74SAxel Dörfler } 28f877fb74SAxel Dörfler 29f877fb74SAxel Dörfler 30f877fb74SAxel Dörfler void ReadyToRun()31f877fb74SAxel DörflerVirtualMemory::ReadyToRun() 32f877fb74SAxel Dörfler { 33f877fb74SAxel Dörfler BWindow* window = new SettingsWindow(); 34f877fb74SAxel Dörfler window->Show(); 35f877fb74SAxel Dörfler } 36f877fb74SAxel Dörfler 37f877fb74SAxel Dörfler 38f877fb74SAxel Dörfler void AboutRequested()39f877fb74SAxel DörflerVirtualMemory::AboutRequested() 40f877fb74SAxel Dörfler { 41733c3ae4SMatt Madia BAlert* alert = new BAlert("about", B_TRANSLATE("VirtualMemory\n" 42f877fb74SAxel Dörfler "\twritten by Axel Dörfler\n" 43733c3ae4SMatt Madia "\tCopyright 2005, Haiku.\n"), B_TRANSLATE("OK")); 44f877fb74SAxel Dörfler BTextView* view = alert->TextView(); 45f877fb74SAxel Dörfler BFont font; 46f877fb74SAxel Dörfler 47f877fb74SAxel Dörfler view->SetStylable(true); 48f877fb74SAxel Dörfler 49f877fb74SAxel Dörfler view->GetFont(&font); 50f877fb74SAxel Dörfler font.SetSize(18); 51f877fb74SAxel Dörfler font.SetFace(B_BOLD_FACE); 52f877fb74SAxel Dörfler view->SetFontAndColor(0, 13, &font); 53f877fb74SAxel Dörfler 54aed35104SHumdinger alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); 55f877fb74SAxel Dörfler alert->Go(); 56f877fb74SAxel Dörfler } 57f877fb74SAxel Dörfler 58f877fb74SAxel Dörfler 59f877fb74SAxel Dörfler int main(int argc,char ** argv)60f877fb74SAxel Dörflermain(int argc, char** argv) 61f877fb74SAxel Dörfler { 62f877fb74SAxel Dörfler VirtualMemory app; 63f877fb74SAxel Dörfler app.Run(); 64f877fb74SAxel Dörfler 65f877fb74SAxel Dörfler return 0; 66f877fb74SAxel Dörfler } 67