BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / translators / pcx / ConfigView.cpp
blob39056f38441cf93c18f50b139b2fce12527a21a1
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 */
8 #include "ConfigView.h"
9 #include "PCXTranslator.h"
11 #include <Catalog.h>
12 #include <CheckBox.h>
13 #include <LayoutBuilder.h>
14 #include <StringView.h>
16 #include <stdio.h>
17 #include <string.h>
20 #undef B_TRANSLATION_CONTEXT
21 #define B_TRANSLATION_CONTEXT "ConfigView"
24 ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
25 : BView(frame, B_TRANSLATE("PCXTranslator Settings"), resize, flags)
27 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
29 BStringView *titleView = new BStringView("title",
30 B_TRANSLATE("PCX image translator"));
31 titleView->SetFont(be_bold_font);
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.");
42 BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
43 .SetInsets(B_USE_DEFAULT_SPACING)
44 .Add(titleView)
45 .Add(versionView)
46 .Add(copyrightView)
47 .AddGlue();
51 ConfigView::~ConfigView()