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> 11f877fb74SAxel Dörfler #include <TextView.h> 12f877fb74SAxel Dörfler 13f877fb74SAxel Dörfler 14eb7157a4SAdrien Destugues #undef TR_CONTEXT 15eb7157a4SAdrien Destugues #define TR_CONTEXT "VirtualMemoryApp" 16eb7157a4SAdrien Destugues 17eb7157a4SAdrien Destugues 18f877fb74SAxel Dörfler VirtualMemory::VirtualMemory() 19f877fb74SAxel Dörfler : BApplication("application/x-vnd.Haiku-VirtualMemory") 20f877fb74SAxel Dörfler { 21eb7157a4SAdrien Destugues be_locale->GetAppCatalog(&fCatalog); 22f877fb74SAxel Dörfler } 23f877fb74SAxel Dörfler 24f877fb74SAxel Dörfler 25f877fb74SAxel Dörfler VirtualMemory::~VirtualMemory() 26f877fb74SAxel Dörfler { 27f877fb74SAxel Dörfler } 28f877fb74SAxel Dörfler 29f877fb74SAxel Dörfler 30f877fb74SAxel Dörfler void 31f877fb74SAxel Dörfler VirtualMemory::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 39f877fb74SAxel Dörfler VirtualMemory::AboutRequested() 40f877fb74SAxel Dörfler { 41*733c3ae4SMatt Madia BAlert* alert = new BAlert("about", B_TRANSLATE("VirtualMemory\n" 42f877fb74SAxel Dörfler "\twritten by Axel Dörfler\n" 43*733c3ae4SMatt 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 54f877fb74SAxel Dörfler alert->Go(); 55f877fb74SAxel Dörfler } 56f877fb74SAxel Dörfler 57f877fb74SAxel Dörfler 58f877fb74SAxel Dörfler int 59f877fb74SAxel Dörfler main(int argc, char** argv) 60f877fb74SAxel Dörfler { 61f877fb74SAxel Dörfler VirtualMemory app; 62f877fb74SAxel Dörfler app.Run(); 63f877fb74SAxel Dörfler 64f877fb74SAxel Dörfler return 0; 65f877fb74SAxel Dörfler } 66