summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/kpppwidget.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/kpppwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp89
1 files changed, 39 insertions, 50 deletions
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp
index 7b5c74d..e466358 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.cpp
+++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp
@@ -44,15 +44,4 @@
44#include <qbuttongroup.h> 44#include <qbuttongroup.h>
45//#include <kcmdlineargs.h>
46//#include <kconfig.h>
47//#include <kdebug.h>
48#define i18n QObject::tr
49//#include <kiconloader.h> // For BarIcon
50//#include <klocale.h>
51#include <qmessagebox.h> 45#include <qmessagebox.h>
52// #include <kseparator.h>
53// #include <kstandarddirs.h>
54// #include <kwin.h>
55// #include <khelpmenu.h>
56#include <qpushbutton.h> 46#include <qpushbutton.h>
57//#include <kguiitem.h>
58 47
@@ -80,3 +69,3 @@ KPPPWidget *p_kppp = 0;
80KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *name, bool modal, WFlags fl ) 69KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *name, bool modal, WFlags fl )
81 : QDialog(parent, name, modal, fl), _pppdata(pd) 70 : QDialog(parent, name, modal, Qt::WStyle_ContextHelp ), _pppdata(pd)
82{ 71{
@@ -110,3 +99,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
110 99
111 label1 = new QLabel(i18n("C&onnect to: "), this); 100 label1 = new QLabel(QObject::tr("C&onnect to: "), this);
112 l1->addWidget(label1, 0, 1); 101 l1->addWidget(label1, 0, 1);
@@ -120,3 +109,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
120 109
121 ID_Label = new QLabel(i18n("&Login ID:"), this); 110 ID_Label = new QLabel(QObject::tr("&Login ID:"), this);
122 l1->addWidget(ID_Label, 1, 1); 111 l1->addWidget(ID_Label, 1, 1);
@@ -129,3 +118,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
129 this, SLOT(enterPressedInID())); 118 this, SLOT(enterPressedInID()));
130 QString tmp = i18n("<p>Type in the username that you got from your\n" 119 QString tmp = QObject::tr("<p>Type in the username that you got from your\n"
131 "ISP. This is especially important for PAP\n" 120 "ISP. This is especially important for PAP\n"
@@ -140,3 +129,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
140 129
141 PW_Label = new QLabel(i18n("&Password:"), this); 130 PW_Label = new QLabel(QObject::tr("&Password:"), this);
142 l1->addWidget(PW_Label, 2, 1); 131 l1->addWidget(PW_Label, 2, 1);
@@ -150,3 +139,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
150 139
151 tmp = i18n("<p>Type in the password that you got from your\n" 140 tmp = QObject::tr("<p>Type in the password that you got from your\n"
152 "ISP. This is especially important for PAP\n" 141 "ISP. This is especially important for PAP\n"
@@ -166,3 +155,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
166 l3->addSpacing(10); 155 l3->addSpacing(10);
167 log = new QCheckBox(i18n("Show lo&g window"), this); 156 log = new QCheckBox(QObject::tr("Show lo&g window"), this);
168 connect(log, SIGNAL(toggled(bool)), 157 connect(log, SIGNAL(toggled(bool)),
@@ -173,3 +162,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
173 QWhatsThis::add(log, 162 QWhatsThis::add(log,
174 i18n("<p>This controls whether a log window is shown.\n" 163 QObject::tr("<p>This controls whether a log window is shown.\n"
175 "A log window shows the communication between\n" 164 "A log window shows the communication between\n"
@@ -188,4 +177,4 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
188 int minw = 0; 177 int minw = 0;
189 quit_b = new QPushButton(i18n("&Quit"), this); 178 quit_b = new QPushButton(QObject::tr("&Quit"), this);
190 // quit_b-> setGuiItem (KGuiItem(i18n("&Quit"), "exit" ) ); 179 // quit_b-> setGuiItem (KGuiItem(QObject::tr("&Quit"), "exit" ) );
191 connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton())); 180 connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton()));
@@ -194,4 +183,4 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
194 183
195 setup_b = new QPushButton(i18n("&Setup..."), this); 184 setup_b = new QPushButton(QObject::tr("&Setup..."), this);
196// setup_b->setGuiItem (KGuiItem(i18n("&Setup...")) ); 185// setup_b->setGuiItem (KGuiItem(QObject::tr("&Setup...")) );
197 connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton())); 186 connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton()));
@@ -205,3 +194,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
205 194
206// help_b = new QPushButton(i18n("&Help"), this); 195// help_b = new QPushButton(QObject::tr("&Help"), this);
207// connect( help_b, SIGNAL(clicked()), SLOT(helpbutton())); 196// connect( help_b, SIGNAL(clicked()), SLOT(helpbutton()));
@@ -210,3 +199,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
210// help_b->setPopup((QPopupMenu*)helpMenu->menu()); 199// help_b->setPopup((QPopupMenu*)helpMenu->menu());
211// help_b->setGuiItem (KGuiItem(i18n("&Help"), "help" ) ); 200// help_b->setGuiItem (KGuiItem(QObject::tr("&Help"), "help" ) );
212 201
@@ -215,3 +204,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
215 204
216 connect_b = new QPushButton(i18n("&Connect"), this); 205 connect_b = new QPushButton(QObject::tr("&Connect"), this);
217 connect_b->setDefault(true); 206 connect_b->setDefault(true);
@@ -288,3 +277,3 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
288// QString string; 277// QString string;
289// string = i18n("No such Account:\n%1").arg(m_strCmdlAccount); 278// string = QObject::tr("No such Account:\n%1").arg(m_strCmdlAccount);
290// KMessageBox::error(this, string); 279// KMessageBox::error(this, string);
@@ -484,10 +473,10 @@ void KPPPWidget::sigPPPDDied() {
484 if (_pppdata->pppdError() == E_IF_TIMEOUT) 473 if (_pppdata->pppdError() == E_IF_TIMEOUT)
485 msg = i18n("Timeout expired while waiting for the PPP interface " 474 msg = QObject::tr("Timeout expired while waiting for the PPP interface "
486 "to come up!"); 475 "to come up!");
487 else { 476 else {
488 msg = i18n("<p>The pppd daemon died unexpectedly!</p>"); 477 msg = QObject::tr("<p>The pppd daemon died unexpectedly!</p>");
489 Modem::modem->pppdExitStatus(); 478 Modem::modem->pppdExitStatus();
490 if (Modem::modem->lastStatus != 99) {// more recent pppds only 479 if (Modem::modem->lastStatus != 99) {// more recent pppds only
491 msg += i18n("<p>Exit status: %1").arg(Modem::modem->lastStatus); 480 msg += QObject::tr("<p>Exit status: %1").arg(Modem::modem->lastStatus);
492 msg += i18n("</p><p>See 'man pppd' for an explanation of the error " 481 msg += QObject::tr("</p><p>See 'man pppd' for an explanation of the error "
493 "codes or take a look at the kppp FAQ on " 482 "codes or take a look at the kppp FAQ on "
@@ -498,3 +487,3 @@ void KPPPWidget::sigPPPDDied() {
498 487
499 // if(QMessageBox::warning(0, msg, i18n("Error"), i18n("&OK"), i18n("&Details...")) == QMessageBox::No) 488 // if(QMessageBox::warning(0, msg, QObject::tr("Error"), QObject::tr("&OK"), QObject::tr("&Details...")) == QMessageBox::No)
500 // // PPPL_ShowLog(); 489 // // PPPL_ShowLog();
@@ -529,3 +518,3 @@ void KPPPWidget::sigPPPDDied() {
529// // helperPid = -1; 518// // helperPid = -1;
530// QString msg = i18n("kppp's helper process just died.\n" 519// QString msg = QObject::tr("kppp's helper process just died.\n"
531// "Since a further execution would be pointless, " 520// "Since a further execution would be pointless, "
@@ -562,3 +551,3 @@ void KPPPWidget::beginConnect() {
562 if(!info.exists()){ 551 if(!info.exists()){
563 QMessageBox::warning(this, "error", i18n("Cannot find the PPP daemon!\n" 552 QMessageBox::warning(this, "error", QObject::tr("Cannot find the PPP daemon!\n"
564 "Make sure that pppd is installed and " 553 "Make sure that pppd is installed and "
@@ -571,3 +560,3 @@ void KPPPWidget::beginConnect() {
571 QString string; 560 QString string;
572 string = i18n("kppp cannot execute:\n %1\n" 561 string = QObject::tr("kppp cannot execute:\n %1\n"
573 "Please make sure that you have given kppp " 562 "Please make sure that you have given kppp "
@@ -585,3 +574,3 @@ void KPPPWidget::beginConnect() {
585 QString string; 574 QString string;
586 string = i18n("kppp can not find:\n %1\nPlease make sure you have setup " 575 string = QObject::tr("kppp can not find:\n %1\nPlease make sure you have setup "
587 "your modem device properly " 576 "your modem device properly "
@@ -601,3 +590,3 @@ void KPPPWidget::beginConnect() {
601 QMessageBox::warning(this,"error", 590 QMessageBox::warning(this,"error",
602 i18n("You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!")); 591 QObject::tr("You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!"));
603 return; 592 return;
@@ -608,3 +597,3 @@ void KPPPWidget::beginConnect() {
608 QString s; 597 QString s;
609 s = i18n("Cannot create PAP/CHAP authentication\n" 598 s = QObject::tr("Cannot create PAP/CHAP authentication\n"
610 "file \"%1\"").arg(PAP_AUTH_FILE); 599 "file \"%1\"").arg(PAP_AUTH_FILE);
@@ -617,3 +606,3 @@ void KPPPWidget::beginConnect() {
617 if (_pppdata->phonenumber().isEmpty()) { 606 if (_pppdata->phonenumber().isEmpty()) {
618 QString s = i18n("You must specify a telephone number!"); 607 QString s = QObject::tr("You must specify a telephone number!");
619 QMessageBox::warning(this, "error", s); 608 QMessageBox::warning(this, "error", s);
@@ -624,3 +613,3 @@ void KPPPWidget::beginConnect() {
624 613
625 QString tit = i18n("Connecting to: %1").arg(_pppdata->accname()); 614 QString tit = QObject::tr("Connecting to: %1").arg(_pppdata->accname());
626// con->setCaption(tit); 615// con->setCaption(tit);
@@ -638,4 +627,4 @@ void KPPPWidget::disconnect() {
638 con->show(); 627 con->show();
639 con->setCaption(i18n("Disconnecting...")); 628 con->setCaption(QObject::tr("Disconnecting..."));
640 con->setMsg(i18n("Executing command before disconnection.")); 629 con->setMsg(QObject::tr("Executing command before disconnection."));
641 630
@@ -694,4 +683,4 @@ void KPPPWidget::quitbutton() {
694 int ok = QMessageBox::warning(this, 683 int ok = QMessageBox::warning(this,
695 i18n("Exiting kPPP will close your PPP Session."), 684 QObject::tr("Exiting kPPP will close your PPP Session."),
696 i18n("Quit kPPP?")); 685 QObject::tr("Quit kPPP?"));
697 if(ok == QMessageBox::Yes) { 686 if(ok == QMessageBox::Yes) {
@@ -738,3 +727,3 @@ void KPPPWidget::quitbutton() {
738// // if(!acct->loadRuleSet(_pppdata->accountingFile())) { 727// // if(!acct->loadRuleSet(_pppdata->accountingFile())) {
739// // QString s= i18n("Can not load the accounting " 728// // QString s= QObject::tr("Can not load the accounting "
740 // // "ruleset \"%1\"!").arg(_pppdata->accountingFile()); 729 // // "ruleset \"%1\"!").arg(_pppdata->accountingFile());
@@ -828,3 +817,3 @@ void KPPPWidget::showNews() {
828 QDialog dlg(0, 0, true); 817 QDialog dlg(0, 0, true);
829 dlg.setCaption(i18n("Recent Changes in KPPP")); 818 dlg.setCaption(QObject::tr("Recent Changes in KPPP"));
830 819
@@ -841,3 +830,3 @@ void KPPPWidget::showNews() {
841 830
842 QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n" 831 QLabel *l = new QLabel(QObject::tr("From version 1.4.8 on, kppp has a new feature\n"
843 "called \"Quickhelp\". It's similar to a tooltip,\n" 832 "called \"Quickhelp\". It's similar to a tooltip,\n"
@@ -853,3 +842,3 @@ void KPPPWidget::showNews() {
853 842
854 QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg); 843 QCheckBox *cb = new QCheckBox(QObject::tr("Don't show this hint again"), &dlg);
855 cb->setFixedSize(cb->sizeHint()); 844 cb->setFixedSize(cb->sizeHint());
@@ -858,3 +847,3 @@ void KPPPWidget::showNews() {
858 bbox->addStretch(1); 847 bbox->addStretch(1);
859 QPushButton *ok = bbox->addButton(i18n("OK")); 848 QPushButton *ok = bbox->addButton(QObject::tr("OK"));
860 ok->setDefault(true); 849 ok->setDefault(true);
@@ -869,3 +858,3 @@ void KPPPWidget::showNews() {
869 858
870 QString tmp = i18n("This is an example of <b>QuickHelp</b>.\n" 859 QString tmp = QObject::tr("This is an example of <b>QuickHelp</b>.\n"
871 "This window will stay open until you\n" 860 "This window will stay open until you\n"