Made app name localizable, as it seems that it should be possible after all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39877 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -64,10 +64,13 @@ ActivityMonitor::AboutRequested()
|
|||||||
/*static*/ void
|
/*static*/ void
|
||||||
ActivityMonitor::ShowAbout()
|
ActivityMonitor::ShowAbout()
|
||||||
{
|
{
|
||||||
BAlert *alert = new BAlert(B_TRANSLATE("about"),
|
BString text;
|
||||||
B_TRANSLATE("ActivityMonitor\n"
|
text << kAppName << "\n"
|
||||||
"\twritten by Axel Dörfler\n"
|
<< B_TRANSLATE("\twritten by Axel Dörfler\n"
|
||||||
"\tCopyright 2008, Haiku Inc.\n"), B_TRANSLATE("OK"));
|
"\tCopyright 2008, Haiku Inc.\n");
|
||||||
|
|
||||||
|
BAlert *alert = new BAlert(B_TRANSLATE("About"),
|
||||||
|
text.String(), B_TRANSLATE("OK"));
|
||||||
BTextView *view = alert->TextView();
|
BTextView *view = alert->TextView();
|
||||||
BFont font;
|
BFont font;
|
||||||
|
|
||||||
@@ -76,7 +79,7 @@ ActivityMonitor::ShowAbout()
|
|||||||
view->GetFont(&font);
|
view->GetFont(&font);
|
||||||
font.SetSize(18);
|
font.SetSize(18);
|
||||||
font.SetFace(B_BOLD_FACE);
|
font.SetFace(B_BOLD_FACE);
|
||||||
view->SetFontAndColor(0, 15, &font);
|
view->SetFontAndColor(0, strlen(kAppName), &font);
|
||||||
|
|
||||||
alert->Go();
|
alert->Go();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,16 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <Catalog.h>
|
||||||
|
|
||||||
class BMessage;
|
class BMessage;
|
||||||
class ActivityWindow;
|
class ActivityWindow;
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "ActivityWindow"
|
||||||
|
|
||||||
|
static const char* kAppName = B_TRANSLATE_MARK("ActivityMonitor");
|
||||||
|
|
||||||
|
|
||||||
class ActivityMonitor : public BApplication {
|
class ActivityMonitor : public BApplication {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static const uint32 kMsgShowSettings = 'shst';
|
|||||||
|
|
||||||
|
|
||||||
ActivityWindow::ActivityWindow()
|
ActivityWindow::ActivityWindow()
|
||||||
: BWindow(BRect(100, 100, 500, 350), "ActivityMonitor", B_TITLED_WINDOW,
|
: BWindow(BRect(100, 100, 500, 350), kAppName, B_TITLED_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE)
|
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE)
|
||||||
{
|
{
|
||||||
BMessage settings;
|
BMessage settings;
|
||||||
|
|||||||
Reference in New Issue
Block a user