Made localizable attribute control's label formatting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40404 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2010, Haiku, Inc. All rights reserved.
|
* Copyright 2005-2011, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -14,7 +14,13 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
#include <Font.h>
|
#include <Font.h>
|
||||||
|
#include <Catalog.h>
|
||||||
|
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "People"
|
||||||
|
|
||||||
|
|
||||||
AttributeTextControl::AttributeTextControl(const char* label,
|
AttributeTextControl::AttributeTextControl(const char* label,
|
||||||
@@ -25,7 +31,8 @@ AttributeTextControl::AttributeTextControl(const char* label,
|
|||||||
fOriginalValue()
|
fOriginalValue()
|
||||||
{
|
{
|
||||||
if (label != NULL && label[0] != 0)
|
if (label != NULL && label[0] != 0)
|
||||||
SetLabel(BString(label).Append(":"));
|
SetLabel(BString(B_TRANSLATE("%attribute_label:"))
|
||||||
|
.ReplaceFirst("%attribute_label", label));
|
||||||
SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
|
SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2010, Haiku, Inc. All rights reserved.
|
* Copyright 2005-2011, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
* Copyright 1999, Be Incorporated. All Rights Reserved.
|
* Copyright 1999, Be Incorporated. All Rights Reserved.
|
||||||
* This file may be used under the terms of the Be Sample Code License.
|
* This file may be used under the terms of the Be Sample Code License.
|
||||||
*/
|
*/
|
||||||
#ifndef TEXT_CONTROL_H
|
#ifndef ATTRIBUTE_TEXT_CONTROL_H
|
||||||
#define TEXT_CONTROL_H
|
#define ATTRIBUTE_TEXT_CONTROL_H
|
||||||
|
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
@@ -33,4 +33,4 @@ private:
|
|||||||
BString fOriginalValue;
|
BString fOriginalValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TEXT_CONTROL_H
|
#endif // ATTRIBUTE_TEXT_CONTROL_H
|
||||||
|
|||||||
Reference in New Issue
Block a user