xref: /haiku/src/preferences/network/NetworkWindow.cpp (revision cfc3fa87da824bdf593eb8b817a83b6376e77935)
1 /*
2  * Copyright 2004-2007 Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Author:
6  *		Andre Alves Garzia, andre@andregarzia.com
7  * With code from:
8  *		Axel Dorfler
9  *		Hugo Santos
10  */
11 
12 #include <Application.h>
13 #include <GroupLayout.h>
14 
15 #include "NetworkWindow.h"
16 #include "EthernetSettingsView.h"
17 
18 
19 NetworkWindow::NetworkWindow()
20 	: BWindow(BRect(50, 50, 269, 302), "Network", B_TITLED_WINDOW,
21 		B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE
22 		| B_AUTO_UPDATE_SIZE_LIMITS)
23 {
24 	SetLayout(new BGroupLayout(B_HORIZONTAL));
25 	fEthView = new EthernetSettingsView();
26 	GetLayout()->AddView(fEthView);
27 }
28 
29 
30 void
31 NetworkWindow::MessageReceived(BMessage* message)
32 {
33 	switch (message->what) {
34 		default:
35 			BWindow::MessageReceived(message);
36 	}
37 
38 }
39 
40 NetworkWindow::~NetworkWindow()
41 {
42 }
43 
44 
45 bool
46 NetworkWindow::QuitRequested()
47 {
48 	be_app->PostMessage(B_QUIT_REQUESTED);
49 	return true;
50 }
51