Enforced the newlines.
Localized alert "title" and close button label. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39879 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -36,8 +36,8 @@ BAboutWindow::BAboutWindow(const char *appName, int32 firstCopyrightYear,
|
|||||||
if (gLocaleBackend == NULL)
|
if (gLocaleBackend == NULL)
|
||||||
LocaleBackend::LoadBackend();
|
LocaleBackend::LoadBackend();
|
||||||
|
|
||||||
const char* copyright = B_TRANSLATE_MARK("Copyright " B_UTF8_COPYRIGHT " %years% Haiku, Inc.\n\n");
|
const char* copyright = B_TRANSLATE_MARK("Copyright " B_UTF8_COPYRIGHT " %years% Haiku, Inc.");
|
||||||
const char* writtenBy = B_TRANSLATE_MARK("Written by:\n");
|
const char* writtenBy = B_TRANSLATE_MARK("Written by:");
|
||||||
if (gLocaleBackend) {
|
if (gLocaleBackend) {
|
||||||
copyright = gLocaleBackend->GetString(copyright, "AboutWindow");
|
copyright = gLocaleBackend->GetString(copyright, "AboutWindow");
|
||||||
writtenBy = gLocaleBackend->GetString(writtenBy, "AboutWindow");
|
writtenBy = gLocaleBackend->GetString(writtenBy, "AboutWindow");
|
||||||
@@ -55,9 +55,11 @@ BAboutWindow::BAboutWindow(const char *appName, int32 firstCopyrightYear,
|
|||||||
|
|
||||||
// Build the text to display
|
// Build the text to display
|
||||||
BString text(appName);
|
BString text(appName);
|
||||||
|
text << "\n\n";
|
||||||
text << copyright;
|
text << copyright;
|
||||||
|
text << "\n\n";
|
||||||
text.ReplaceAll("%years%", copyrightYears.String());
|
text.ReplaceAll("%years%", copyrightYears.String());
|
||||||
text << writtenBy;
|
text << writtenBy << "\n";
|
||||||
for (int32 i = 0; authors[i]; i++) {
|
for (int32 i = 0; authors[i]; i++) {
|
||||||
text << " " << authors[i] << "\n";
|
text << " " << authors[i] << "\n";
|
||||||
}
|
}
|
||||||
@@ -81,7 +83,14 @@ BAboutWindow::~BAboutWindow()
|
|||||||
void
|
void
|
||||||
BAboutWindow::Show()
|
BAboutWindow::Show()
|
||||||
{
|
{
|
||||||
BAlert *alert = new BAlert("About" B_UTF8_ELLIPSIS, fText->String(), "Close");
|
const char* aboutTitle = B_TRANSLATE_MARK("About" B_UTF8_ELLIPSIS);
|
||||||
|
const char* closeLabel = B_TRANSLATE_MARK("Close");
|
||||||
|
if (gLocaleBackend) {
|
||||||
|
aboutTitle = gLocaleBackend->GetString(aboutTitle, "AboutWindow");
|
||||||
|
closeLabel = gLocaleBackend->GetString(closeLabel, "AboutWindow");
|
||||||
|
}
|
||||||
|
|
||||||
|
BAlert *alert = new BAlert(aboutTitle, fText->String(), closeLabel);
|
||||||
BTextView *view = alert->TextView();
|
BTextView *view = alert->TextView();
|
||||||
BFont font;
|
BFont font;
|
||||||
view->SetStylable(true);
|
view->SetStylable(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user