1 /* 2 * Copyright (c) 2007-2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org> 7 */ 8 9 10 #include "PackageWindow.h" 11 12 #include <Application.h> 13 #include <Catalog.h> 14 #include <GroupLayout.h> 15 #include <Locale.h> 16 17 18 #undef B_TRANSLATE_CONTEXT 19 #define B_TRANSLATE_CONTEXT "PackageWindow" 20 21 22 PackageWindow::PackageWindow(const entry_ref *ref) 23 : 24 BWindow(BRect(100, 100, 600, 300), 25 B_TRANSLATE_SYSTEM_NAME("PackageInstaller"), 26 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE) 27 { 28 //SetLayout(new BGroupLayout(B_HORIZONTAL)); 29 30 fBackground = new PackageView(Bounds(), ref); 31 AddChild(fBackground); 32 33 ResizeTo(Bounds().Width(), fBackground->Bounds().Height()); 34 } 35 36 37 PackageWindow::~PackageWindow() 38 { 39 RemoveChild(fBackground); 40 41 delete fBackground; 42 } 43 44 45 void 46 PackageWindow::Quit() 47 { 48 be_app->PostMessage(P_WINDOW_QUIT); 49 BWindow::Quit(); 50 } 51 52