Ticket #7229: STXTView.cpp_TGAView.cpp.patch
File STXTView.cpp_TGAView.cpp.patch, 3.4 KB (added by , 14 years ago) |
---|
-
src/add-ons/translators/stxt/STXTView.cpp
1 1 /* 2 * Copyright 2002-20 09, Haiku, Inc. All rights reserved.2 * Copyright 2002-2011, Haiku, Inc. All rights reserved. 3 3 * Distributed under the terms of the MIT license. 4 4 * 5 5 * Authors: … … 13 13 #include "STXTView.h" 14 14 #include "STXTTranslator.h" 15 15 16 #include <Catalog.h> 16 17 #include <StringView.h> 17 18 18 19 #include <stdio.h> 19 20 20 21 22 #undef B_TRANSLATE_CONTEXT 23 #define B_TRANSLATE_CONTEXT "STXTView" 24 25 21 26 STXTView::STXTView(const BRect &frame, const char *name, uint32 resizeMode, 22 27 uint32 flags, TranslatorSettings *settings) 23 28 : BView(frame, name, resizeMode, flags) … … 30 35 float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; 31 36 32 37 BRect rect(10, 10, 200, 10 + height); 33 BStringView *stringView = new BStringView(rect, "title", "StyledEdit files translator"); 38 BStringView *stringView = new BStringView(rect, "title", 39 B_TRANSLATE("StyledEdit files translator")); 34 40 stringView->SetFont(be_bold_font); 35 41 stringView->ResizeToPreferred(); 36 42 AddChild(stringView); … … 55 61 height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; 56 62 57 63 rect.OffsetBy(0, height + 5); 58 stringView = new BStringView(rect, "Copyright", B_UTF8_COPYRIGHT "2002-2006 Haiku Inc."); 64 stringView = new BStringView(rect, "Copyright", 65 B_UTF8_COPYRIGHT "2002-2006 Haiku Inc."); 59 66 stringView->ResizeToPreferred(); 60 67 AddChild(stringView); 61 68 -
src/add-ons/translators/tga/TGAView.cpp
52 52 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 53 53 SetLowColor(ViewColor()); 54 54 55 fTitle = new BStringView("title", "TGA Image Translator");55 fTitle = new BStringView("title", B_TRANSLATE("TGA Image Translator")); 56 56 fTitle->SetFont(be_bold_font); 57 57 58 58 char detail[100]; 59 59 sprintf(detail, B_TRANSLATE("Version %d.%d.%d %s"), 60 60 static_cast<int>(B_TRANSLATION_MAJOR_VERSION(TGA_TRANSLATOR_VERSION)), … … 64 64 fDetail = new BStringView("detail", detail); 65 65 fWrittenBy = new BStringView("writtenby", 66 66 B_TRANSLATE("Written by the Haiku Translation Kit Team")); 67 67 68 68 fpchkIgnoreAlpha = new BCheckBox(B_TRANSLATE("Ignore TGA alpha channel"), 69 69 new BMessage(CHANGE_IGNORE_ALPHA)); 70 70 int32 val = (fSettings->SetGetBool(TGA_SETTING_IGNORE_ALPHA)) ? 1 : 0; 71 71 fpchkIgnoreAlpha->SetValue(val); 72 72 fpchkIgnoreAlpha->SetViewColor(ViewColor()); 73 73 74 74 fpchkRLE = new BCheckBox(B_TRANSLATE("Save with RLE Compression"), 75 75 new BMessage(CHANGE_RLE)); 76 76 val = (fSettings->SetGetBool(TGA_SETTING_RLE)) ? 1 : 0; 77 77 fpchkRLE->SetValue(val); 78 78 fpchkRLE->SetViewColor(ViewColor()); 79 79 80 80 // Build the layout 81 81 SetLayout(new BGroupLayout(B_HORIZONTAL)); 82 82 83 83 AddChild(BGroupLayoutBuilder(B_VERTICAL, 7) 84 84 .Add(fTitle) 85 85 .Add(fDetail) … … 91 91 .AddGlue() 92 92 .SetInsets(5, 5, 5, 5) 93 93 ); 94 94 95 95 BFont font; 96 96 GetFont(&font); 97 SetExplicitPreferredSize(BSize((font.Size() * 333)/12, (font.Size() * 200)/12)); 97 SetExplicitPreferredSize(BSize((font.Size() * 333)/12, 98 (font.Size() * 200)/12)); 98 99 } 99 100 100 101