144f919daSRyan Leavengood/*
2735727daSStephan Aßmus * Copyright (c) 2007-2014, Haiku, Inc. All rights reserved.
344f919daSRyan Leavengood * Distributed under the terms of the MIT license.
444f919daSRyan Leavengood *
544f919daSRyan Leavengood * Author:
644f919daSRyan Leavengood *		��ukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
7735727daSStephan Aßmus *		Stephan A��mus <superstippi@gmx.de>
844f919daSRyan Leavengood */
944f919daSRyan Leavengood
10f51cdb44SStephan Aßmus
1144f919daSRyan Leavengood#include "PackageWindow.h"
1244f919daSRyan Leavengood
1344f919daSRyan Leavengood#include <Application.h>
14091440e0SStephan Aßmus#include <Catalog.h>
15735727daSStephan Aßmus#include <LayoutBuilder.h>
162a7d988dSStephan Aßmus
172a7d988dSStephan Aßmus#include "PackageView.h"
18eaf0a567SAugustin Cavalier#include "main.h"
19091440e0SStephan Aßmus
2044f919daSRyan Leavengood
21546208a5SOliver Tappe#undef B_TRANSLATION_CONTEXT
22546208a5SOliver Tappe#define B_TRANSLATION_CONTEXT "PackageWindow"
2344f919daSRyan Leavengood
2444f919daSRyan Leavengood
252a7d988dSStephan AßmusPackageWindow::PackageWindow(const entry_ref* ref)
26091440e0SStephan Aßmus	:
27560ff447SJonas Sundström	BWindow(BRect(100, 100, 600, 300),
2894a67989SAugustin Cavalier		B_TRANSLATE_SYSTEM_NAME("LegacyPackageInstaller"),
29735727daSStephan Aßmus		B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
3044f919daSRyan Leavengood{
31735727daSStephan Aßmus	PackageView* view = new PackageView(ref);
32735727daSStephan Aßmus
33735727daSStephan Aßmus	BLayoutBuilder::Group<>(this, B_VERTICAL, 0.0f)
34735727daSStephan Aßmus		.Add(view)
35735727daSStephan Aßmus	;
3644f919daSRyan Leavengood
372a7d988dSStephan Aßmus	CenterOnScreen();
3844f919daSRyan Leavengood}
3944f919daSRyan Leavengood
4044f919daSRyan Leavengood
4144f919daSRyan LeavengoodPackageWindow::~PackageWindow()
4244f919daSRyan Leavengood{
4344f919daSRyan Leavengood}
4444f919daSRyan Leavengood
4544f919daSRyan Leavengood
4644f919daSRyan Leavengoodvoid
4744f919daSRyan LeavengoodPackageWindow::Quit()
4844f919daSRyan Leavengood{
4944f919daSRyan Leavengood	be_app->PostMessage(P_WINDOW_QUIT);
5044f919daSRyan Leavengood	BWindow::Quit();
5144f919daSRyan Leavengood}
5244f919daSRyan Leavengood
53