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_TRANSLATE_CONTEXT 18 #define B_TRANSLATE_CONTEXT "NetworkStatusWindow" 19 20 21 NetworkStatusWindow::NetworkStatusWindow() 22 : BWindow(BRect(150, 150, 249, 249), B_TRANSLATE("NetworkStatus"), 23 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS) 24 { 25 BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW); 26 topView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 27 AddChild(topView); 28 29 SetSizeLimits(25, 265, 25, 265); 30 31 topView->AddChild(new NetworkStatusView(Bounds().InsetByCopy(5, 5), 32 B_FOLLOW_ALL)); 33 } 34 35 36 NetworkStatusWindow::~NetworkStatusWindow() 37 { 38 } 39 40 41 bool 42 NetworkStatusWindow::QuitRequested() 43 { 44 be_app->PostMessage(B_QUIT_REQUESTED); 45 return true; 46 } 47