author | harlekin <harlekin> | 2003-06-10 13:46:02 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-06-10 13:46:02 (UTC) |
commit | 8ffea5d37080bd173d55a458296c1fc461a54d13 (patch) (side-by-side diff) | |
tree | 0c7f4a1129ed35d00742e55527ee4e4af59b562b | |
parent | 6189cb95c39acdd5b27e09f9d0798d91fa182e5a (diff) | |
download | opie-8ffea5d37080bd173d55a458296c1fc461a54d13.zip opie-8ffea5d37080bd173d55a458296c1fc461a54d13.tar.gz opie-8ffea5d37080bd173d55a458296c1fc461a54d13.tar.bz2 |
layout fixes
-rw-r--r-- | noncore/settings/networksettings/ppp/accounts.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/edit.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp index 7760d5e..04905e8 100644 --- a/noncore/settings/networksettings/ppp/accounts.cpp +++ b/noncore/settings/networksettings/ppp/accounts.cpp @@ -200,97 +200,97 @@ int AccountWidget::doTab(){ QDialog *dlg = new QDialog( 0, "newAccount", true ); QVBoxLayout *layout = new QVBoxLayout( dlg ); layout->setSpacing( 0 ); layout->setMargin( 1 ); tabWindow = new QTabWidget( dlg, "tabWindow" ); layout->addWidget( tabWindow ); bool isnewaccount; if(_pppdata->accname().isEmpty()) { dlg->setCaption(tr("New Account")); isnewaccount = true; } else { QString tit = tr("Edit Account: "); tit += _pppdata->accname(); dlg->setCaption(tit); isnewaccount = false; } // // DIAL WIDGET dial_w = new DialWidget( _pppdata, tabWindow, isnewaccount, "Dial Setup"); tabWindow->addTab( dial_w, tr("Dial") ); // // AUTH WIDGET auth_w = new AuthWidget( _pppdata, tabWindow, isnewaccount, tr("Edit Login Script")); tabWindow->addTab( auth_w, tr("Authentication") ); // // IP WIDGET ip_w = new IPWidget( _pppdata, tabWindow, isnewaccount, tr("IP Setup")); tabWindow->addTab( ip_w, tr("IP") ); // // GATEWAY WIDGET gateway_w = new GatewayWidget( _pppdata, tabWindow, isnewaccount, tr("Gateway Setup")); tabWindow->addTab( gateway_w, tr("Gateway") ); // // DNS WIDGET dns_w = new DNSWidget( _pppdata, tabWindow, isnewaccount, tr("DNS Servers") ); tabWindow->addTab( dns_w, tr("DNS") ); // // EXECUTE WIDGET ExecWidget *exec_w = new ExecWidget( _pppdata, tabWindow, isnewaccount, tr("Execute Programs")); tabWindow->addTab( exec_w, tr("Execute") ); int result = 0; bool ok = false; while (!ok){ - // dlg->showMinimized(); + dlg->showMaximized(); result = dlg->exec(); ok = true; if(result == QDialog::Accepted) { if (!auth_w->check()){ ok = false; } else if(!dial_w->save()) { QMessageBox::critical(this, "error", tr( "You must enter a unique account name")); ok = false; }else{ ip_w->save(); dns_w->save(); gateway_w->save(); auth_w->save(); exec_w->save(); } } } delete dlg; return result; } QString AccountWidget::prettyPrintVolume(unsigned int n) { int idx = 0; const QString quant[] = {tr("Byte"), tr("KB"), tr("MB"), tr("GB"), QString::null}; float n1 = n; while(n >= 1024 && quant[idx] != QString::null) { idx++; n /= 1024; } int i = idx; while(i--) n1 = n1 / 1024.0; QString s = QString::number( n1, 'f', idx==0 ? 0 : 1 ); s += " " + quant[idx]; return s; } ///////////////////////////////////////////////////////////////////////////// // diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp index b880978..0c96253 100644 --- a/noncore/settings/networksettings/ppp/edit.cpp +++ b/noncore/settings/networksettings/ppp/edit.cpp @@ -170,96 +170,97 @@ void DialWidget::numbersChanged() { void DialWidget::selectionChanged(int) { numbersChanged(); } void DialWidget::addNumber() { PhoneNumberDialog dlg(this); if(dlg.exec()) { numbers->insertItem(dlg.phoneNumber()); numbersChanged(); } } void DialWidget::delNumber() { if(numbers->currentItem() != -1) { numbers->removeItem(numbers->currentItem()); numbersChanged(); } } void DialWidget::upNumber() { int idx = numbers->currentItem(); if(idx != -1) { QString item = numbers->text(idx); numbers->removeItem(idx); numbers->insertItem(item, idx-1); numbers->setCurrentItem(idx-1); numbersChanged(); } } void DialWidget::downNumber() { int idx = numbers->currentItem(); if(idx != -1) { QString item = numbers->text(idx); numbers->removeItem(idx); numbers->insertItem(item, idx+1); numbers->setCurrentItem(idx+1); numbersChanged(); } } void DialWidget::pppdargsbutton() { PPPdArguments pa(_pppdata, this); + pa.showMaximized(); pa.exec(); } ///////////////////////////////////////////////////////////////////////////// // ExecWidget ///////////////////////////////////////////////////////////////////////////// ExecWidget::ExecWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const char *name) : QWidget(parent, name), _pppdata(pd) { QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); QLabel *l = new QLabel( tr("Here you can select commands to run at certain stages of the connection. The commands are run with your real user id, so you cannot run any commands here requiring root permissions (unless, of course, you are root).<br><br>Be sure to supply the whole path to the program otherwise we might be unable to find it."), this); tl->addWidget(l); tl->addStretch(1); QGridLayout *l1 = new QGridLayout(4, 2, 10); tl->addLayout(l1); l1->setColStretch(0, 0); l1->setColStretch(1, 1); before_connect_l = new QLabel(tr("Before connect:"), this); before_connect_l->setAlignment(AlignVCenter); l1->addWidget(before_connect_l, 0, 0); before_connect = new QLineEdit(this); // before_connect->setMaxLength(COMMAND_SIZE); l1->addWidget(before_connect, 0, 1); QString tmp = tr("Allows you to run a program <b>before</b> a connection\n" "is established. It is called immediately before\n" "dialing has begun.\n\n" "This might be useful, e.g. to stop HylaFAX blocking the\n" "modem."); QWhatsThis::add(before_connect_l,tmp); QWhatsThis::add(before_connect,tmp); command_label = new QLabel(tr("Upon connect:"), this); command_label->setAlignment(AlignVCenter); l1->addWidget(command_label, 1, 0); command = new QLineEdit(this); // command->setMaxLength(COMMAND_SIZE); l1->addWidget(command, 1, 1); tmp = tr("Allows you to run a program <b>after</b> a connection\n" "is established. When your program is called, all\n" "preparations for an Internet connection are finished.\n" "\n" |