haiku/src/apps/networkstatus/NetworkStatusWindow.cpp
Oliver Tappe 546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00

48 lines
1006 B
C++

/*
* Copyright 2006-2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, axeld@pinc-software.de
*/
#include "NetworkStatusWindow.h"
#include "NetworkStatusView.h"
#include <Application.h>
#include <Catalog.h>
#include <Locale.h>
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "NetworkStatusWindow"
NetworkStatusWindow::NetworkStatusWindow()
:
BWindow(BRect(150, 150, 249, 249), B_TRANSLATE_SYSTEM_NAME("NetworkStatus"),
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
{
BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
topView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
AddChild(topView);
SetSizeLimits(25, 265, 25, 265);
topView->AddChild(new NetworkStatusView(Bounds().InsetByCopy(5, 5),
B_FOLLOW_ALL));
}
NetworkStatusWindow::~NetworkStatusWindow()
{
}
bool
NetworkStatusWindow::QuitRequested()
{
be_app->PostMessage(B_QUIT_REQUESTED);
return true;
}