Diffstat (limited to 'noncore/settings/networksettings/ppp/modeminfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modeminfo.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/ppp/modeminfo.cpp b/noncore/settings/networksettings/ppp/modeminfo.cpp index 0bec186..dbb26db 100644 --- a/noncore/settings/networksettings/ppp/modeminfo.cpp +++ b/noncore/settings/networksettings/ppp/modeminfo.cpp | |||
@@ -34,14 +34,12 @@ | |||
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | #include "modeminfo.h" | 35 | #include "modeminfo.h" |
36 | #include "modem.h" | 36 | #include "modem.h" |
37 | //#include <klocale.h> | ||
38 | #define i18n QObject::tr | ||
39 | 37 | ||
40 | ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name) | 38 | ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name) |
41 | : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder), | 39 | : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder), |
42 | _modem(mo) | 40 | _modem(mo) |
43 | { | 41 | { |
44 | setCaption(i18n("ATI Query")); | 42 | setCaption(QObject::tr("ATI Query")); |
45 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); | 43 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); |
46 | 44 | ||
47 | QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); | 45 | QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); |
@@ -58,17 +56,17 @@ ModemTransfer::ModemTransfer(Modem *mo, QWidget *parent, const char *name) | |||
58 | // search all these messages. This is a little overkill, so I take | 56 | // search all these messages. This is a little overkill, so I take |
59 | // the longest english message, translate it and give it additional | 57 | // the longest english message, translate it and give it additional |
60 | // 20 percent space. Hope this is enough. | 58 | // 20 percent space. Hope this is enough. |
61 | statusBar->setText(i18n("Unable to create modem lock file.")); | 59 | statusBar->setText(QObject::tr("Unable to create modem lock file.")); |
62 | statusBar->setFixedWidth((statusBar->sizeHint().width() * 12) / 10); | 60 | statusBar->setFixedWidth((statusBar->sizeHint().width() * 12) / 10); |
63 | statusBar->setFixedHeight(statusBar->sizeHint().height() + 4); | 61 | statusBar->setFixedHeight(statusBar->sizeHint().height() + 4); |
64 | 62 | ||
65 | // set original text | 63 | // set original text |
66 | statusBar->setText(i18n("Looking for modem...")); | 64 | statusBar->setText(QObject::tr("Looking for modem...")); |
67 | progressBar->setFixedHeight(statusBar->minimumSize().height()); | 65 | progressBar->setFixedHeight(statusBar->minimumSize().height()); |
68 | tl->addWidget(progressBar); | 66 | tl->addWidget(progressBar); |
69 | tl->addWidget(statusBar); | 67 | tl->addWidget(statusBar); |
70 | 68 | ||
71 | cancel = new QPushButton(i18n("Cancel"), this); | 69 | cancel = new QPushButton(QObject::tr("Cancel"), this); |
72 | cancel->setFocus(); | 70 | cancel->setFocus(); |
73 | connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); | 71 | connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); |
74 | 72 | ||
@@ -118,7 +116,7 @@ void ModemTransfer::time_out_slot() { | |||
118 | timeout_timer->stop(); | 116 | timeout_timer->stop(); |
119 | scripttimer->stop(); | 117 | scripttimer->stop(); |
120 | 118 | ||
121 | QMessageBox::warning(this, tr("Error"), i18n("Modem Query timed out.")); | 119 | QMessageBox::warning(this, tr("Error"), QObject::tr("Modem Query timed out.")); |
122 | reject(); | 120 | reject(); |
123 | } | 121 | } |
124 | 122 | ||
@@ -130,13 +128,13 @@ void ModemTransfer::init() { | |||
130 | int lock = _modem->lockdevice(); | 128 | int lock = _modem->lockdevice(); |
131 | if (lock == 1) { | 129 | if (lock == 1) { |
132 | 130 | ||
133 | statusBar->setText(i18n("Modem device is locked.")); | 131 | statusBar->setText(QObject::tr("Modem device is locked.")); |
134 | return; | 132 | return; |
135 | } | 133 | } |
136 | 134 | ||
137 | if (lock == -1) { | 135 | if (lock == -1) { |
138 | 136 | ||
139 | statusBar->setText(i18n("Unable to create modem lock file.")); | 137 | statusBar->setText(QObject::tr("Unable to create modem lock file.")); |
140 | return; | 138 | return; |
141 | } | 139 | } |
142 | 140 | ||
@@ -146,7 +144,7 @@ void ModemTransfer::init() { | |||
146 | usleep(100000); // wait 0.1 secs | 144 | usleep(100000); // wait 0.1 secs |
147 | _modem->writeLine("ATE0Q1V1"); // E0 don't echo the commands I send ... | 145 | _modem->writeLine("ATE0Q1V1"); // E0 don't echo the commands I send ... |
148 | 146 | ||
149 | statusBar->setText(i18n("Modem Ready")); | 147 | statusBar->setText(QObject::tr("Modem Ready")); |
150 | qApp->processEvents(); | 148 | qApp->processEvents(); |
151 | usleep(100000); // wait 0.1 secs | 149 | usleep(100000); // wait 0.1 secs |
152 | qApp->processEvents(); | 150 | qApp->processEvents(); |
@@ -227,7 +225,7 @@ void ModemTransfer::cancelbutton() { | |||
227 | _modem->stop(); | 225 | _modem->stop(); |
228 | timeout_timer->stop(); | 226 | timeout_timer->stop(); |
229 | 227 | ||
230 | statusBar->setText(i18n("One moment please...")); | 228 | statusBar->setText(QObject::tr("One moment please...")); |
231 | qApp->processEvents(); | 229 | qApp->processEvents(); |
232 | 230 | ||
233 | _modem->hangup(); | 231 | _modem->hangup(); |
@@ -249,7 +247,7 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name) | |||
249 | { | 247 | { |
250 | QString label_text; | 248 | QString label_text; |
251 | 249 | ||
252 | setCaption(i18n("Modem Query Results")); | 250 | setCaption(QObject::tr("Modem Query Results")); |
253 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); | 251 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); |
254 | 252 | ||
255 | QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); | 253 | QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); |
@@ -274,7 +272,7 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name) | |||
274 | //tl->addSpacing(1); | 272 | //tl->addSpacing(1); |
275 | 273 | ||
276 | QHBoxLayout *l2 = new QHBoxLayout; | 274 | QHBoxLayout *l2 = new QHBoxLayout; |
277 | QPushButton *ok = new QPushButton(i18n("Close"), this); | 275 | QPushButton *ok = new QPushButton(QObject::tr("Close"), this); |
278 | ok->setDefault(TRUE); | 276 | ok->setDefault(TRUE); |
279 | ok->setFocus(); | 277 | ok->setFocus(); |
280 | 278 | ||