Switched ActivityMonitor to use the now localized BAboutWindow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39880 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2010-12-17 15:52:52 +00:00
parent d1cf409924
commit 8c71173a30
2 changed files with 10 additions and 29 deletions

View File

@ -8,16 +8,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <Alert.h> #include <AboutWindow.h>
#include <Application.h> #include <Application.h>
#include <Catalog.h>
#include <TextView.h>
#include "ActivityWindow.h" #include "ActivityWindow.h"
#undef B_TRANSLATE_CONTEXT
#define B_TRANSLATE_CONTEXT "ActivityMonitor"
const char* kSignature = "application/x-vnd.Haiku-ActivityMonitor"; const char* kSignature = "application/x-vnd.Haiku-ActivityMonitor";
@ -64,24 +59,13 @@ ActivityMonitor::AboutRequested()
/*static*/ void /*static*/ void
ActivityMonitor::ShowAbout() ActivityMonitor::ShowAbout()
{ {
BString text; const char* kAuthors[] = {
text << kAppName << "\n" "Axel Dörfler",
<< B_TRANSLATE("\twritten by Axel Dörfler\n" NULL
"\tCopyright 2008, Haiku Inc.\n"); };
BAlert *alert = new BAlert(B_TRANSLATE("About"), BAboutWindow aboutWindow(kAppName, 2008, kAuthors);
text.String(), B_TRANSLATE("OK")); aboutWindow.Show();
BTextView *view = alert->TextView();
BFont font;
view->SetStylable(true);
view->GetFont(&font);
font.SetSize(18);
font.SetFace(B_BOLD_FACE);
view->SetFontAndColor(0, strlen(kAppName), &font);
alert->Go();
} }

View File

@ -10,12 +10,9 @@ Application ActivityMonitor :
SettingsWindow.cpp SettingsWindow.cpp
SystemInfo.cpp SystemInfo.cpp
SystemInfoHandler.cpp SystemInfoHandler.cpp
: be tracker media libbnetapi.so libshared.a $(TARGET_LIBSTDC++)
: $(TARGET_NETWORK_LIBS) $(HAIKU_LOCALE_LIBS)
be tracker media libbnetapi.so $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS) : ActivityMonitor.rdef
$(HAIKU_LOCALE_LIBS)
:
ActivityMonitor.rdef
; ;
DoCatalogs ActivityMonitor : DoCatalogs ActivityMonitor :