* Renamed settings.{cpp|h} to Settings.*.
* Got rid of some superfluous Get*() in method names. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33996 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include "EthernetSettingsView.h"
|
||||
#include "settings.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#include <Application.h>
|
||||
#include <Alert.h>
|
||||
@@ -295,13 +295,13 @@ EthernetSettingsView::_ShowConfiguration(Settings* settings)
|
||||
|
||||
if (settings) {
|
||||
BMenuItem* item = fDeviceMenuField->Menu()->FindItem(
|
||||
settings->GetName());
|
||||
settings->Name());
|
||||
if (item)
|
||||
item->SetMarked(true);
|
||||
|
||||
fIPTextControl->SetText(settings->GetIP());
|
||||
fGatewayTextControl->SetText(settings->GetGateway());
|
||||
fNetMaskTextControl->SetText(settings->GetNetmask());
|
||||
fIPTextControl->SetText(settings->IP());
|
||||
fGatewayTextControl->SetText(settings->Gateway());
|
||||
fNetMaskTextControl->SetText(settings->Netmask());
|
||||
|
||||
if (settings->AutoConfigure() == true)
|
||||
item = fTypeMenuField->Menu()->FindItem("DHCP");
|
||||
@@ -369,7 +369,7 @@ EthernetSettingsView::_SaveConfiguration()
|
||||
_SaveDNSConfiguration();
|
||||
_SaveAdaptersConfiguration();
|
||||
if (fCurrentSettings->AutoConfigure())
|
||||
_TriggerAutoConfig(fCurrentSettings->GetName());
|
||||
_TriggerAutoConfig(fCurrentSettings->Name());
|
||||
}
|
||||
|
||||
|
||||
@@ -431,14 +431,14 @@ EthernetSettingsView::_SaveAdaptersConfiguration()
|
||||
}
|
||||
|
||||
fprintf(fp, "interface %s {\n\t\taddress {\n",
|
||||
fSettings.ItemAt(i)->GetName());
|
||||
fSettings.ItemAt(i)->Name());
|
||||
fprintf(fp, "\t\t\tfamily\tinet\n");
|
||||
fprintf(fp, "\t\t\taddress\t%s\n",
|
||||
fSettings.ItemAt(i)->GetIP());
|
||||
fSettings.ItemAt(i)->IP());
|
||||
fprintf(fp, "\t\t\tgateway\t%s\n",
|
||||
fSettings.ItemAt(i)->GetGateway());
|
||||
fSettings.ItemAt(i)->Gateway());
|
||||
fprintf(fp, "\t\t\tmask\t%s\n",
|
||||
fSettings.ItemAt(i)->GetNetmask());
|
||||
fSettings.ItemAt(i)->Netmask());
|
||||
fprintf(fp, "\t\t}\n}\n\n");
|
||||
}
|
||||
if (fp) {
|
||||
@@ -550,7 +550,7 @@ EthernetSettingsView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
for (int32 i = 0; i < fSettings.CountItems(); i++) {
|
||||
Settings* settings = fSettings.ItemAt(i);
|
||||
if (strcmp(settings->GetName(), name) == 0) {
|
||||
if (strcmp(settings->Name(), name) == 0) {
|
||||
_ShowConfiguration(settings);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2007 Haiku Inc. All rights reserved.
|
||||
* Copyright 2004-2009 Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Author:
|
||||
@@ -11,29 +11,29 @@
|
||||
#define ETHERNET_SETTINGS_VIEW_H
|
||||
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include <ObjectList.h>
|
||||
#include <View.h>
|
||||
|
||||
#include <posix/regex.h>
|
||||
|
||||
|
||||
class BButton;
|
||||
class BMenuField;
|
||||
class BPath;
|
||||
class BTextControl;
|
||||
class BStringView;
|
||||
class Settings;
|
||||
|
||||
|
||||
class EthernetSettingsView : public BView {
|
||||
public:
|
||||
EthernetSettingsView();
|
||||
virtual ~EthernetSettingsView();
|
||||
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void DetachedFromWindow();
|
||||
|
||||
|
||||
void SaveProfile(BString profileName);
|
||||
void LoadProfile(BString profileName);
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
|
||||
bool _ValidateControl(BTextControl* control);
|
||||
private:
|
||||
|
||||
|
||||
BButton* fApplyButton;
|
||||
BButton* fRevertButton;
|
||||
// TODO: buttons should be moved to window instead
|
||||
|
||||
@@ -7,8 +7,8 @@ Preference Network :
|
||||
NetworkApp.cpp
|
||||
NetworkWindow.cpp
|
||||
EthernetSettingsView.cpp
|
||||
settings.cpp
|
||||
: be root $(HAIKU_NETWORK_LIBS) $(TARGET_LIBSUPC++)
|
||||
: Network.rdef
|
||||
;
|
||||
Settings.cpp
|
||||
|
||||
: be $(HAIKU_NETWORK_LIBS) $(TARGET_LIBSUPC++)
|
||||
: Network.rdef
|
||||
;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "settings.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
@@ -24,10 +24,10 @@ public:
|
||||
void SetAutoConfigure(bool autoConfigure)
|
||||
{ fAuto = autoConfigure; }
|
||||
|
||||
const char* GetIP() { return fIP.String(); }
|
||||
const char* GetGateway() { return fGateway.String(); }
|
||||
const char* GetNetmask() { return fNetmask.String(); }
|
||||
const char* GetName() { return fName.String(); }
|
||||
const char* IP() { return fIP.String(); }
|
||||
const char* Gateway() { return fGateway.String(); }
|
||||
const char* Netmask() { return fNetmask.String(); }
|
||||
const char* Name() { return fName.String(); }
|
||||
bool AutoConfigure() { return fAuto; }
|
||||
|
||||
BObjectList<BString>& NameServers() { return fNameServers; }
|
||||
Reference in New Issue
Block a user