xref: /haiku/src/apps/packageinstaller/PackageWindow.cpp (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
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 #include "main.h"
19 
20 
21 #undef B_TRANSLATION_CONTEXT
22 #define B_TRANSLATION_CONTEXT "PackageWindow"
23 
24 
25 PackageWindow::PackageWindow(const entry_ref* ref)
26 	:
27 	BWindow(BRect(100, 100, 600, 300),
28 		B_TRANSLATE_SYSTEM_NAME("LegacyPackageInstaller"),
29 		B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
30 {
31 	PackageView* view = new PackageView(ref);
32 
33 	BLayoutBuilder::Group<>(this, B_VERTICAL, 0.0f)
34 		.Add(view)
35 	;
36 
37 	CenterOnScreen();
38 }
39 
40 
41 PackageWindow::~PackageWindow()
42 {
43 }
44 
45 
46 void
47 PackageWindow::Quit()
48 {
49 	be_app->PostMessage(P_WINDOW_QUIT);
50 	BWindow::Quit();
51 }
52 
53