diff --git a/src/apps/powerstatus/ACPIDriverInterface.cpp b/src/apps/powerstatus/ACPIDriverInterface.cpp index cf39fe7f38..9b8ef80382 100644 --- a/src/apps/powerstatus/ACPIDriverInterface.cpp +++ b/src/apps/powerstatus/ACPIDriverInterface.cpp @@ -12,16 +12,11 @@ #include #include -#include #include #include #include -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "PowerStatus" - - RateBuffer::RateBuffer() : fPosition(0), @@ -143,7 +138,7 @@ Battery::_Init() if (fInitStatus != B_OK) return; - printf(B_TRANSLATE("ACPI driver found\n")); + printf("ACPI driver found\n"); } @@ -162,7 +157,7 @@ const char* kDriverDir = "/dev/power"; status_t ACPIDriverInterface::Connect() { - printf(B_TRANSLATE("ACPI connect\n")); + printf("ACPI connect\n"); return _FindDrivers(kDriverDir); } @@ -245,7 +240,7 @@ ACPIDriverInterface::_FindDrivers(const char* dirpath) else { int32 handler = open(path.Path(), O_RDWR); if (handler >= 0) { - printf(B_TRANSLATE("try %s\n"), path.Path()); + printf("try %s\n", path.Path()); Battery* battery = new Battery(handler); if (battery->InitCheck() == B_OK) { fDriverList.AddItem(battery); diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp index d3f4262c11..ebbb839741 100644 --- a/src/apps/powerstatus/PowerStatusView.cpp +++ b/src/apps/powerstatus/PowerStatusView.cpp @@ -42,6 +42,7 @@ extern "C" _EXPORT BView *instantiate_deskbar_item(void); +extern const char* kDeskbarItemName; const uint32 kMsgToggleLabel = 'tglb'; const uint32 kMsgToggleTime = 'tgtm'; @@ -51,7 +52,6 @@ const uint32 kMsgToggleExtInfo = 'texi'; const uint32 kMinIconWidth = 16; const uint32 kMinIconHeight = 16; - PowerStatusView::PowerStatusView(PowerStatusDriverInterface* interface, BRect frame, int32 resizingMode, int batteryID, bool inDeskbar) : @@ -609,7 +609,7 @@ PowerStatusReplicant::MouseDown(BPoint point) void PowerStatusReplicant::_AboutRequested() { - BAlert* alert = new BAlert(B_TRANSLATE("about"), + BAlert* alert = new BAlert(B_TRANSLATE("About"), B_TRANSLATE("PowerStatus\n" "written by Axel Dörfler, Clemens Zeidler\n" "Copyright 2006, Haiku, Inc.\n"), B_TRANSLATE("OK")); @@ -621,7 +621,7 @@ PowerStatusReplicant::_AboutRequested() view->GetFont(&font); font.SetSize(18); font.SetFace(B_BOLD_FACE); - view->SetFontAndColor(0, 11, &font); + view->SetFontAndColor(0, strlen(B_TRANSLATE("PowerStatus"))-1, &font); alert->Go(); } @@ -635,7 +635,7 @@ PowerStatusReplicant::_Init() delete fDriverInterface; fDriverInterface = new APMDriverInterface; if (fDriverInterface->Connect() != B_OK) { - fprintf(stderr, B_TRANSLATE("No power interface found.\n")); + fprintf(stderr, "No power interface found.\n"); _Quit(); } } @@ -668,7 +668,7 @@ PowerStatusReplicant::_GetSettings(BFile& file, int mode) if (status != B_OK) return status; - path.Append(B_TRANSLATE("PowerStatus settings")); + path.Append("PowerStatus settings"); return file.SetTo(path.Path(), mode); }