1 /* 2 * Copyright (c) 2007-2014, 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 * Stephan Aßmus <superstippi@gmx.de> 8 */ 9 10 11 #include "PackageWindow.h" 12 13 #include <Application.h> 14 #include <Catalog.h> 15 #include <LayoutBuilder.h> 16 17 #include "PackageView.h" 18 19 20 #undef B_TRANSLATION_CONTEXT 21 #define B_TRANSLATION_CONTEXT "PackageWindow" 22 23 24 PackageWindow::PackageWindow(const entry_ref* ref) 25 : 26 BWindow(BRect(100, 100, 600, 300), 27 B_TRANSLATE_SYSTEM_NAME("PackageInstaller"), 28 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS) 29 { 30 PackageView* view = new PackageView(ref); 31 32 BLayoutBuilder::Group<>(this, B_VERTICAL, 0.0f) 33 .Add(view) 34 ; 35 36 CenterOnScreen(); 37 } 38 39 40 PackageWindow::~PackageWindow() 41 { 42 } 43 44 45 void 46 PackageWindow::Quit() 47 { 48 be_app->PostMessage(P_WINDOW_QUIT); 49 BWindow::Quit(); 50 } 51 52