Renamed "Dial" to "Connect".
Added checkbox for setting default interface (not yet implemented). Simplified "Options" tab (no ConnectOnDemand anymore). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -22,15 +22,12 @@ static const uint32 kMsgUpdateControls = 'UCTL';
|
|||||||
// labels
|
// labels
|
||||||
#ifdef LANG_GERMAN
|
#ifdef LANG_GERMAN
|
||||||
static const char *kLabelConnectionOptions = "Optionen";
|
static const char *kLabelConnectionOptions = "Optionen";
|
||||||
static const char *kLabelDialOnDemand = "Automatisch Verbinden Bei Zugriff Auf "
|
static const char *kLabelAskBeforeConnecting = "Vor Dem Verbinden Fragen";
|
||||||
"Internet";
|
static const char *kLabelAutoReconnect = "Verbindung Automatisch Wiederherstellen";
|
||||||
static const char *kLabelAskBeforeDialing = "Vor Dem Verbinden Fragen";
|
|
||||||
static const char *kLabelAutoRedial = "Verbindung Automatisch Wiederherstellen";
|
|
||||||
#else
|
#else
|
||||||
static const char *kLabelConnectionOptions = "Options";
|
static const char *kLabelConnectionOptions = "Options";
|
||||||
static const char *kLabelDialOnDemand = "Connect Automatically When Needed";
|
static const char *kLabelAskBeforeConnecting = "Ask Before Connecting";
|
||||||
static const char *kLabelAskBeforeDialing = "Ask Before Connecting";
|
static const char *kLabelAutoReconnect = "Reconnect Automatically";
|
||||||
static const char *kLabelAutoRedial = "Reconnect Automatically";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -56,7 +53,7 @@ bool
|
|||||||
ConnectionOptionsAddon::LoadSettings(BMessage *settings, BMessage *profile, bool isNew)
|
ConnectionOptionsAddon::LoadSettings(BMessage *settings, BMessage *profile, bool isNew)
|
||||||
{
|
{
|
||||||
fIsNew = isNew;
|
fIsNew = isNew;
|
||||||
fDoesDialOnDemand = fAskBeforeDialing = fDoesAutoRedial = false;
|
fAskBeforeConnecting = fDoesAutoReconnect = false;
|
||||||
fSettings = settings;
|
fSettings = settings;
|
||||||
fProfile = profile;
|
fProfile = profile;
|
||||||
|
|
||||||
@@ -69,30 +66,20 @@ ConnectionOptionsAddon::LoadSettings(BMessage *settings, BMessage *profile, bool
|
|||||||
BMessage parameter;
|
BMessage parameter;
|
||||||
int32 index = 0;
|
int32 index = 0;
|
||||||
const char *value;
|
const char *value;
|
||||||
if(FindMessageParameter(PPP_DIAL_ON_DEMAND_KEY, *fSettings, ¶meter, &index)
|
if(FindMessageParameter(PPP_ASK_BEFORE_CONNECTING_KEY, *fSettings, ¶meter,
|
||||||
&& parameter.FindString(MDSU_VALUES, &value) == B_OK) {
|
&index) && parameter.FindString(MDSU_VALUES, &value) == B_OK) {
|
||||||
if(get_boolean_value(value, false))
|
if(get_boolean_value(value, false))
|
||||||
fDoesDialOnDemand = true;
|
fAskBeforeConnecting = true;
|
||||||
|
|
||||||
parameter.AddBool(MDSU_VALID, true);
|
parameter.AddBool(MDSU_VALID, true);
|
||||||
fSettings->ReplaceMessage(MDSU_PARAMETERS, index, ¶meter);
|
fSettings->ReplaceMessage(MDSU_PARAMETERS, index, ¶meter);
|
||||||
}
|
}
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
if(FindMessageParameter(PPP_ASK_BEFORE_DIALING_KEY, *fSettings, ¶meter, &index)
|
if(FindMessageParameter(PPP_AUTO_RECONNECT_KEY, *fSettings, ¶meter, &index)
|
||||||
&& parameter.FindString(MDSU_VALUES, &value) == B_OK) {
|
&& parameter.FindString(MDSU_VALUES, &value) == B_OK) {
|
||||||
if(get_boolean_value(value, false))
|
if(get_boolean_value(value, false))
|
||||||
fAskBeforeDialing = true;
|
fDoesAutoReconnect = true;
|
||||||
|
|
||||||
parameter.AddBool(MDSU_VALID, true);
|
|
||||||
fSettings->ReplaceMessage(MDSU_PARAMETERS, index, ¶meter);
|
|
||||||
}
|
|
||||||
|
|
||||||
index = 0;
|
|
||||||
if(FindMessageParameter(PPP_AUTO_REDIAL_KEY, *fSettings, ¶meter, &index)
|
|
||||||
&& parameter.FindString(MDSU_VALUES, &value) == B_OK) {
|
|
||||||
if(get_boolean_value(value, false))
|
|
||||||
fDoesAutoRedial = true;
|
|
||||||
|
|
||||||
parameter.AddBool(MDSU_VALID, true);
|
parameter.AddBool(MDSU_VALID, true);
|
||||||
fSettings->ReplaceMessage(MDSU_PARAMETERS, index, ¶meter);
|
fSettings->ReplaceMessage(MDSU_PARAMETERS, index, ¶meter);
|
||||||
@@ -113,9 +100,8 @@ ConnectionOptionsAddon::IsModified(bool *settings, bool *profile) const
|
|||||||
if(!fSettings || !fConnectionOptionsView)
|
if(!fSettings || !fConnectionOptionsView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
*settings = DoesDialOnDemand() != fConnectionOptionsView->DoesDialOnDemand()
|
*settings = AskBeforeConnecting() != fConnectionOptionsView->AskBeforeConnecting()
|
||||||
|| AskBeforeDialing() != fConnectionOptionsView->AskBeforeDialing()
|
|| DoesAutoReconnect() != fConnectionOptionsView->DoesAutoReconnect();
|
||||||
|| DoesAutoRedial() != fConnectionOptionsView->DoesAutoRedial();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -127,23 +113,9 @@ ConnectionOptionsAddon::SaveSettings(BMessage *settings, BMessage *profile,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
BMessage parameter;
|
BMessage parameter;
|
||||||
if(fConnectionOptionsView->DoesDialOnDemand()) {
|
if(fConnectionOptionsView->DoesAutoReconnect()) {
|
||||||
parameter.MakeEmpty();
|
parameter.MakeEmpty();
|
||||||
parameter.AddString(MDSU_NAME, PPP_DIAL_ON_DEMAND_KEY);
|
parameter.AddString(MDSU_NAME, PPP_AUTO_RECONNECT_KEY);
|
||||||
parameter.AddString(MDSU_VALUES, "enabled");
|
|
||||||
settings->AddMessage(MDSU_PARAMETERS, ¶meter);
|
|
||||||
|
|
||||||
if(fConnectionOptionsView->AskBeforeDialing()) {
|
|
||||||
parameter.MakeEmpty();
|
|
||||||
parameter.AddString(MDSU_NAME, PPP_ASK_BEFORE_DIALING_KEY);
|
|
||||||
parameter.AddString(MDSU_VALUES, "enabled");
|
|
||||||
settings->AddMessage(MDSU_PARAMETERS, ¶meter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fConnectionOptionsView->DoesAutoRedial()) {
|
|
||||||
parameter.MakeEmpty();
|
|
||||||
parameter.AddString(MDSU_NAME, PPP_AUTO_REDIAL_KEY);
|
|
||||||
parameter.AddString(MDSU_VALUES, "enabled");
|
parameter.AddString(MDSU_VALUES, "enabled");
|
||||||
settings->AddMessage(MDSU_PARAMETERS, ¶meter);
|
settings->AddMessage(MDSU_PARAMETERS, ¶meter);
|
||||||
}
|
}
|
||||||
@@ -193,36 +165,25 @@ ConnectionOptionsView::ConnectionOptionsView(ConnectionOptionsAddon *addon, BRec
|
|||||||
BRect rect = Bounds();
|
BRect rect = Bounds();
|
||||||
rect.InsetBy(10, 10);
|
rect.InsetBy(10, 10);
|
||||||
rect.bottom = rect.top + 15;
|
rect.bottom = rect.top + 15;
|
||||||
fDialOnDemand = new BCheckBox(rect, "DialOnDemand", kLabelDialOnDemand,
|
fAskBeforeConnecting = new BCheckBox(rect, "AskBeforeConnecting",
|
||||||
new BMessage(kMsgUpdateControls));
|
kLabelAskBeforeConnecting, NULL);
|
||||||
rect.top = rect.bottom + 3;
|
rect.top = rect.bottom + 5;
|
||||||
rect.bottom = rect.top + 15;
|
rect.bottom = rect.top + 15;
|
||||||
rect.left += 20;
|
fAutoReconnect = new BCheckBox(rect, "AutoReconnect", kLabelAutoReconnect, NULL);
|
||||||
fAskBeforeDialing = new BCheckBox(rect, "AskBeforeDialing", kLabelAskBeforeDialing,
|
|
||||||
NULL);
|
|
||||||
rect.left -= 20;
|
|
||||||
rect.top = rect.bottom + 20;
|
|
||||||
rect.bottom = rect.top + 15;
|
|
||||||
fAutoRedial = new BCheckBox(rect, "AutoRedial", kLabelAutoRedial, NULL);
|
|
||||||
|
|
||||||
AddChild(fDialOnDemand);
|
AddChild(fAskBeforeConnecting);
|
||||||
AddChild(fAskBeforeDialing);
|
AddChild(fAutoReconnect);
|
||||||
AddChild(fAutoRedial);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ConnectionOptionsView::Reload()
|
ConnectionOptionsView::Reload()
|
||||||
{
|
{
|
||||||
fDialOnDemand->SetValue(Addon()->DoesDialOnDemand() || Addon()->IsNew());
|
fAskBeforeConnecting->SetValue(Addon()->AskBeforeConnecting());
|
||||||
// this is enabled by default
|
fAutoReconnect->SetValue(Addon()->DoesAutoReconnect());
|
||||||
fAskBeforeDialing->SetValue(Addon()->AskBeforeDialing());
|
|
||||||
fAutoRedial->SetValue(Addon()->DoesAutoRedial());
|
|
||||||
|
|
||||||
if(!Addon()->Settings())
|
if(!Addon()->Settings())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UpdateControls();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -230,27 +191,4 @@ void
|
|||||||
ConnectionOptionsView::AttachedToWindow()
|
ConnectionOptionsView::AttachedToWindow()
|
||||||
{
|
{
|
||||||
SetViewColor(Parent()->ViewColor());
|
SetViewColor(Parent()->ViewColor());
|
||||||
fDialOnDemand->SetTarget(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
ConnectionOptionsView::MessageReceived(BMessage *message)
|
|
||||||
{
|
|
||||||
switch(message->what) {
|
|
||||||
case kMsgUpdateControls:
|
|
||||||
UpdateControls();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
BView::MessageReceived(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
ConnectionOptionsView::UpdateControls()
|
|
||||||
{
|
|
||||||
fAskBeforeDialing->SetEnabled(fDialOnDemand->Value());
|
|
||||||
fAskBeforeDialing->SetValue(fDialOnDemand->Value());
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ class ConnectionOptionsAddon : public DialUpAddon {
|
|||||||
bool IsNew() const
|
bool IsNew() const
|
||||||
{ return fIsNew; }
|
{ return fIsNew; }
|
||||||
|
|
||||||
bool DoesDialOnDemand() const
|
bool AskBeforeConnecting() const
|
||||||
{ return fDoesDialOnDemand; }
|
{ return fAskBeforeConnecting; }
|
||||||
bool AskBeforeDialing() const
|
bool DoesAutoReconnect() const
|
||||||
{ return fAskBeforeDialing; }
|
{ return fDoesAutoReconnect; }
|
||||||
bool DoesAutoRedial() const
|
|
||||||
{ return fDoesAutoRedial; }
|
|
||||||
|
|
||||||
BMessage *Settings() const
|
BMessage *Settings() const
|
||||||
{ return fSettings; }
|
{ return fSettings; }
|
||||||
@@ -50,7 +48,7 @@ class ConnectionOptionsAddon : public DialUpAddon {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool fIsNew, fDeleteView;
|
bool fIsNew, fDeleteView;
|
||||||
bool fDoesDialOnDemand, fAskBeforeDialing, fDoesAutoRedial;
|
bool fAskBeforeConnecting, fDoesAutoReconnect;
|
||||||
BMessage *fSettings, *fProfile;
|
BMessage *fSettings, *fProfile;
|
||||||
// saves last settings state
|
// saves last settings state
|
||||||
ConnectionOptionsView *fConnectionOptionsView;
|
ConnectionOptionsView *fConnectionOptionsView;
|
||||||
@@ -65,22 +63,16 @@ class ConnectionOptionsView : public BView {
|
|||||||
{ return fAddon; }
|
{ return fAddon; }
|
||||||
void Reload();
|
void Reload();
|
||||||
|
|
||||||
bool DoesDialOnDemand() const
|
bool AskBeforeConnecting() const
|
||||||
{ return fDialOnDemand->Value(); }
|
{ return fAskBeforeConnecting->Value(); }
|
||||||
bool AskBeforeDialing() const
|
bool DoesAutoReconnect() const
|
||||||
{ return fAskBeforeDialing->Value(); }
|
{ return fAutoReconnect->Value(); }
|
||||||
bool DoesAutoRedial() const
|
|
||||||
{ return fAutoRedial->Value(); }
|
|
||||||
|
|
||||||
virtual void AttachedToWindow();
|
virtual void AttachedToWindow();
|
||||||
virtual void MessageReceived(BMessage *message);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void UpdateControls();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ConnectionOptionsAddon *fAddon;
|
ConnectionOptionsAddon *fAddon;
|
||||||
BCheckBox *fDialOnDemand, *fAskBeforeDialing, *fAutoRedial;
|
BCheckBox *fAskBeforeConnecting, *fAutoReconnect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/*! \class DialUpAddon
|
/*! \class DialUpAddon
|
||||||
\brief Base class for DialUpPreflet add-ons.
|
\brief Base class for DialUpPreflet add-ons.
|
||||||
|
|
||||||
Dial-Up add-ons must export the following function: \n
|
Connect-Up add-ons must export the following function: \n
|
||||||
bool register(BMessage *addons) \n
|
bool register(BMessage *addons) \n
|
||||||
You should add your DialUpAddon object to the given BMessage. \n
|
You should add your DialUpAddon object to the given BMessage. \n
|
||||||
\n
|
\n
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "DialUpView.h"
|
#include "DialUpView.h"
|
||||||
|
|
||||||
|
|
||||||
static const char *kSignature = "application/x-vnd.haiku.dial-up-preflet";
|
static const char *kSignature = "application/x-vnd.haiku.connect-up-preflet";
|
||||||
|
|
||||||
|
|
||||||
class DialUpApplication : public BApplication {
|
class DialUpApplication : public BApplication {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
DialUpPreflet.rdef
|
DialUpPreflet.rdef
|
||||||
*/
|
*/
|
||||||
|
|
||||||
resource app_signature "application/x-vnd.haiku.dial-up-preflet";
|
resource app_signature "application/x-vnd.haiku.connect-up-preflet";
|
||||||
|
|
||||||
/* BEOS:APP_FLAGS :
|
/* BEOS:APP_FLAGS :
|
||||||
00000000 = SINGLE LAUNCH
|
00000000 = SINGLE LAUNCH
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
- finish |[ ] "Default" | interface handling
|
||||||
|
- if no interface is default a newly created one becomes default
|
||||||
|
*/
|
||||||
|
|
||||||
#include "DialUpView.h"
|
#include "DialUpView.h"
|
||||||
#include "DialUpAddon.h"
|
#include "DialUpAddon.h"
|
||||||
|
|
||||||
@@ -19,6 +25,8 @@
|
|||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
|
#include <CheckBox.h>
|
||||||
|
#include <MenuBar.h>
|
||||||
#include <MenuField.h>
|
#include <MenuField.h>
|
||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
#include <Messenger.h>
|
#include <Messenger.h>
|
||||||
@@ -31,6 +39,9 @@
|
|||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
|
||||||
|
|
||||||
|
// GUI constants
|
||||||
|
static const uint32 kInterfaceFieldWidth = 175;
|
||||||
|
|
||||||
// message constants
|
// message constants
|
||||||
static const uint32 kMsgCreateNew = 'NEWI';
|
static const uint32 kMsgCreateNew = 'NEWI';
|
||||||
static const uint32 kMsgFinishCreateNew = 'FNEW';
|
static const uint32 kMsgFinishCreateNew = 'FNEW';
|
||||||
@@ -44,6 +55,7 @@ static const char *kLabelInterface = "Verbindung: ";
|
|||||||
static const char *kLabelInterfaceName = "Verbindungs-Name: ";
|
static const char *kLabelInterfaceName = "Verbindungs-Name: ";
|
||||||
static const char *kLabelCreateNewInterface = "Neue Verbindung Erstellen";
|
static const char *kLabelCreateNewInterface = "Neue Verbindung Erstellen";
|
||||||
static const char *kLabelCreateNew = "Neu...";
|
static const char *kLabelCreateNew = "Neu...";
|
||||||
|
static const char *kLabelDefaultInterface = "Standard";
|
||||||
static const char *kLabelDeleteCurrent = "Auswahl Löschen";
|
static const char *kLabelDeleteCurrent = "Auswahl Löschen";
|
||||||
static const char *kLabelConnect = "Verbinden";
|
static const char *kLabelConnect = "Verbinden";
|
||||||
static const char *kLabelDisconnect = "Trennen";
|
static const char *kLabelDisconnect = "Trennen";
|
||||||
@@ -53,6 +65,7 @@ static const char *kLabelInterface = "Interface: ";
|
|||||||
static const char *kLabelInterfaceName = "Interface Name: ";
|
static const char *kLabelInterfaceName = "Interface Name: ";
|
||||||
static const char *kLabelCreateNewInterface = "Create New Interface";
|
static const char *kLabelCreateNewInterface = "Create New Interface";
|
||||||
static const char *kLabelCreateNew = "Create New...";
|
static const char *kLabelCreateNew = "Create New...";
|
||||||
|
static const char *kLabelDefaultInterface = "Default";
|
||||||
static const char *kLabelDeleteCurrent = "Delete Current";
|
static const char *kLabelDeleteCurrent = "Delete Current";
|
||||||
static const char *kLabelConnect = "Connect";
|
static const char *kLabelConnect = "Connect";
|
||||||
static const char *kLabelDisconnect = "Disconnect";
|
static const char *kLabelDisconnect = "Disconnect";
|
||||||
@@ -137,11 +150,17 @@ DialUpView::DialUpView(BRect frame)
|
|||||||
fInterfaceMenu = new BPopUpMenu(kLabelCreateNew);
|
fInterfaceMenu = new BPopUpMenu(kLabelCreateNew);
|
||||||
BRect rect = bounds;
|
BRect rect = bounds;
|
||||||
rect.InsetBy(5, 5);
|
rect.InsetBy(5, 5);
|
||||||
|
rect.right = kInterfaceFieldWidth;
|
||||||
rect.bottom = rect.top + 20;
|
rect.bottom = rect.top + 20;
|
||||||
fMenuField = new BMenuField(rect, "Interfaces", kLabelInterface, fInterfaceMenu);
|
fMenuField = new BMenuField(rect, "Interfaces", kLabelInterface, fInterfaceMenu);
|
||||||
fMenuField->SetDivider(StringWidth(fMenuField->Label()) + 5);
|
fMenuField->SetDivider(StringWidth(fMenuField->Label()) + 5);
|
||||||
|
rect.top += 3;
|
||||||
rect.top = rect.bottom + 10;
|
rect.bottom -= 2;
|
||||||
|
rect.left = rect.right + 5;
|
||||||
|
rect.right = bounds.right - 5;
|
||||||
|
fDefaultInterface = new BCheckBox(rect, "Default", kLabelDefaultInterface, NULL);
|
||||||
|
rect.left = bounds.left + 5;
|
||||||
|
rect.top = rect.bottom + 12;
|
||||||
rect.bottom = bounds.bottom
|
rect.bottom = bounds.bottom
|
||||||
- 20 // height of bottom controls
|
- 20 // height of bottom controls
|
||||||
- 20; // space for bottom controls
|
- 20; // space for bottom controls
|
||||||
@@ -178,6 +197,7 @@ DialUpView::DialUpView(BRect frame)
|
|||||||
new BMessage(kMsgConnectButton));
|
new BMessage(kMsgConnectButton));
|
||||||
|
|
||||||
AddChild(fMenuField);
|
AddChild(fMenuField);
|
||||||
|
AddChild(fDefaultInterface);
|
||||||
AddChild(fTabView);
|
AddChild(fTabView);
|
||||||
AddChild(fStringView);
|
AddChild(fStringView);
|
||||||
AddChild(fCreateNewButton);
|
AddChild(fCreateNewButton);
|
||||||
@@ -229,6 +249,7 @@ DialUpView::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
case kMsgCreateNew: {
|
case kMsgCreateNew: {
|
||||||
|
UpdateControls();
|
||||||
(new TextRequestDialog(kLabelCreateNewInterface, kTextChooseInterfaceName,
|
(new TextRequestDialog(kLabelCreateNewInterface, kTextChooseInterfaceName,
|
||||||
kLabelInterfaceName))->Go(
|
kLabelInterfaceName))->Go(
|
||||||
new BInvoker(new BMessage(kMsgFinishCreateNew), this));
|
new BInvoker(new BMessage(kMsgFinishCreateNew), this));
|
||||||
@@ -243,6 +264,8 @@ DialUpView::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
if(fCurrentItem)
|
if(fCurrentItem)
|
||||||
fCurrentItem->SetMarked(true);
|
fCurrentItem->SetMarked(true);
|
||||||
|
|
||||||
|
UpdateControls();
|
||||||
} break;
|
} break;
|
||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
|
|
||||||
@@ -599,6 +622,8 @@ DialUpView::SelectInterface(int32 index, bool isNew = false)
|
|||||||
WatchInterface(fListener.Manager().InterfaceWithName(fCurrentItem->Label()));
|
WatchInterface(fListener.Manager().InterfaceWithName(fCurrentItem->Label()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateControls();
|
||||||
|
|
||||||
if(!fCurrentItem)
|
if(!fCurrentItem)
|
||||||
fSettings.LoadSettings(NULL, false);
|
fSettings.LoadSettings(NULL, false);
|
||||||
// tell modules to unload all settings
|
// tell modules to unload all settings
|
||||||
@@ -637,4 +662,11 @@ DialUpView::UpdateControls()
|
|||||||
fCreateNewButton->Show();
|
fCreateNewButton->Show();
|
||||||
fConnectButton->SetEnabled(false);
|
fConnectButton->SetEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float width = fInterfaceMenu->StringWidth(fMenuField->Label())
|
||||||
|
+ fInterfaceMenu->StringWidth(fInterfaceMenu->Superitem()->Label()) + 30;
|
||||||
|
if(width > kInterfaceFieldWidth)
|
||||||
|
width = kInterfaceFieldWidth;
|
||||||
|
fDefaultInterface->MoveTo(fMenuField->Frame().left + width,
|
||||||
|
fDefaultInterface->Frame().top);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class DialUpView : public BView {
|
|||||||
BButton *fConnectButton, *fCreateNewButton;
|
BButton *fConnectButton, *fCreateNewButton;
|
||||||
BPopUpMenu *fInterfaceMenu;
|
BPopUpMenu *fInterfaceMenu;
|
||||||
BMenuField *fMenuField;
|
BMenuField *fMenuField;
|
||||||
|
BCheckBox *fDefaultInterface;
|
||||||
BStringView *fStringView;
|
BStringView *fStringView;
|
||||||
// shows "No interfaces found..." notice
|
// shows "No interfaces found..." notice
|
||||||
BTabView *fTabView;
|
BTabView *fTabView;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
Short-term TODOs:
|
Short-term TODOs:
|
||||||
- add "Revert Changes" button
|
- add "Revert Changes" button
|
||||||
- load add-ons from /boot/home/config/add-ons/DialUpPreflet
|
- load add-ons from /boot/home/config/add-ons/ptp
|
||||||
- move DEVNOTES into a doxygen file and document the rest of the API
|
- move DEVNOTES into a doxygen file and document the rest of the API
|
||||||
- IPCP: check for incorrect settings (only IP addresses should be entered)
|
- IPCP: check for incorrect settings (only IP addresses should be entered)
|
||||||
- PPPoE: refresh interfaces list every second or so
|
- PPPoE: refresh interfaces list every second or so
|
||||||
- ConnectionOptions: add field for entering number of dial retries and delay between retries
|
- ConnectionOptions: add field for entering number of connect retries and delay between retries
|
||||||
|
|
||||||
Long-term TODOs:
|
Long-term TODOs:
|
||||||
- (maybe) allow selecting multiple authenticators (in expert-mode)
|
- (maybe) allow selecting multiple authenticators (in expert-mode)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TEXT_REQUEST_DIALOG__H
|
#ifndef _TEXT_REQUEST_CONNECTOG__H
|
||||||
#define _TEXT_REQUEST_DIALOG__H
|
#define _TEXT_REQUEST_CONNECTOG__H
|
||||||
|
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user