1 /*
2 * Copyright 2006-2007, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 */
8
9
10 #include "NetworkStatusWindow.h"
11 #include "NetworkStatusView.h"
12
13 #include <Application.h>
14 #include <Catalog.h>
15 #include <Locale.h>
16
17 #undef B_TRANSLATION_CONTEXT
18 #define B_TRANSLATION_CONTEXT "NetworkStatusWindow"
19
20
NetworkStatusWindow()21 NetworkStatusWindow::NetworkStatusWindow()
22 :
23 BWindow(BRect(150, 150, 249, 249), B_TRANSLATE_SYSTEM_NAME("NetworkStatus"),
24 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
25 {
26 BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
27 topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
28 AddChild(topView);
29
30 SetSizeLimits(25, 265, 25, 265);
31
32 topView->AddChild(new NetworkStatusView(Bounds().InsetByCopy(5, 5),
33 B_FOLLOW_ALL));
34 }
35
36
~NetworkStatusWindow()37 NetworkStatusWindow::~NetworkStatusWindow()
38 {
39 }
40
41
42 bool
QuitRequested()43 NetworkStatusWindow::QuitRequested()
44 {
45 be_app->PostMessage(B_QUIT_REQUESTED);
46 return true;
47 }
48