xref: /haiku/src/add-ons/translators/pcx/ConfigView.cpp (revision 97dfeb96704e5dbc5bec32ad7b21379d0125e031)
1 /*
2  * Copyright 2008, Jérôme Duval, korli@users.berlios.de. All rights reserved.
3  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
4  * Distributed under the terms of the MIT License.
5  */
6 
7 
8 #include "ConfigView.h"
9 #include "PCXTranslator.h"
10 
11 #include <Catalog.h>
12 #include <CheckBox.h>
13 #include <LayoutBuilder.h>
14 #include <StringView.h>
15 
16 #include <stdio.h>
17 #include <string.h>
18 
19 
20 #undef B_TRANSLATION_CONTEXT
21 #define B_TRANSLATION_CONTEXT "ConfigView"
22 
23 
24 ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
25 	: BView(frame, B_TRANSLATE("PCXTranslator Settings"), resize, flags)
26 {
27 	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
28 
29 	BStringView *titleView = new BStringView("title",
30 		B_TRANSLATE("PCX image translator"));
31 	titleView->SetFont(be_bold_font);
32 
33 	char version[256];
34 	sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
35 		int(B_TRANSLATION_MAJOR_VERSION(PCX_TRANSLATOR_VERSION)),
36 		int(B_TRANSLATION_MINOR_VERSION(PCX_TRANSLATOR_VERSION)),
37 		int(B_TRANSLATION_REVISION_VERSION(PCX_TRANSLATOR_VERSION)),
38 		__DATE__);
39 	BStringView *versionView = new BStringView("version", version);
40 	BStringView *copyrightView = new BStringView("copyright", B_UTF8_COPYRIGHT "2008 Haiku Inc.");
41 
42 	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
43 		.SetInsets(B_USE_DEFAULT_SPACING)
44 		.Add(titleView)
45 		.Add(versionView)
46 		.Add(copyrightView)
47 		.AddGlue();
48 }
49 
50 
51 ConfigView::~ConfigView()
52 {
53 }
54 
55