summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/edit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/edit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp164
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
@@ -30,18 +30,13 @@
30#include <qwhatsthis.h> 30#include <qwhatsthis.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qapplication.h> 32#include <qapplication.h>
33//#include <kiconloader.h>
34#include <qbuttongroup.h> 33#include <qbuttongroup.h>
35//#include <klocale.h>
36#define i18n QObject::tr
37#include <qvgroupbox.h> 34#include <qvgroupbox.h>
38#include <qhbox.h> 35#include <qhbox.h>
39#include <qdialog.h> 36#include <qdialog.h>
40//#include <kwin.h>
41 37
42#include "edit.h" 38#include "edit.h"
43#include "pppdata.h" 39#include "pppdata.h"
44//#include "newwidget.h"
45#include "iplined.h" 40#include "iplined.h"
46#include "auth.h" 41#include "auth.h"
47 42
@@ -53,19 +48,19 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
53 48
54 QGridLayout *tl = new QGridLayout(this, GRIDROWS, 2, 0 );//, KDialog::spacingHint()); 49 QGridLayout *tl = new QGridLayout(this, GRIDROWS, 2, 0 );//, KDialog::spacingHint());
55 50
56 connect_label = new QLabel(i18n("Connection name:"), this); 51 connect_label = new QLabel(tr("Connection name:"), this);
57 tl->addWidget(connect_label, 0, 0); 52 tl->addWidget(connect_label, 0, 0);
58 53
59 connectname_l = new QLineEdit(this); 54 connectname_l = new QLineEdit(this);
60// connectname_l->setMaxLength(ACCNAME_SIZE); 55// connectname_l->setMaxLength(ACCNAME_SIZE);
61 tl->addWidget(connectname_l, 0, 1); 56 tl->addWidget(connectname_l, 0, 1);
62 QString tmp = i18n("Type in a unique name for this connection"); 57 QString tmp = tr("Type in a unique name for this connection");
63 58
64 QWhatsThis::add(connect_label,tmp); 59 QWhatsThis::add(connect_label,tmp);
65 QWhatsThis::add(connectname_l,tmp); 60 QWhatsThis::add(connectname_l,tmp);
66 61
67 62
68 number_label = new QLabel(i18n("Phone number:"), this); 63 number_label = new QLabel(tr("Phone number:"), this);
69 number_label->setAlignment(AlignTop|AlignLeft); 64 number_label->setAlignment(AlignTop|AlignLeft);
70 tl->addWidget(number_label, 1, 0); 65 tl->addWidget(number_label, 1, 0);
71 66
@@ -76,8 +71,8 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
76 lpn->addWidget(numbers); 71 lpn->addWidget(numbers);
77 QVBoxLayout *lpn1 = new QVBoxLayout; 72 QVBoxLayout *lpn1 = new QVBoxLayout;
78 lpn->addLayout(lpn1); 73 lpn->addLayout(lpn1);
79 add = new QPushButton(i18n("&Add..."), this); 74 add = new QPushButton(tr("&Add..."), this);
80 del = new QPushButton(i18n("&Remove"), this); 75 del = new QPushButton(tr("&Remove"), this);
81 76
82 up = new QPushButton(this); 77 up = new QPushButton(this);
83//FIXME: QPixmap pm = BarIcon("up"); 78//FIXME: QPixmap pm = BarIcon("up");
@@ -102,7 +97,7 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
102 this, SLOT(selectionChanged(int))); 97 this, SLOT(selectionChanged(int)));
103 numbersChanged(); 98 numbersChanged();
104 99
105 tmp = i18n("<p>Specifies the phone numbers to dial. You\n" 100 tmp = tr("<p>Specifies the phone numbers to dial. You\n"
106 "can supply multiple numbers here, simply\n" 101 "can supply multiple numbers here, simply\n"
107 "click on \"Add\". You can arrange the\n" 102 "click on \"Add\". You can arrange the\n"
108 "order the numbers are tried by using the\n" 103 "order the numbers are tried by using the\n"
@@ -113,17 +108,17 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
113 QWhatsThis::add(number_label,tmp); 108 QWhatsThis::add(number_label,tmp);
114 QWhatsThis::add(numbers,tmp); 109 QWhatsThis::add(numbers,tmp);
115 110
116 auth_l = new QLabel(i18n("Authentication:"), this); 111 auth_l = new QLabel(tr("Authentication:"), this);
117 tl->addWidget(auth_l, 3, 0); 112 tl->addWidget(auth_l, 3, 0);
118 113
119 auth = new QComboBox(this); 114 auth = new QComboBox(this);
120 auth->insertItem(i18n("Script-based")); 115 auth->insertItem(tr("Script-based"));
121 auth->insertItem(i18n("PAP")); 116 auth->insertItem(tr("PAP"));
122 auth->insertItem(i18n("Terminal-based")); 117 auth->insertItem(tr("Terminal-based"));
123 auth->insertItem(i18n("CHAP")); 118 auth->insertItem(tr("CHAP"));
124 auth->insertItem(i18n("PAP/CHAP")); 119 auth->insertItem(tr("PAP/CHAP"));
125 tl->addWidget(auth, 3, 1); 120 tl->addWidget(auth, 3, 1);
126 tmp = i18n("<p>Specifies the method used to identify yourself to\n" 121 tmp = tr("<p>Specifies the method used to identify yourself to\n"
127 "the PPP server. Most universities still use\n" 122 "the PPP server. Most universities still use\n"
128 "<b>Terminal</b>- or <b>Script</b>-based authentication,\n" 123 "<b>Terminal</b>- or <b>Script</b>-based authentication,\n"
129 "while most ISP use <b>PAP</b> and/or <b>CHAP</b>. If\n" 124 "while most ISP use <b>PAP</b> and/or <b>CHAP</b>. If\n"
@@ -136,11 +131,11 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
136 QWhatsThis::add(auth_l,tmp); 131 QWhatsThis::add(auth_l,tmp);
137 QWhatsThis::add(auth,tmp); 132 QWhatsThis::add(auth,tmp);
138 133
139 store_password = new QCheckBox(i18n("Store password"), this); 134 store_password = new QCheckBox(tr("Store password"), this);
140 store_password->setChecked(true); 135 store_password->setChecked(true);
141 tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight); 136 tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
142 QWhatsThis::add(store_password, 137 QWhatsThis::add(store_password,
143 i18n("<p>When this is turned on, your ISP password\n" 138 tr("<p>When this is turned on, your ISP password\n"
144 "will be saved in <i>kppp</i>'s config file, so\n" 139 "will be saved in <i>kppp</i>'s config file, so\n"
145 "you do not need to type it in every time.\n" 140 "you do not need to type it in every time.\n"
146 "\n" 141 "\n"
@@ -149,7 +144,7 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
149 "readable only to you. Make sure nobody\n" 144 "readable only to you. Make sure nobody\n"
150 "gains access to this file!")); 145 "gains access to this file!"));
151 146
152 pppdargs = new QPushButton(i18n("Customize pppd Arguments..."), this); 147 pppdargs = new QPushButton(tr("Customize pppd Arguments..."), this);
153 connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); 148 connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton()));
154 tl->addMultiCellWidget(pppdargs, 5, 5, 0, 1, AlignCenter); 149 tl->addMultiCellWidget(pppdargs, 5, 5, 0, 1, AlignCenter);
155 150
@@ -278,14 +273,8 @@ ExecWidget::ExecWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const ch
278{ 273{
279 QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); 274 QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint());
280 275
281 QLabel *l = new QLabel(\ 276 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);
282i18n("Here you can select commands to run at certain stages of the\n" 277
283 "connection. The commands are run with your real user id, so\n"
284 "you cannot run any commands here requiring root permissions\n"
285 "(unless, of course, you are root).\n\n"
286 "Be sure to supply the whole path to the program otherwise\n"
287 "kppp might be unable to find it."), this);
288// l->setMinimumHeight(l->sizeHint().height());
289 tl->addWidget(l); 278 tl->addWidget(l);
290 tl->addStretch(1); 279 tl->addStretch(1);
291 280
@@ -294,13 +283,13 @@ i18n("Here you can select commands to run at certain stages of the\n"
294 l1->setColStretch(0, 0); 283 l1->setColStretch(0, 0);
295 l1->setColStretch(1, 1); 284 l1->setColStretch(1, 1);
296 285
297 before_connect_l = new QLabel(i18n("Before connect:"), this); 286 before_connect_l = new QLabel(tr("Before connect:"), this);
298 before_connect_l->setAlignment(AlignVCenter); 287 before_connect_l->setAlignment(AlignVCenter);
299 l1->addWidget(before_connect_l, 0, 0); 288 l1->addWidget(before_connect_l, 0, 0);
300 before_connect = new QLineEdit(this); 289 before_connect = new QLineEdit(this);
301// before_connect->setMaxLength(COMMAND_SIZE); 290// before_connect->setMaxLength(COMMAND_SIZE);
302 l1->addWidget(before_connect, 0, 1); 291 l1->addWidget(before_connect, 0, 1);
303 QString tmp = i18n("Allows you to run a program <b>before</b> a connection\n" 292 QString tmp = tr("Allows you to run a program <b>before</b> a connection\n"
304 "is established. It is called immediately before\n" 293 "is established. It is called immediately before\n"
305 "dialing has begun.\n\n" 294 "dialing has begun.\n\n"
306 "This might be useful, e.g. to stop HylaFAX blocking the\n" 295 "This might be useful, e.g. to stop HylaFAX blocking the\n"
@@ -309,13 +298,13 @@ i18n("Here you can select commands to run at certain stages of the\n"
309 QWhatsThis::add(before_connect_l,tmp); 298 QWhatsThis::add(before_connect_l,tmp);
310 QWhatsThis::add(before_connect,tmp); 299 QWhatsThis::add(before_connect,tmp);
311 300
312 command_label = new QLabel(i18n("Upon connect:"), this); 301 command_label = new QLabel(tr("Upon connect:"), this);
313 command_label->setAlignment(AlignVCenter); 302 command_label->setAlignment(AlignVCenter);
314 l1->addWidget(command_label, 1, 0); 303 l1->addWidget(command_label, 1, 0);
315 command = new QLineEdit(this); 304 command = new QLineEdit(this);
316// command->setMaxLength(COMMAND_SIZE); 305// command->setMaxLength(COMMAND_SIZE);
317 l1->addWidget(command, 1, 1); 306 l1->addWidget(command, 1, 1);
318 tmp = i18n("Allows you to run a program <b>after</b> a connection\n" 307 tmp = tr("Allows you to run a program <b>after</b> a connection\n"
319 "is established. When your program is called, all\n" 308 "is established. When your program is called, all\n"
320 "preparations for an Internet connection are finished.\n" 309 "preparations for an Internet connection are finished.\n"
321 "\n" 310 "\n"
@@ -324,21 +313,21 @@ i18n("Here you can select commands to run at certain stages of the\n"
324 QWhatsThis::add(command_label,tmp); 313 QWhatsThis::add(command_label,tmp);
325 QWhatsThis::add(command,tmp); 314 QWhatsThis::add(command,tmp);
326 315
327 predisconnect_label = new QLabel(i18n("Before disconnect:"), 316 predisconnect_label = new QLabel(tr("Before disconnect:"),
328 this); 317 this);
329 predisconnect_label->setAlignment(AlignVCenter); 318 predisconnect_label->setAlignment(AlignVCenter);
330 l1->addWidget(predisconnect_label, 2, 0); 319 l1->addWidget(predisconnect_label, 2, 0);
331 predisconnect = new QLineEdit(this); 320 predisconnect = new QLineEdit(this);
332// predisconnect->setMaxLength(COMMAND_SIZE); 321// predisconnect->setMaxLength(COMMAND_SIZE);
333 l1->addWidget(predisconnect, 2, 1); 322 l1->addWidget(predisconnect, 2, 1);
334 tmp = i18n("Allows you to run a program <b>before</b> a connection\n" 323 tmp = tr("Allows you to run a program <b>before</b> a connection\n"
335 "is closed. The connection will stay open until\n" 324 "is closed. The connection will stay open until\n"
336 "the program exits."); 325 "the program exits.");
337 326
338 QWhatsThis::add(predisconnect_label,tmp); 327 QWhatsThis::add(predisconnect_label,tmp);
339 QWhatsThis::add(predisconnect,tmp); 328 QWhatsThis::add(predisconnect,tmp);
340 329
341 discommand_label = new QLabel(i18n("Upon disconnect:"), 330 discommand_label = new QLabel(tr("Upon disconnect:"),
342 this); 331 this);
343 discommand_label->setAlignment(AlignVCenter); 332 discommand_label->setAlignment(AlignVCenter);
344 l1->addWidget(discommand_label, 3, 0); 333 l1->addWidget(discommand_label, 3, 0);
@@ -346,7 +335,7 @@ i18n("Here you can select commands to run at certain stages of the\n"
346 discommand = new QLineEdit(this); 335 discommand = new QLineEdit(this);
347// discommand->setMaxLength(COMMAND_SIZE); 336// discommand->setMaxLength(COMMAND_SIZE);
348 l1->addWidget(discommand, 3, 1); 337 l1->addWidget(discommand, 3, 1);
349 tmp = i18n("Allows you to run a program <b>after</b> a connection\n" 338 tmp = tr("Allows you to run a program <b>after</b> a connection\n"
350 "has been closed."); 339 "has been closed.");
351 340
352 QWhatsThis::add(discommand_label,tmp); 341 QWhatsThis::add(discommand_label,tmp);
@@ -390,7 +379,7 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
390 QVBoxLayout *topLayout = new QVBoxLayout(this); 379 QVBoxLayout *topLayout = new QVBoxLayout(this);
391 topLayout->setSpacing( 3 );//KDialog::spacingHint()); 380 topLayout->setSpacing( 3 );//KDialog::spacingHint());
392 381
393 box = new QVGroupBox(i18n("Configuration"), this); 382 box = new QVGroupBox(tr("Configuration"), this);
394// box->setInsideSpacing( 1 );//KDialog::spacingHint()); 383// box->setInsideSpacing( 1 );//KDialog::spacingHint());
395 384
396 rb = new QButtonGroup(this); 385 rb = new QButtonGroup(this);
@@ -399,9 +388,9 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
399 SLOT(hitIPSelect(int))); 388 SLOT(hitIPSelect(int)));
400 389
401 dynamicadd_rb = new QRadioButton(box); 390 dynamicadd_rb = new QRadioButton(box);
402 dynamicadd_rb->setText(i18n("Dynamic IP address")); 391 dynamicadd_rb->setText(tr("Dynamic IP address"));
403 QWhatsThis::add(dynamicadd_rb, 392 QWhatsThis::add(dynamicadd_rb,
404 i18n("Select this option when your computer gets an\n" 393 tr("Select this option when your computer gets an\n"
405 "internet address (IP) every time a\n" 394 "internet address (IP) every time a\n"
406 "connection is made.\n" 395 "connection is made.\n"
407 "\n" 396 "\n"
@@ -409,11 +398,11 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
409 "this method, so this should be turned on.")); 398 "this method, so this should be turned on."));
410 399
411 staticadd_rb = new QRadioButton(box); 400 staticadd_rb = new QRadioButton(box);
412 staticadd_rb->setText(i18n("Static IP address")); 401 staticadd_rb->setText(tr("Static IP address"));
413 rb->insert(dynamicadd_rb, 0); 402 rb->insert(dynamicadd_rb, 0);
414 rb->insert(staticadd_rb, 1); 403 rb->insert(staticadd_rb, 1);
415 QWhatsThis::add(staticadd_rb, 404 QWhatsThis::add(staticadd_rb,
416 i18n("Select this option when your computer has a\n" 405 tr("Select this option when your computer has a\n"
417 "fixed internet address (IP). Most computers\n" 406 "fixed internet address (IP). Most computers\n"
418 "don't have this, so you should probably select\n" 407 "don't have this, so you should probably select\n"
419 "dynamic IP addressing unless you know what you\n" 408 "dynamic IP addressing unless you know what you\n"
@@ -423,8 +412,8 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
423 QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2); 412 QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2);
424 ipLayout->setSpacing( 2 );//KDialog::spacingHint()); 413 ipLayout->setSpacing( 2 );//KDialog::spacingHint());
425 414
426 ipaddress_label = new QLabel(i18n("IP address:"), ipWidget); 415 ipaddress_label = new QLabel(tr("IP address:"), ipWidget);
427 QString tmp = i18n("If your computer has a permanent internet\n" 416 QString tmp = tr("If your computer has a permanent internet\n"
428 "address, you must supply your IP address here."); 417 "address, you must supply your IP address here.");
429 ipLayout->addWidget(ipaddress_label, 0, 0); 418 ipLayout->addWidget(ipaddress_label, 0, 0);
430 419
@@ -434,8 +423,8 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
434 QWhatsThis::add(ipaddress_label,tmp); 423 QWhatsThis::add(ipaddress_label,tmp);
435 QWhatsThis::add(ipaddress_l,tmp); 424 QWhatsThis::add(ipaddress_l,tmp);
436 425
437 sub_label = new QLabel(i18n("Subnet mask:"), ipWidget); 426 sub_label = new QLabel(tr("Subnet mask:"), ipWidget);
438 tmp = i18n("<p>If your computer has a static Internet address,\n" 427 tmp = tr("<p>If your computer has a static Internet address,\n"
439 "you must supply a network mask here. In almost\n" 428 "you must supply a network mask here. In almost\n"
440 "all cases this netmask will be <b>255.255.255.0</b>,\n" 429 "all cases this netmask will be <b>255.255.255.0</b>,\n"
441 "but your mileage may vary.\n" 430 "but your mileage may vary.\n"
@@ -449,13 +438,13 @@ IPWidget::IPWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char
449 QWhatsThis::add(sub_label,tmp); 438 QWhatsThis::add(sub_label,tmp);
450 QWhatsThis::add(subnetmask_l,tmp); 439 QWhatsThis::add(subnetmask_l,tmp);
451 440
452 autoname = new QCheckBox(i18n("Auto-configure hostname from this IP"), this); 441 autoname = new QCheckBox(tr("Auto-configure hostname from this IP"), this);
453 autoname->setChecked(_pppdata->autoname()); 442 autoname->setChecked(_pppdata->autoname());
454 connect(autoname,SIGNAL(toggled(bool)), 443 connect(autoname,SIGNAL(toggled(bool)),
455 this,SLOT(autoname_t(bool))); 444 this,SLOT(autoname_t(bool)));
456 445
457 QWhatsThis::add(autoname, 446 QWhatsThis::add(autoname,
458 i18n("<p>Whenever you connect, this reconfigures\n" 447 tr("<p>Whenever you connect, this reconfigures\n"
459 "your hostname to match the IP address you\n" 448 "your hostname to match the IP address you\n"
460 "got from the PPP server. This may be useful\n" 449 "got from the PPP server. This may be useful\n"
461 "if you need to use a protocol which depends\n" 450 "if you need to use a protocol which depends\n"
@@ -496,14 +485,14 @@ void IPWidget::autoname_t(bool on) {
496 // big-fat warning when selecting the auto configure hostname option 485 // big-fat warning when selecting the auto configure hostname option
497 if(on && !was_warned) { 486 if(on && !was_warned) {
498 QMessageBox::information(this, 487 QMessageBox::information(this,
499 i18n("Selecting this option might cause some weird " 488 tr("Selecting this option might cause some weird "
500 "problems with the X-server and applications " 489 "problems with the X-server and applications "
501 "while kppp is connected. Don't use it until " 490 "while kppp is connected. Don't use it until "
502 "you know what you are doing!\n" 491 "you know what you are doing!\n"
503 "For more information take a look at the " 492 "For more information take a look at the "
504 "handbook (or help) in the section \"Frequently " 493 "handbook (or help) in the section \"Frequently "
505 "asked questions\"."), 494 "asked questions\"."),
506 i18n("Warning")); 495 tr("Warning"));
507 was_warned = true; 496 was_warned = true;
508 } 497 }
509} 498}
@@ -541,16 +530,15 @@ void IPWidget::hitIPSelect( int i ) {
541DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char *name ) 530DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const char *name )
542 : QWidget(parent, name), _pppdata(pd) 531 : QWidget(parent, name), _pppdata(pd)
543{ 532{
544 // box = new QGroupBox(this); 533 QGridLayout *tl = new QGridLayout(this, 7, 2, 0 );
545 QGridLayout *tl = new QGridLayout(this, 7, 2, 0 );//, KDialog::spacingHint());
546 534
547 dnsdomain_label = new QLabel(i18n("Domain name:"), this); 535 dnsdomain_label = new QLabel(tr("Domain name:"), this);
548 tl->addWidget(dnsdomain_label, 0, 0); 536 tl->addWidget(dnsdomain_label, 0, 0);
549 537
550 dnsdomain = new QLineEdit(this); 538 dnsdomain = new QLineEdit(this);
551// dnsdomain->setMaxLength(DOMAIN_SIZE); 539
552 tl->addWidget(dnsdomain, 0, 1); 540 tl->addWidget(dnsdomain, 0, 1);
553 QString tmp = i18n("If you enter a domain name here, this domain\n" 541 QString tmp = tr("If you enter a domain name here, this domain\n"
554 "name is used for your computer while you are\n" 542 "name is used for your computer while you are\n"
555 "connected. When the connection is closed, the\n" 543 "connected. When the connection is closed, the\n"
556 "original domain name of your computer is\n" 544 "original domain name of your computer is\n"
@@ -562,25 +550,24 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha
562 QWhatsThis::add(dnsdomain_label,tmp); 550 QWhatsThis::add(dnsdomain_label,tmp);
563 QWhatsThis::add(dnsdomain,tmp); 551 QWhatsThis::add(dnsdomain,tmp);
564 552
565 conf_label = new QLabel(i18n("Configuration:"), this); 553 conf_label = new QLabel(tr("Configuration:"), this);
566 tl->addWidget(conf_label, 1, 0); 554 tl->addWidget(conf_label, 1, 0);
567 555
568 bg = new QButtonGroup("Group", this); 556 bg = new QButtonGroup("Group", this);
569 connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int))); 557 connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int)));
570 bg->hide(); 558 bg->hide();
571 559
572 autodns = new QRadioButton(i18n("Automatic"), this); 560 autodns = new QRadioButton(tr("Automatic"), this);
573 bg->insert(autodns, 0); 561 bg->insert(autodns, 0);
574 tl->addWidget(autodns, 1, 1); 562 tl->addWidget(autodns, 1, 1);
575 // no automatic DNS detection for pppd < 2.3.7
576 if(!_pppdata->pppdVersionMin(2, 3, 7)) 563 if(!_pppdata->pppdVersionMin(2, 3, 7))
577 autodns->setEnabled(false); 564 autodns->setEnabled(false);
578 565
579 mandns = new QRadioButton(i18n("Manual"), this); 566 mandns = new QRadioButton(tr("Manual"), this);
580 bg->insert(mandns, 1); 567 bg->insert(mandns, 1);
581 tl->addWidget(mandns, 2, 1); 568 tl->addWidget(mandns, 2, 1);
582 569
583 dns_label = new QLabel(i18n("DNS IP address:"), this); 570 dns_label = new QLabel(tr("DNS IP address:"), this);
584 tl->addWidget(dns_label, 3, 0); 571 tl->addWidget(dns_label, 3, 0);
585 572
586 QHBoxLayout *l2 = new QHBoxLayout; 573 QHBoxLayout *l2 = new QHBoxLayout;
@@ -592,7 +579,7 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha
592 SLOT(DNS_Edit_Changed(const QString &))); 579 SLOT(DNS_Edit_Changed(const QString &)));
593 l2->addWidget(dnsipaddr, 1); 580 l2->addWidget(dnsipaddr, 1);
594 l2->addStretch(1); 581 l2->addStretch(1);
595 tmp = i18n("<p>Allows you to specify a new DNS server to be\n" 582 tmp = tr("<p>Allows you to specify a new DNS server to be\n"
596 "used while you are connected. When the\n" 583 "used while you are connected. When the\n"
597 "connection is closed, this DNS entry will be\n" 584 "connection is closed, this DNS entry will be\n"
598 "removed again.\n" 585 "removed again.\n"
@@ -605,29 +592,23 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha
605 592
606 QHBoxLayout *l1 = new QHBoxLayout; 593 QHBoxLayout *l1 = new QHBoxLayout;
607 tl->addLayout(l1, 4, 1); 594 tl->addLayout(l1, 4, 1);
608 add = new QPushButton(i18n("Add"), this); 595 add = new QPushButton(tr("Add"), this);
609 connect(add, SIGNAL(clicked()), SLOT(adddns())); 596 connect(add, SIGNAL(clicked()), SLOT(adddns()));
610// int width = add->sizeHint().width();
611// width = QMAX(width,60);
612// add->setMinimumWidth(width);
613 l1->addWidget(add); 597 l1->addWidget(add);
614 l1->addStretch(1); 598// l1->addStretch(1);
615 QWhatsThis::add(add, 599 QWhatsThis::add(add,
616 i18n("Click this button to add the DNS server\n" 600 tr("Click this button to add the DNS server\n"
617 "specified in the field above. The entry\n" 601 "specified in the field above. The entry\n"
618 "will then be added to the list below")); 602 "will then be added to the list below"));
619 603
620 remove = new QPushButton(i18n("Remove"), this); 604 remove = new QPushButton(tr("Remove"), this);
621 connect(remove, SIGNAL(clicked()), SLOT(removedns())); 605 connect(remove, SIGNAL(clicked()), SLOT(removedns()));
622// width = remove->sizeHint().width();
623// width = QMAX(width,60);
624// remove->setMinimumWidth(width);
625 l1->addWidget(remove); 606 l1->addWidget(remove);
626 QWhatsThis::add(remove, 607 QWhatsThis::add(remove,
627 i18n("Click this button to remove the selected DNS\n" 608 tr("Click this button to remove the selected DNS\n"
628 "server entry from the list below")); 609 "server entry from the list below"));
629 610
630 servers_label = new QLabel(i18n("DNS address list:"), this); 611 servers_label = new QLabel(tr("DNS address list:"), this);
631 servers_label->setAlignment(AlignTop|AlignLeft); 612 servers_label->setAlignment(AlignTop|AlignLeft);
632 tl->addWidget(servers_label, 5, 0); 613 tl->addWidget(servers_label, 5, 0);
633 614
@@ -636,20 +617,19 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha
636 connect(dnsservers, SIGNAL(highlighted(int)), 617 connect(dnsservers, SIGNAL(highlighted(int)),
637 SLOT(DNS_Entry_Selected(int))); 618 SLOT(DNS_Entry_Selected(int)));
638 tl->addWidget(dnsservers, 5, 1); 619 tl->addWidget(dnsservers, 5, 1);
639 tmp = i18n("<p>This shows all defined DNS servers to use\n" 620 tmp = tr("<p>This shows all defined DNS servers to use\n"
640 "while you are connected. Use the <b>Add</b> and\n" 621 "while you are connected. Use the <b>Add</b> and\n"
641 "<b>Remove</b> buttons to modify the list"); 622 "<b>Remove</b> buttons to modify the list");
642 623
643 QWhatsThis::add(servers_label,tmp); 624 QWhatsThis::add(servers_label,tmp);
644 QWhatsThis::add(dnsservers,tmp); 625 QWhatsThis::add(dnsservers,tmp);
645 626
646 exdnsdisabled_toggle = new QCheckBox(i18n( \ 627 exdnsdisabled_toggle = new QCheckBox(tr("Disable DNS servers during connection"), this);
647"Disable existing DNS servers during connection"), 628 // exdnsdisabled_toggle = new QCheckBox(tr("Disable existing DNS servers during connection"), this);
648 this);
649 exdnsdisabled_toggle->setChecked(_pppdata->exDNSDisabled()); 629 exdnsdisabled_toggle->setChecked(_pppdata->exDNSDisabled());
650 tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter); 630 tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter);
651 QWhatsThis::add(exdnsdisabled_toggle, 631 QWhatsThis::add(exdnsdisabled_toggle,
652 i18n("<p>When this option is selected, all DNS\n" 632 tr("<p>When this option is selected, all DNS\n"
653 "servers specified in <tt>/etc/resolv.conf</tt> are\n" 633 "servers specified in <tt>/etc/resolv.conf</tt> are\n"
654 "temporary disabled while the dialup connection\n" 634 "temporary disabled while the dialup connection\n"
655 "is established. After the connection is\n" 635 "is established. After the connection is\n"
@@ -737,20 +717,20 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c
737 : QWidget(parent, name), _pppdata(pd) 717 : QWidget(parent, name), _pppdata(pd)
738{ 718{
739 QVBoxLayout *topLayout = new QVBoxLayout(this); 719 QVBoxLayout *topLayout = new QVBoxLayout(this);
740 topLayout->setSpacing( 2 );//KDialog::spacingHint()); 720 topLayout->setSpacing( 2 );
721 topLayout->setMargin( 0 );
741 722
742 box = new QVGroupBox(i18n("Configuration"), this); 723 box = new QVGroupBox(tr("Configuration"), this);
743// box->setInsideSpacing( 2 );//KDialog::spacingHint());
744 724
745 rb = new QButtonGroup(this); 725 rb = new QButtonGroup(this);
746 rb->hide(); 726 rb->hide();
747 connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int))); 727 connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int)));
748 728
749 defaultgateway = new QRadioButton(box); 729 defaultgateway = new QRadioButton(box);
750 defaultgateway->setText(i18n("Default gateway")); 730 defaultgateway->setText(tr("Default gateway"));
751 rb->insert(defaultgateway, 0); 731 rb->insert(defaultgateway, 0);
752 QWhatsThis::add(defaultgateway, 732 QWhatsThis::add(defaultgateway,
753 i18n("This makes the PPP peer computer (the computer\n" 733 tr("This makes the PPP peer computer (the computer\n"
754 "you are connected to with your modem) to act as\n" 734 "you are connected to with your modem) to act as\n"
755 "a gateway. Your computer will send all packets not\n" 735 "a gateway. Your computer will send all packets not\n"
756 "going to a computer inside your local net to this\n" 736 "going to a computer inside your local net to this\n"
@@ -761,20 +741,20 @@ GatewayWidget::GatewayWidget( PPPData *pd, QWidget *parent, bool isnewaccount, c
761 741
762 742
763 staticgateway = new QRadioButton(box); 743 staticgateway = new QRadioButton(box);
764 staticgateway->setText(i18n("Static gateway")); 744 staticgateway->setText(tr("Static gateway"));
765 rb->insert(staticgateway, 1); 745 rb->insert(staticgateway, 1);
766 QWhatsThis::add(staticgateway, 746 QWhatsThis::add(staticgateway,
767 i18n("<p>Allows you to specify which computer you want\n" 747 tr("<p>Allows you to specify which computer you want\n"
768 "to use as gateway (see <i>Default Gateway</i> above)")); 748 "to use as gateway (see <i>Default Gateway</i> above)"));
769 749
770 QHBox *gateBox = new QHBox(box); 750 QHBox *gateBox = new QHBox(box);
771 gate_label = new QLabel(i18n("Gateway IP address:"), gateBox); 751 gate_label = new QLabel(tr("Gateway IP address:"), gateBox);
772 gatewayaddr = new IPLineEdit(gateBox); 752 gatewayaddr = new IPLineEdit(gateBox);
773 753
774 defaultroute = new QCheckBox(i18n("Assign the default route to this gateway"), 754 defaultroute = new QCheckBox(tr("Assign the default route to this gateway"),
775 this); 755 this);
776 QWhatsThis::add(defaultroute, 756 QWhatsThis::add(defaultroute,
777 i18n("If this option is enabled, all packets not\n" 757 tr("If this option is enabled, all packets not\n"
778 "going to the local net are routed through\n" 758 "going to the local net are routed through\n"
779 "the PPP connection.\n" 759 "the PPP connection.\n"
780 "\n" 760 "\n"
@@ -836,13 +816,13 @@ ScriptWidget::ScriptWidget( PPPData *pd, QWidget *parent, bool isnewaccount, con
836 // insert equal-sized buttons 816 // insert equal-sized buttons
837 QHBoxLayout *hl = new QHBoxLayout( this ); 817 QHBoxLayout *hl = new QHBoxLayout( this );
838 tl->addLayout( hl ); 818 tl->addLayout( hl );
839 add = new QPushButton( i18n("Add"), this ); 819 add = new QPushButton( tr("Add"), this );
840 hl->addWidget( add ); 820 hl->addWidget( add );
841 connect(add, SIGNAL(clicked()), SLOT(addButton())); 821 connect(add, SIGNAL(clicked()), SLOT(addButton()));
842 insert = new QPushButton( i18n("Insert"), this ); 822 insert = new QPushButton( tr("Insert"), this );
843 hl->addWidget( insert ); 823 hl->addWidget( insert );
844 connect(insert, SIGNAL(clicked()), SLOT(insertButton())); 824 connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
845 remove = new QPushButton( i18n("Remove"), this ); 825 remove = new QPushButton( tr("Remove"), this );
846 hl->addWidget( remove ); 826 hl->addWidget( remove );
847 connect(remove, SIGNAL(clicked()), SLOT(removeButton())); 827 connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
848 828
@@ -1155,7 +1135,7 @@ void ScriptWidget::removeButton() {
1155PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) 1135PhoneNumberDialog::PhoneNumberDialog(QWidget *parent)
1156 : QDialog(parent,"PhoneNumberDialog",true) 1136 : QDialog(parent,"PhoneNumberDialog",true)
1157{ 1137{
1158 setCaption( i18n("Add Phone Number") ); 1138 setCaption( tr("Add Phone Number") );
1159 1139
1160 1140
1161 QVBoxLayout *layout = new QVBoxLayout( this ); 1141 QVBoxLayout *layout = new QVBoxLayout( this );