Catch a potential crash.
Small coding style cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30153 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,21 +29,21 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
"Send Mail Only",
|
"Send Mail Only",
|
||||||
"Send and Receive Mail"};
|
"Send and Receive Mail"};
|
||||||
BMenuItem *item;
|
BMenuItem *item;
|
||||||
for (int32 i = 0;i < 3;i++)
|
for (int32 i = 0; i < 3; i++)
|
||||||
chainsPopUp->AddItem(item = new BMenuItem(chainModes[i], NULL));
|
chainsPopUp->AddItem(item = new BMenuItem(chainModes[i], NULL));
|
||||||
|
|
||||||
fTypeField = new BMenuField(BRect(topLeft, rightDown),NULL,
|
fTypeField = new BMenuField(BRect(topLeft, rightDown), NULL,
|
||||||
"Account Type:",chainsPopUp);
|
"Account Type:", chainsPopUp);
|
||||||
fTypeField->SetDivider(divider);
|
fTypeField->SetDivider(divider);
|
||||||
fTypeField->Menu()->ItemAt(2)->SetMarked(true);
|
fTypeField->Menu()->ItemAt(2)->SetMarked(true);
|
||||||
//fAccount->SetType(2);
|
//fAccount->SetType(2);
|
||||||
AddChild(fTypeField);
|
AddChild(fTypeField);
|
||||||
|
|
||||||
// protocol view
|
// protocol view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fInProtocolsField = SetupProtokolView(BRect(topLeft, rightDown));
|
fInProtocolsField = SetupProtokolView(BRect(topLeft, rightDown));
|
||||||
if(fInProtocolsField){
|
if (fInProtocolsField) {
|
||||||
fTypeField->SetDivider(divider);
|
fTypeField->SetDivider(divider);
|
||||||
AddChild(fInProtocolsField);
|
AddChild(fInProtocolsField);
|
||||||
}
|
}
|
||||||
@@ -52,8 +52,8 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
GetSMTPAddonRef(&fSMTPAddonRef);
|
GetSMTPAddonRef(&fSMTPAddonRef);
|
||||||
|
|
||||||
// email view
|
// email view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fEmailView = new BTextControl(BRect(topLeft, rightDown),
|
fEmailView = new BTextControl(BRect(topLeft, rightDown),
|
||||||
"email", "E-mail Address", "",
|
"email", "E-mail Address", "",
|
||||||
new BMessage(kEMailChangedMsg));
|
new BMessage(kEMailChangedMsg));
|
||||||
@@ -61,8 +61,8 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
AddChild(fEmailView);
|
AddChild(fEmailView);
|
||||||
|
|
||||||
// login name view
|
// login name view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fLoginNameView = new BTextControl(BRect(topLeft, rightDown),
|
fLoginNameView = new BTextControl(BRect(topLeft, rightDown),
|
||||||
"login", "Login Name", "",
|
"login", "Login Name", "",
|
||||||
NULL);
|
NULL);
|
||||||
@@ -70,8 +70,8 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
AddChild(fLoginNameView);
|
AddChild(fLoginNameView);
|
||||||
|
|
||||||
// password view
|
// password view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fPasswordView = new BTextControl(BRect(topLeft, rightDown),
|
fPasswordView = new BTextControl(BRect(topLeft, rightDown),
|
||||||
"password", "Password", "",
|
"password", "Password", "",
|
||||||
NULL);
|
NULL);
|
||||||
@@ -80,8 +80,8 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
AddChild(fPasswordView);
|
AddChild(fPasswordView);
|
||||||
|
|
||||||
// account view
|
// account view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fAccountNameView = new BTextControl(BRect(topLeft, rightDown),
|
fAccountNameView = new BTextControl(BRect(topLeft, rightDown),
|
||||||
"account", "Account Name", "",
|
"account", "Account Name", "",
|
||||||
NULL);
|
NULL);
|
||||||
@@ -89,8 +89,8 @@ AutoConfigView::AutoConfigView(BRect rect, AutoConfig &config)
|
|||||||
AddChild(fAccountNameView);
|
AddChild(fAccountNameView);
|
||||||
|
|
||||||
// name view
|
// name view
|
||||||
topLeft.y+= stepSize;
|
topLeft.y += stepSize;
|
||||||
rightDown.y+= stepSize;
|
rightDown.y += stepSize;
|
||||||
fNameView = new BTextControl(BRect(topLeft, rightDown),
|
fNameView = new BTextControl(BRect(topLeft, rightDown),
|
||||||
"name", "Real Name", "",
|
"name", "Real Name", "",
|
||||||
NULL);
|
NULL);
|
||||||
@@ -313,8 +313,8 @@ ServerSettingsView::ServerSettingsView(BRect rect, const account_info &info)
|
|||||||
}
|
}
|
||||||
// inbound
|
// inbound
|
||||||
BRect boxRect = Bounds();
|
BRect boxRect = Bounds();
|
||||||
boxRect.bottom/= 2;
|
boxRect.bottom /= 2;
|
||||||
boxRect.bottom-= 5;
|
boxRect.bottom -= 5;
|
||||||
|
|
||||||
BBox *box = new BBox(boxRect);
|
BBox *box = new BBox(boxRect);
|
||||||
box->SetLabel("Inbound");
|
box->SetLabel("Inbound");
|
||||||
@@ -350,7 +350,8 @@ ServerSettingsView::ServerSettingsView(BRect rect, const account_info &info)
|
|||||||
if (info.inboundType == POP) {
|
if (info.inboundType == POP) {
|
||||||
item = fInboundEncryptionMenu->Menu()
|
item = fInboundEncryptionMenu->Menu()
|
||||||
->ItemAt(info.providerInfo.ssl_pop);
|
->ItemAt(info.providerInfo.ssl_pop);
|
||||||
item->SetMarked(true);
|
if (item)
|
||||||
|
item->SetMarked(true);
|
||||||
fInboundEncryptionMenu->MoveTo(10, 80);
|
fInboundEncryptionMenu->MoveTo(10, 80);
|
||||||
}
|
}
|
||||||
if (info.inboundType == IMAP) {
|
if (info.inboundType == IMAP) {
|
||||||
@@ -374,7 +375,7 @@ ServerSettingsView::ServerSettingsView(BRect rect, const account_info &info)
|
|||||||
// outbound
|
// outbound
|
||||||
boxRect = Bounds();
|
boxRect = Bounds();
|
||||||
boxRect.top = boxRect.bottom / 2;
|
boxRect.top = boxRect.bottom / 2;
|
||||||
boxRect.top+= 5;
|
boxRect.top += 5;
|
||||||
|
|
||||||
box = new BBox(boxRect);
|
box = new BBox(boxRect);
|
||||||
box->SetLabel("Outbound");
|
box->SetLabel("Outbound");
|
||||||
@@ -394,7 +395,8 @@ ServerSettingsView::ServerSettingsView(BRect rect, const account_info &info)
|
|||||||
if (fOutboundAuthMenu) {
|
if (fOutboundAuthMenu) {
|
||||||
BMenuItem *item = fOutboundAuthMenu->Menu()
|
BMenuItem *item = fOutboundAuthMenu->Menu()
|
||||||
->ItemAt(info.providerInfo.authentification_smtp);
|
->ItemAt(info.providerInfo.authentification_smtp);
|
||||||
item->SetMarked(true);
|
if (item)
|
||||||
|
item->SetMarked(true);
|
||||||
fOutboundAuthItemStart = item;
|
fOutboundAuthItemStart = item;
|
||||||
box->AddChild(fOutboundAuthMenu);
|
box->AddChild(fOutboundAuthMenu);
|
||||||
fOutboundAuthMenu->SetDivider(divider);
|
fOutboundAuthMenu->SetDivider(divider);
|
||||||
|
|||||||
Reference in New Issue
Block a user