2007-04-11 20:01:02 +04:00
|
|
|
/*
|
|
|
|
* 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>
|
2010-07-02 17:03:33 +04:00
|
|
|
#include <Catalog.h>
|
|
|
|
#include <Locale.h>
|
|
|
|
|
2012-04-16 23:31:22 +04:00
|
|
|
#undef B_TRANSLATION_CONTEXT
|
|
|
|
#define B_TRANSLATION_CONTEXT "NetworkStatusWindow"
|
2007-04-11 20:01:02 +04:00
|
|
|
|
|
|
|
|
|
|
|
NetworkStatusWindow::NetworkStatusWindow()
|
2011-03-16 03:42:18 +03:00
|
|
|
:
|
2011-03-26 01:13:48 +03:00
|
|
|
BWindow(BRect(150, 150, 249, 249), B_TRANSLATE_SYSTEM_NAME("NetworkStatus"),
|
2010-07-02 17:03:33 +04:00
|
|
|
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
|
2007-04-11 20:01:02 +04:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|