* Applied patch from Karvjorm #7119: EXRTranslator localization
* minor style cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40244 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,26 +9,30 @@
|
|||||||
#include "ConfigView.h"
|
#include "ConfigView.h"
|
||||||
#include "EXRTranslator.h"
|
#include "EXRTranslator.h"
|
||||||
|
|
||||||
#include <StringView.h>
|
#include <Catalog.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
#include <GroupLayout.h>
|
#include <GroupLayout.h>
|
||||||
#include <GroupLayoutBuilder.h>
|
#include <GroupLayoutBuilder.h>
|
||||||
#include <SpaceLayoutItem.h>
|
#include <SpaceLayoutItem.h>
|
||||||
|
#include <StringView.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "ConfigView"
|
||||||
|
|
||||||
|
|
||||||
ConfigView::ConfigView(uint32 flags)
|
ConfigView::ConfigView(uint32 flags)
|
||||||
: BView("EXRTranslator Settings", flags)
|
: BView("EXRTranslator Settings", flags)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
BStringView *fTitle = new BStringView("title", "EXR Images");
|
BStringView *fTitle = new BStringView("title", B_TRANSLATE("EXR Images"));
|
||||||
fTitle->SetFont(be_bold_font);
|
fTitle->SetFont(be_bold_font);
|
||||||
|
|
||||||
char version[256];
|
char version[256];
|
||||||
sprintf(version, "Version %d.%d.%d, %s",
|
sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
|
||||||
int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
|
int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
|
||||||
@@ -39,13 +43,13 @@ ConfigView::ConfigView(uint32 flags)
|
|||||||
B_UTF8_COPYRIGHT "2008 Haiku Inc.");
|
B_UTF8_COPYRIGHT "2008 Haiku Inc.");
|
||||||
|
|
||||||
BStringView *fCopyright2 = new BStringView("copyright2",
|
BStringView *fCopyright2 = new BStringView("copyright2",
|
||||||
"Based on OpenEXR (http://www.openexr.com)");
|
B_TRANSLATE("Based on OpenEXR (http://www.openexr.com)"));
|
||||||
|
|
||||||
BStringView *fCopyright3 = new BStringView("copyright3",
|
BStringView *fCopyright3 = new BStringView("copyright3",
|
||||||
B_UTF8_COPYRIGHT "2006, Industrial Light & Magic,");
|
B_UTF8_COPYRIGHT "2006, Industrial Light & Magic,");
|
||||||
|
|
||||||
BStringView *fCopyright4 = new BStringView("copyright4",
|
BStringView *fCopyright4 = new BStringView("copyright4",
|
||||||
"a division of Lucasfilm Entertainment Company Ltd");
|
B_TRANSLATE("a division of Lucasfilm Entertainment Company Ltd"));
|
||||||
|
|
||||||
// Build the layout
|
// Build the layout
|
||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
@@ -65,7 +69,8 @@ ConfigView::ConfigView(uint32 flags)
|
|||||||
|
|
||||||
BFont font;
|
BFont font;
|
||||||
GetFont(&font);
|
GetFont(&font);
|
||||||
SetExplicitPreferredSize(BSize((font.Size() * 400)/12, (font.Size() * 200)/12));
|
SetExplicitPreferredSize(BSize(font.Size() * 400 / 12,
|
||||||
|
font.Size() * 200 / 12));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <Catalog.h>
|
||||||
|
|
||||||
#include "ConfigView.h"
|
#include "ConfigView.h"
|
||||||
#include "EXRGamma.h"
|
#include "EXRGamma.h"
|
||||||
#include "EXRTranslator.h"
|
#include "EXRTranslator.h"
|
||||||
@@ -14,6 +16,9 @@
|
|||||||
#include "ImfRgbaFile.h"
|
#include "ImfRgbaFile.h"
|
||||||
#include "IStreamWrapper.h"
|
#include "IStreamWrapper.h"
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "EXRTranslator"
|
||||||
|
|
||||||
|
|
||||||
// The input formats that this translator supports.
|
// The input formats that this translator supports.
|
||||||
translation_format sInputFormats[] = {
|
translation_format sInputFormats[] = {
|
||||||
@@ -56,7 +61,8 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting
|
|||||||
|
|
||||||
|
|
||||||
EXRTranslator::EXRTranslator()
|
EXRTranslator::EXRTranslator()
|
||||||
: BaseTranslator("EXR Images", "EXR image translator",
|
: BaseTranslator(B_TRANSLATE("EXR Images"),
|
||||||
|
B_TRANSLATE("EXR image translator"),
|
||||||
EXR_TRANSLATOR_VERSION,
|
EXR_TRANSLATOR_VERSION,
|
||||||
sInputFormats, kNumInputFormats,
|
sInputFormats, kNumInputFormats,
|
||||||
sOutputFormats, kNumOutputFormats,
|
sOutputFormats, kNumOutputFormats,
|
||||||
@@ -92,7 +98,7 @@ EXRTranslator::DerivedIdentify(BPositionIO *stream,
|
|||||||
outInfo->quality = EXR_IN_QUALITY;
|
outInfo->quality = EXR_IN_QUALITY;
|
||||||
outInfo->capability = EXR_IN_CAPABILITY;
|
outInfo->capability = EXR_IN_CAPABILITY;
|
||||||
strcpy(outInfo->MIME, "image/exr");
|
strcpy(outInfo->MIME, "image/exr");
|
||||||
strcpy(outInfo->name, "EXR image");
|
strcpy(outInfo->name, B_TRANSLATE("EXR image"));
|
||||||
}
|
}
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
return B_NO_TRANSLATOR;
|
return B_NO_TRANSLATOR;
|
||||||
|
|||||||
@@ -18,6 +18,14 @@ Translator EXRTranslator :
|
|||||||
: true
|
: true
|
||||||
;
|
;
|
||||||
|
|
||||||
|
DoCatalogs EXRTranslator :
|
||||||
|
x-vnd.Haiku-EXRTranslator
|
||||||
|
:
|
||||||
|
ConfigView.cpp
|
||||||
|
EXRTranslator.cpp
|
||||||
|
main.cpp
|
||||||
|
;
|
||||||
|
|
||||||
Package haiku-translationkit-cvs :
|
Package haiku-translationkit-cvs :
|
||||||
EXRTranslator :
|
EXRTranslator :
|
||||||
boot home config add-ons Translators ;
|
boot home config add-ons Translators ;
|
||||||
|
|||||||
@@ -8,7 +8,10 @@
|
|||||||
|
|
||||||
#include "TranslatorWindow.h"
|
#include "TranslatorWindow.h"
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <Catalog.h>
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "main"
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int /*argc*/, char **/*argv*/)
|
main(int /*argc*/, char **/*argv*/)
|
||||||
@@ -16,7 +19,8 @@ main(int /*argc*/, char **/*argv*/)
|
|||||||
BApplication app("application/x-vnd.Haiku-EXRTranslator");
|
BApplication app("application/x-vnd.Haiku-EXRTranslator");
|
||||||
|
|
||||||
status_t result;
|
status_t result;
|
||||||
result = LaunchTranslatorWindow(new EXRTranslator, "EXR Settings");
|
result = LaunchTranslatorWindow(new EXRTranslator,
|
||||||
|
B_TRANSLATE("EXR Settings"));
|
||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user