author | tille <tille> | 2003-06-02 14:10:31 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-02 14:10:31 (UTC) |
commit | c74e5cd0fc051750c3d88cba0178f62b8ce3b5bb (patch) (side-by-side diff) | |
tree | 6a546f05d112ef9b2fb7575d4b49cfc5de4c3d52 /noncore/settings/networksettings/ppp/edit.cpp | |
parent | 2d0134f0bee1c0d33fc8cdc66ecc390080adba25 (diff) | |
download | opie-c74e5cd0fc051750c3d88cba0178f62b8ce3b5bb.zip opie-c74e5cd0fc051750c3d88cba0178f62b8ce3b5bb.tar.gz opie-c74e5cd0fc051750c3d88cba0178f62b8ce3b5bb.tar.bz2 |
layout fixes and cleanup
Diffstat (limited to 'noncore/settings/networksettings/ppp/edit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/edit.cpp | 164 |
1 files changed, 72 insertions, 92 deletions
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp index 8ae714e..10bc25c 100644 --- a/noncore/settings/networksettings/ppp/edit.cpp +++ b/noncore/settings/networksettings/ppp/edit.cpp @@ -32,6 +32,3 @@ #include <qapplication.h> -//#include <kiconloader.h> #include <qbuttongroup.h> -//#include <klocale.h> -#define i18n QObject::tr #include <qvgroupbox.h> @@ -39,3 +36,2 @@ #include <qdialog.h> -//#include <kwin.h> @@ -43,3 +39,2 @@ #include "pppdata.h" -//#include "newwidget.h" #include "iplined.h" @@ -55,3 +50,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - connect_label = new QLabel(i18n("Connection name:"), this); + connect_label = new QLabel(tr("Connection name:"), this); tl->addWidget(connect_label, 0, 0); @@ -61,3 +56,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount tl->addWidget(connectname_l, 0, 1); - QString tmp = i18n("Type in a unique name for this connection"); + QString tmp = tr("Type in a unique name for this connection"); @@ -67,3 +62,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - number_label = new QLabel(i18n("Phone number:"), this); + number_label = new QLabel(tr("Phone number:"), this); number_label->setAlignment(AlignTop|AlignLeft); @@ -78,4 +73,4 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount lpn->addLayout(lpn1); - add = new QPushButton(i18n("&Add..."), this); - del = new QPushButton(i18n("&Remove"), this); + add = new QPushButton(tr("&Add..."), this); + del = new QPushButton(tr("&Remove"), this); @@ -104,3 +99,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - tmp = i18n("<p>Specifies the phone numbers to dial. You\n" + tmp = tr("<p>Specifies the phone numbers to dial. You\n" "can supply multiple numbers here, simply\n" @@ -115,3 +110,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - auth_l = new QLabel(i18n("Authentication:"), this); + auth_l = new QLabel(tr("Authentication:"), this); tl->addWidget(auth_l, 3, 0); @@ -119,9 +114,9 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount auth = new QComboBox(this); - auth->insertItem(i18n("Script-based")); - auth->insertItem(i18n("PAP")); - auth->insertItem(i18n("Terminal-based")); - auth->insertItem(i18n("CHAP")); - auth->insertItem(i18n("PAP/CHAP")); + auth->insertItem(tr("Script-based")); + auth->insertItem(tr("PAP")); + auth->insertItem(tr("Terminal-based")); + auth->insertItem(tr("CHAP")); + auth->insertItem(tr("PAP/CHAP")); tl->addWidget(auth, 3, 1); - tmp = i18n("<p>Specifies the method used to identify yourself to\n" + tmp = tr("<p>Specifies the method used to identify yourself to\n" "the PPP server. Most universities still use\n" @@ -138,3 +133,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - store_password = new QCheckBox(i18n("Store password"), this); + store_password = new QCheckBox(tr("Store password"), this); store_password->setChecked(true); @@ -142,3 +137,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount QWhatsThis::add(store_password, - i18n("<p>When this is turned on, your ISP password\n" + tr("<p>When this is turned on, your ISP password\n" "will be saved in <i>kppp</i>'s config file, so\n" @@ -151,3 +146,3 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount - pppdargs = new QPushButton(i18n("Customize pppd Arguments..."), this); + pppdargs = new QPushButton(tr("Customize pppd Arguments..."), this); connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); @@ -280,10 +275,4 @@ ExecWidget::ExecWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const ch - QLabel *l = new QLabel(\ -i18n("Here you can select commands to run at certain stages of the\n" - "connection. The commands are run with your real user id, so\n" - "you cannot run any commands here requiring root permissions\n" - "(unless, of course, you are root).\n\n" - "Be sure to supply the whole path to the program otherwise\n" - "kppp might be unable to find it."), this); -// l->setMinimumHeight(l->sizeHint().height()); + 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); @@ -296,3 +285,3 @@ i18n("Here you can select commands to run at certain stages of the\n" - before_connect_l = new QLabel(i18n("Before connect:"), this); + before_connect_l = new QLabel(tr("Before connect:"), this); before_connect_l->setAlignment(AlignVCenter); @@ -302,3 +291,3 @@ i18n("Here you can select commands to run at certain stages of the\n" l1->addWidget(before_connect, 0, 1); - QString tmp = i18n("Allows you to run a program <b>before</b> a connection\n" + QString tmp = tr("Allows you to run a program <b>before</b> a connection\n" "is established. It is called immediately before\n" @@ -311,3 +300,3 @@ i18n("Here you can select commands to run at certain stages of the\n" - command_label = new QLabel(i18n("Upon connect:"), this); + command_label = new QLabel(tr("Upon connect:"), this); command_label->setAlignment(AlignVCenter); @@ -317,3 +306,3 @@ i18n("Here you can select commands to run at certain stages of the\n" l1->addWidget(command, 1, 1); - tmp = i18n("Allows you to run a program <b>after</b> a connection\n" + tmp = tr("Allows you to run a program <b>after</b> a connection\n" "is established. When your program is called, all\n" @@ -326,3 +315,3 @@ i18n("Here you can select commands to run at certain stages of the\n" - predisconnect_label = new QLabel(i18n("Before disconnect:"), + predisconnect_label = new QLabel(tr("Before disconnect:"), this); @@ -333,3 +322,3 @@ i18n("Here you can select commands to run at certain stages of the\n" l1->addWidget(predisconnect, 2, 1); - tmp = i18n("Allows you to run a program <b>before</b> a connection\n" + tmp = tr("Allows you to run a program <b>before</b> a connection\n" "is closed. The connection will stay open until\n" @@ -340,3 +329,3 @@ i18n("Here you can select commands to run at certain stages of the\n" - discommand_label = new QLabel(i18n("Upon disconnect:"), + discommand_label = new QLabel(tr("Upon disconnect:"), this); @@ -348,3 +337,3 @@ i18n("Here you can select commands to run at certain stages of the\n" l1->addWidget(discommand, 3, 1); - tmp = i18n("Allows you to run a program <b>after</b> a connection\n" + tmp = tr("Allows you to run a program <b>after</b> a connection\n" "has been closed."); @@ -392,3 +381,3 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char - box = new QVGroupBox(i18n("Configuration"), this); + box = new QVGroupBox(tr("Configuration"), this); // box->setInsideSpacing( 1 );//KDialog::spacingHint()); @@ -401,5 +390,5 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char dynamicadd_rb = new QRadioButton(box); - dynamicadd_rb->setText(i18n("Dynamic IP address")); + dynamicadd_rb->setText(tr("Dynamic IP address")); QWhatsThis::add(dynamicadd_rb, - i18n("Select this option when your computer gets an\n" + tr("Select this option when your computer gets an\n" "internet address (IP) every time a\n" @@ -411,3 +400,3 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char staticadd_rb = new QRadioButton(box); - staticadd_rb->setText(i18n("Static IP address")); + staticadd_rb->setText(tr("Static IP address")); rb->insert(dynamicadd_rb, 0); @@ -415,3 +404,3 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char QWhatsThis::add(staticadd_rb, - i18n("Select this option when your computer has a\n" + tr("Select this option when your computer has a\n" "fixed internet address (IP). Most computers\n" @@ -425,4 +414,4 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char - ipaddress_label = new QLabel(i18n("IP address:"), ipWidget); - QString tmp = i18n("If your computer has a permanent internet\n" + ipaddress_label = new QLabel(tr("IP address:"), ipWidget); + QString tmp = tr("If your computer has a permanent internet\n" "address, you must supply your IP address here."); @@ -436,4 +425,4 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char - sub_label = new QLabel(i18n("Subnet mask:"), ipWidget); - tmp = i18n("<p>If your computer has a static Internet address,\n" + sub_label = new QLabel(tr("Subnet mask:"), ipWidget); + tmp = tr("<p>If your computer has a static Internet address,\n" "you must supply a network mask here. In almost\n" @@ -451,3 +440,3 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char - autoname = new QCheckBox(i18n("Auto-configure hostname from this IP"), this); + autoname = new QCheckBox(tr("Auto-configure hostname from this IP"), this); autoname->setChecked(_pppdata->autoname()); @@ -457,3 +446,3 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char QWhatsThis::add(autoname, - i18n("<p>Whenever you connect, this reconfigures\n" + tr("<p>Whenever you connect, this reconfigures\n" "your hostname to match the IP address you\n" @@ -498,3 +487,3 @@ void IPWidget::autoname_t(bool on) { QMessageBox::information(this, - i18n("Selecting this option might cause some weird " + tr("Selecting this option might cause some weird " "problems with the X-server and applications " @@ -505,3 +494,3 @@ void IPWidget::autoname_t(bool on) { "asked questions\"."), - i18n("Warning")); + tr("Warning")); was_warned = true; @@ -543,6 +532,5 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha { - // box = new QGroupBox(this); - QGridLayout *tl = new QGridLayout(this, 7, 2, 0 );//, KDialog::spacingHint()); + QGridLayout *tl = new QGridLayout(this, 7, 2, 0 ); - dnsdomain_label = new QLabel(i18n("Domain name:"), this); + dnsdomain_label = new QLabel(tr("Domain name:"), this); tl->addWidget(dnsdomain_label, 0, 0); @@ -550,5 +538,5 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha dnsdomain = new QLineEdit(this); -// dnsdomain->setMaxLength(DOMAIN_SIZE); + tl->addWidget(dnsdomain, 0, 1); - QString tmp = i18n("If you enter a domain name here, this domain\n" + QString tmp = tr("If you enter a domain name here, this domain\n" "name is used for your computer while you are\n" @@ -564,3 +552,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - conf_label = new QLabel(i18n("Configuration:"), this); + conf_label = new QLabel(tr("Configuration:"), this); tl->addWidget(conf_label, 1, 0); @@ -571,6 +559,5 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - autodns = new QRadioButton(i18n("Automatic"), this); + autodns = new QRadioButton(tr("Automatic"), this); bg->insert(autodns, 0); tl->addWidget(autodns, 1, 1); - // no automatic DNS detection for pppd < 2.3.7 if(!_pppdata->pppdVersionMin(2, 3, 7)) @@ -578,3 +565,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - mandns = new QRadioButton(i18n("Manual"), this); + mandns = new QRadioButton(tr("Manual"), this); bg->insert(mandns, 1); @@ -582,3 +569,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - dns_label = new QLabel(i18n("DNS IP address:"), this); + dns_label = new QLabel(tr("DNS IP address:"), this); tl->addWidget(dns_label, 3, 0); @@ -594,3 +581,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha l2->addStretch(1); - tmp = i18n("<p>Allows you to specify a new DNS server to be\n" + tmp = tr("<p>Allows you to specify a new DNS server to be\n" "used while you are connected. When the\n" @@ -607,11 +594,8 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha tl->addLayout(l1, 4, 1); - add = new QPushButton(i18n("Add"), this); + add = new QPushButton(tr("Add"), this); connect(add, SIGNAL(clicked()), SLOT(adddns())); -// int width = add->sizeHint().width(); -// width = QMAX(width,60); -// add->setMinimumWidth(width); l1->addWidget(add); - l1->addStretch(1); +// l1->addStretch(1); QWhatsThis::add(add, - i18n("Click this button to add the DNS server\n" + tr("Click this button to add the DNS server\n" "specified in the field above. The entry\n" @@ -619,13 +603,10 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - remove = new QPushButton(i18n("Remove"), this); + remove = new QPushButton(tr("Remove"), this); connect(remove, SIGNAL(clicked()), SLOT(removedns())); -// width = remove->sizeHint().width(); -// width = QMAX(width,60); -// remove->setMinimumWidth(width); l1->addWidget(remove); QWhatsThis::add(remove, - i18n("Click this button to remove the selected DNS\n" + tr("Click this button to remove the selected DNS\n" "server entry from the list below")); - servers_label = new QLabel(i18n("DNS address list:"), this); + servers_label = new QLabel(tr("DNS address list:"), this); servers_label->setAlignment(AlignTop|AlignLeft); @@ -638,3 +619,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha tl->addWidget(dnsservers, 5, 1); - tmp = i18n("<p>This shows all defined DNS servers to use\n" + tmp = tr("<p>This shows all defined DNS servers to use\n" "while you are connected. Use the <b>Add</b> and\n" @@ -645,5 +626,4 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha - exdnsdisabled_toggle = new QCheckBox(i18n( \ -"Disable existing DNS servers during connection"), - this); + exdnsdisabled_toggle = new QCheckBox(tr("Disable DNS servers during connection"), this); + // exdnsdisabled_toggle = new QCheckBox(tr("Disable existing DNS servers during connection"), this); exdnsdisabled_toggle->setChecked(_pppdata->exDNSDisabled()); @@ -651,3 +631,3 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha QWhatsThis::add(exdnsdisabled_toggle, - i18n("<p>When this option is selected, all DNS\n" + tr("<p>When this option is selected, all DNS\n" "servers specified in <tt>/etc/resolv.conf</tt> are\n" @@ -739,6 +719,6 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c QVBoxLayout *topLayout = new QVBoxLayout(this); - topLayout->setSpacing( 2 );//KDialog::spacingHint()); + topLayout->setSpacing( 2 ); + topLayout->setMargin( 0 ); - box = new QVGroupBox(i18n("Configuration"), this); -// box->setInsideSpacing( 2 );//KDialog::spacingHint()); + box = new QVGroupBox(tr("Configuration"), this); @@ -749,6 +729,6 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c defaultgateway = new QRadioButton(box); - defaultgateway->setText(i18n("Default gateway")); + defaultgateway->setText(tr("Default gateway")); rb->insert(defaultgateway, 0); QWhatsThis::add(defaultgateway, - i18n("This makes the PPP peer computer (the computer\n" + tr("This makes the PPP peer computer (the computer\n" "you are connected to with your modem) to act as\n" @@ -763,6 +743,6 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c staticgateway = new QRadioButton(box); - staticgateway->setText(i18n("Static gateway")); + staticgateway->setText(tr("Static gateway")); rb->insert(staticgateway, 1); QWhatsThis::add(staticgateway, - i18n("<p>Allows you to specify which computer you want\n" + tr("<p>Allows you to specify which computer you want\n" "to use as gateway (see <i>Default Gateway</i> above)")); @@ -770,9 +750,9 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c QHBox *gateBox = new QHBox(box); - gate_label = new QLabel(i18n("Gateway IP address:"), gateBox); + gate_label = new QLabel(tr("Gateway IP address:"), gateBox); gatewayaddr = new IPLineEdit(gateBox); - defaultroute = new QCheckBox(i18n("Assign the default route to this gateway"), + defaultroute = new QCheckBox(tr("Assign the default route to this gateway"), this); QWhatsThis::add(defaultroute, - i18n("If this option is enabled, all packets not\n" + tr("If this option is enabled, all packets not\n" "going to the local net are routed through\n" @@ -838,9 +818,9 @@ ScriptWidget::ScriptWidget( PPPData *pd, QWidget *parent, bool isnewaccount, con tl->addLayout( hl ); - add = new QPushButton( i18n("Add"), this ); + add = new QPushButton( tr("Add"), this ); hl->addWidget( add ); connect(add, SIGNAL(clicked()), SLOT(addButton())); - insert = new QPushButton( i18n("Insert"), this ); + insert = new QPushButton( tr("Insert"), this ); hl->addWidget( insert ); connect(insert, SIGNAL(clicked()), SLOT(insertButton())); - remove = new QPushButton( i18n("Remove"), this ); + remove = new QPushButton( tr("Remove"), this ); hl->addWidget( remove ); @@ -1157,3 +1137,3 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) { - setCaption( i18n("Add Phone Number") ); + setCaption( tr("Add Phone Number") ); |