1 /* 2 * Copyright 2008-2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Pfeiffer <laplace@users.sourceforge.net> 7 */ 8 9 10 #include "UninstallPage.h" 11 12 #include <string.h> 13 14 #include <Catalog.h> 15 #include <RadioButton.h> 16 #include <TextView.h> 17 18 19 #undef B_TRANSLATION_CONTEXT 20 #define B_TRANSLATION_CONTEXT "UninstallPage" 21 22 23 static const float kTextDistance = 10; 24 25 26 UninstallPage::UninstallPage(BMessage* settings, BRect frame, const char* name) 27 : 28 WizardPageView(settings, frame, name, B_FOLLOW_ALL, 29 B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE) 30 { 31 _BuildUI(); 32 } 33 34 35 UninstallPage::~UninstallPage() 36 { 37 } 38 39 40 void 41 UninstallPage::FrameResized(float width, float height) 42 { 43 WizardPageView::FrameResized(width, height); 44 _Layout(); 45 } 46 47 48 void 49 UninstallPage::_BuildUI() 50 { 51 BRect rect(Bounds()); 52 53 BString text; 54 text << B_TRANSLATE_COMMENT("Uninstall Boot Manager", "Title") << "\n\n" 55 << B_TRANSLATE("Please locate the Master Boot Record (MBR) save file " 56 "to restore from. This is the file that was created when the " 57 "boot manager was first installed."); 58 fDescription = CreateDescription(rect, "description", text); 59 60 MakeHeading(fDescription); 61 AddChild(fDescription); 62 63 _Layout(); 64 } 65 66 67 void 68 UninstallPage::_Layout() 69 { 70 LayoutDescriptionVertically(fDescription); 71 } 72