From 8c71173a30c45c7dd432ecfa4abaaf87aebed741 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Fri, 17 Dec 2010 15:52:52 +0000 Subject: [PATCH] Switched ActivityMonitor to use the now localized BAboutWindow. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39880 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/activitymonitor/ActivityMonitor.cpp | 30 +++++--------------- src/apps/activitymonitor/Jamfile | 9 ++---- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/src/apps/activitymonitor/ActivityMonitor.cpp b/src/apps/activitymonitor/ActivityMonitor.cpp index 2d937c2a9a..eb18bf385c 100644 --- a/src/apps/activitymonitor/ActivityMonitor.cpp +++ b/src/apps/activitymonitor/ActivityMonitor.cpp @@ -8,16 +8,11 @@ #include -#include +#include #include -#include -#include #include "ActivityWindow.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ActivityMonitor" - const char* kSignature = "application/x-vnd.Haiku-ActivityMonitor"; @@ -64,24 +59,13 @@ ActivityMonitor::AboutRequested() /*static*/ void ActivityMonitor::ShowAbout() { - BString text; - text << kAppName << "\n" - << B_TRANSLATE("\twritten by Axel Dörfler\n" - "\tCopyright 2008, Haiku Inc.\n"); + const char* kAuthors[] = { + "Axel Dörfler", + NULL + }; - BAlert *alert = new BAlert(B_TRANSLATE("About"), - text.String(), B_TRANSLATE("OK")); - 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(); + BAboutWindow aboutWindow(kAppName, 2008, kAuthors); + aboutWindow.Show(); } diff --git a/src/apps/activitymonitor/Jamfile b/src/apps/activitymonitor/Jamfile index 4f17bb3c6c..60c7dbfabd 100644 --- a/src/apps/activitymonitor/Jamfile +++ b/src/apps/activitymonitor/Jamfile @@ -10,12 +10,9 @@ Application ActivityMonitor : SettingsWindow.cpp SystemInfo.cpp SystemInfoHandler.cpp - - : - be tracker media libbnetapi.so $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS) - $(HAIKU_LOCALE_LIBS) - : - ActivityMonitor.rdef + : be tracker media libbnetapi.so libshared.a $(TARGET_LIBSTDC++) + $(TARGET_NETWORK_LIBS) $(HAIKU_LOCALE_LIBS) + : ActivityMonitor.rdef ; DoCatalogs ActivityMonitor :