18260e407SAxel Dörfler/*
28260e407SAxel Dörfler * Copyright 2005-2007, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
3a76f629eSRyan Leavengood * Copyright 2009, Maxime Simon, maxime.simon@gmail.com. All rights reserved.
48260e407SAxel Dörfler * Distributed under the terms of the MIT License.
58260e407SAxel Dörfler */
68260e407SAxel Dörfler
78260e407SAxel Dörfler
88260e407SAxel Dörfler#include "ConfigView.h"
98260e407SAxel Dörfler#include "RAWTranslator.h"
108260e407SAxel Dörfler
1170d59669SSiarzhuk Zharski#include <Catalog.h>
128260e407SAxel Dörfler#include <CheckBox.h>
137d48219bSHannah Boneß#include <LayoutBuilder.h>
1470d59669SSiarzhuk Zharski#include <StringView.h>
158260e407SAxel Dörfler
168260e407SAxel Dörfler#include <stdio.h>
178260e407SAxel Dörfler#include <string.h>
188260e407SAxel Dörfler
19546208a5SOliver Tappe#undef B_TRANSLATION_CONTEXT
20546208a5SOliver Tappe#define B_TRANSLATION_CONTEXT "ConfigView"
2170d59669SSiarzhuk Zharski
2270d59669SSiarzhuk Zharskiconst char* kShortName2 = B_TRANSLATE_MARK("RAWTranslator Settings");
2370d59669SSiarzhuk Zharski
248260e407SAxel Dörfler
25a76f629eSRyan LeavengoodConfigView::ConfigView(uint32 flags)
2670d59669SSiarzhuk Zharski	: BView(kShortName2, flags)
278260e407SAxel Dörfler{
28f0650dc9Slooncraz	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
298260e407SAxel Dörfler
30468f8266SHumdinger	BStringView *fTitle = new BStringView("title", B_TRANSLATE("RAW image translator"));
31a76f629eSRyan Leavengood	fTitle->SetFont(be_bold_font);
328260e407SAxel Dörfler
338260e407SAxel Dörfler	char version[256];
3470d59669SSiarzhuk Zharski	sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
358260e407SAxel Dörfler		int(B_TRANSLATION_MAJOR_VERSION(RAW_TRANSLATOR_VERSION)),
368260e407SAxel Dörfler		int(B_TRANSLATION_MINOR_VERSION(RAW_TRANSLATOR_VERSION)),
378260e407SAxel Dörfler		int(B_TRANSLATION_REVISION_VERSION(RAW_TRANSLATOR_VERSION)),
388260e407SAxel Dörfler		__DATE__);
39a76f629eSRyan Leavengood	BStringView *fVersion = new BStringView("version", version);
40a76f629eSRyan Leavengood
41a76f629eSRyan Leavengood	BStringView *fCopyright = new BStringView("copyright",
42a76f629eSRyan Leavengood		B_UTF8_COPYRIGHT "2007-2009 Haiku Inc.");
43a76f629eSRyan Leavengood
44a76f629eSRyan Leavengood	BStringView *fCopyright2 = new BStringView("copyright2",
4570d59669SSiarzhuk Zharski		B_TRANSLATE("Based on Dave Coffin's dcraw 8.63"));
46a76f629eSRyan Leavengood
47a76f629eSRyan Leavengood	BStringView *fCopyright3 = new BStringView("copyright3",
48a76f629eSRyan Leavengood		B_UTF8_COPYRIGHT "1997-2007 Dave Coffin");
49a76f629eSRyan Leavengood
50a76f629eSRyan Leavengood	// Build the layout
51b70b9a38SJanus	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
52b70b9a38SJanus		.SetInsets(B_USE_DEFAULT_SPACING)
53a76f629eSRyan Leavengood		.Add(fTitle)
54a76f629eSRyan Leavengood		.Add(fVersion)
55a76f629eSRyan Leavengood		.Add(fCopyright)
56a76f629eSRyan Leavengood		.AddGlue()
57a76f629eSRyan Leavengood		.Add(fCopyright2)
58b70b9a38SJanus		.Add(fCopyright3);
59a76f629eSRyan Leavengood
60a76f629eSRyan Leavengood	BFont font;
61a76f629eSRyan Leavengood	GetFont(&font);
62a76f629eSRyan Leavengood	SetExplicitPreferredSize(BSize((font.Size() * 233)/12, (font.Size() * 200)/12));
638260e407SAxel Dörfler}
648260e407SAxel Dörfler
658260e407SAxel Dörfler
668260e407SAxel DörflerConfigView::~ConfigView()
678260e407SAxel Dörfler{
688260e407SAxel Dörfler}
698260e407SAxel Dörfler
70