1/*
2 * Copyright 2008, J��r��me Duval. All rights reserved.
3 * Copyright 2005-2007, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
4 * Copyright 2009, Maxime Simon, maxime.simon@gmail.com. All rights reserved.
5 * Distributed under the terms of the MIT License.
6 */
7
8
9#include "ConfigView.h"
10#include "EXRTranslator.h"
11
12#include <Catalog.h>
13#include <CheckBox.h>
14#include <LayoutBuilder.h>
15#include <StringView.h>
16
17#include <OpenEXRConfig.h>
18
19#include <stdio.h>
20#include <string.h>
21
22#undef B_TRANSLATION_CONTEXT
23#define B_TRANSLATION_CONTEXT "ConfigView"
24
25
26ConfigView::ConfigView(uint32 flags)
27	: BView("EXRTranslator Settings", flags)
28{
29	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
30
31	BStringView *titleView = new BStringView("title",
32		B_TRANSLATE("EXR image translator"));
33	titleView->SetFont(be_bold_font);
34
35	char version[256];
36	sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
37		int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
38		int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
39		int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
40		__DATE__);
41	BStringView *versionView = new BStringView("version", version);
42
43	BStringView *copyrightView = new BStringView("copyright",
44		B_UTF8_COPYRIGHT "2008 Haiku Inc.");
45
46	BString openExrInfo = B_TRANSLATE("Based on OpenEXR %version%");
47	openExrInfo.ReplaceAll("%version%", OPENEXR_VERSION_STRING);
48	BStringView *copyrightView2 = new BStringView("copyright2",
49		openExrInfo.String());
50
51	BStringView *copyrightView3 = new BStringView("copyright3",
52		B_UTF8_COPYRIGHT "2002-2014 Industrial Light & Magic,");
53
54	BStringView *copyrightView4 = new BStringView("copyright4",
55		B_TRANSLATE("a division of Lucasfilm Entertainment Company Ltd"));
56
57	// Build the layout
58	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
59		.SetInsets(B_USE_DEFAULT_SPACING)
60		.Add(titleView)
61		.Add(versionView)
62		.Add(copyrightView)
63		.AddGlue()
64		.Add(copyrightView2)
65		.Add(copyrightView3)
66		.Add(copyrightView4);
67}
68
69
70ConfigView::~ConfigView()
71{
72}
73
74