author | tille <tille> | 2003-05-25 00:47:30 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-25 00:47:30 (UTC) |
commit | 672a9a2ecd1132aadcf1043946e27339693145a4 (patch) (unidiff) | |
tree | 9393acea880576582306679081dc0d7fb16aac6c | |
parent | d1c32c127b4dabb716064a790da6be7c24975a92 (diff) | |
download | opie-672a9a2ecd1132aadcf1043946e27339693145a4.zip opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.gz opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.bz2 |
debug window gone
-rw-r--r-- | noncore/settings/networksettings/ppp/debug.cpp | 141 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/debug.h | 70 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/kpppwidget.cpp | 26 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/kpppwidget.h | 43 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/ppp.pro | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 1 |
6 files changed, 3 insertions, 282 deletions
diff --git a/noncore/settings/networksettings/ppp/debug.cpp b/noncore/settings/networksettings/ppp/debug.cpp deleted file mode 100644 index 447ccf2..0000000 --- a/noncore/settings/networksettings/ppp/debug.cpp +++ b/dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | /* | ||
2 | * kPPP: A pppd front end for the KDE project | ||
3 | * | ||
4 | * $Id$ | ||
5 | * Copyright (C) 1997 Bernd Wuebben | ||
6 | * wuebben@math.cornel.edu | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Library General Public | ||
10 | * License as published by the Free Software Foundation; either | ||
11 | * version 2 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Library General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Library General Public | ||
19 | * License along with this program; if not, write to the Free | ||
20 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include "debug.h" | ||
24 | //#include "main.h" | ||
25 | #include "pppdata.h" | ||
26 | //#include <klocale.h> | ||
27 | #define i18n QObject::tr | ||
28 | #include "kpppwidget.h" | ||
29 | #include <assert.h> | ||
30 | |||
31 | extern KPPPWidget *p_kppp; | ||
32 | |||
33 | myMultiEdit::myMultiEdit(QWidget *parent, const char *name) | ||
34 | : QMultiLineEdit(parent, name) | ||
35 | { | ||
36 | setReadOnly(true); | ||
37 | } | ||
38 | |||
39 | void myMultiEdit::insertChar(unsigned char c) { | ||
40 | QMultiLineEdit::insert(QChar(c)); | ||
41 | } | ||
42 | |||
43 | |||
44 | void myMultiEdit::newLine() { | ||
45 | QMultiLineEdit::newLine(); | ||
46 | } | ||
47 | |||
48 | |||
49 | DebugWidget::DebugWidget(QWidget *parent, const char *name) | ||
50 | : QDialog(parent, name, FALSE) | ||
51 | { | ||
52 | setCaption(i18n("Login Script Debug Window")); | ||
53 | |||
54 | text_window = new myMultiEdit(this,"debugwindow"); | ||
55 | text_window->setGeometry(2,5,400, 300); | ||
56 | // text_window->setReadOnly(FALSE); | ||
57 | |||
58 | statuslabel = new QLabel("", this, "statuslabel"); | ||
59 | |||
60 | statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | ||
61 | statuslabel->setAlignment( AlignLeft|AlignVCenter ); | ||
62 | statuslabel->setGeometry(2, 307, 400, 20); | ||
63 | //statusPageLabel->setFont( QFont("helvetica",12,QFont::Normal) ); | ||
64 | |||
65 | dismiss = new QPushButton(this); | ||
66 | dismiss->setGeometry(330,340,70,30); | ||
67 | dismiss->setText(i18n("Close")); | ||
68 | dismiss->setFocus(); | ||
69 | connect(dismiss, SIGNAL(clicked()), SLOT(hide())); | ||
70 | |||
71 | |||
72 | /* fline = new QFrame(this,"line"); | ||
73 | fline->setFrameStyle(QFrame::HLine |QFrame::Sunken); | ||
74 | fline->setGeometry(2,332,398,5);*/ | ||
75 | adjustSize(); | ||
76 | setMinimumSize(width(),height()); | ||
77 | |||
78 | } | ||
79 | |||
80 | void DebugWidget::hideEvent(QHideEvent *) | ||
81 | { | ||
82 | assert(p_kppp); | ||
83 | // p_kppp->con->debug->setOn(false); | ||
84 | } | ||
85 | |||
86 | void DebugWidget::clear() { | ||
87 | text_window->clear(); | ||
88 | } | ||
89 | |||
90 | |||
91 | void DebugWidget::addChar(unsigned char c) { | ||
92 | QString stuff; | ||
93 | |||
94 | if(c == '\r' || c == '\n') { | ||
95 | if(c == '\n') | ||
96 | text_window->newLine(); | ||
97 | } else | ||
98 | text_window->insertChar(c); | ||
99 | } | ||
100 | |||
101 | |||
102 | void DebugWidget::statusLabel(const QString &s) { | ||
103 | statuslabel->setText(s); | ||
104 | } | ||
105 | |||
106 | |||
107 | /* | ||
108 | void DebugWidget::keyPressEvent(QKeyEvent *k) { | ||
109 | } | ||
110 | |||
111 | */ | ||
112 | void DebugWidget::resizeEvent(QResizeEvent *e){ | ||
113 | int w = width() ; | ||
114 | int h = height(); | ||
115 | e = e; | ||
116 | |||
117 | text_window->setGeometry(2,5,w - 2 ,h - 63); | ||
118 | statuslabel->setGeometry(2, h - 56 , w -2 , 20); | ||
119 | dismiss->setGeometry(w - 72 , h - 32, 70, 30); | ||
120 | // fline->setGeometry(2,h -70 ,w - 4,5); | ||
121 | } | ||
122 | |||
123 | |||
124 | void DebugWidget::enter() { | ||
125 | text_window->append("\r\n"); | ||
126 | } | ||
127 | |||
128 | |||
129 | void DebugWidget::toggleVisibility() { | ||
130 | if(isVisible()) | ||
131 | hide(); | ||
132 | else | ||
133 | show(); | ||
134 | |||
135 | bool showlog = isVisible(); | ||
136 | PPPData::data()->set_show_log_window(showlog); | ||
137 | } | ||
138 | |||
139 | |||
140 | |||
141 | |||
diff --git a/noncore/settings/networksettings/ppp/debug.h b/noncore/settings/networksettings/ppp/debug.h deleted file mode 100644 index 3565cec..0000000 --- a/noncore/settings/networksettings/ppp/debug.h +++ b/dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * kPPP: A pppd front end for the KDE project | ||
3 | * | ||
4 | * $Id$ | ||
5 | * Copyright (C) 1997 Bernd Wuebben | ||
6 | * wuebben@math.cornel.edu | ||
7 | * | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU Library General Public | ||
11 | * License as published by the Free Software Foundation; either | ||
12 | * version 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * Library General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU Library General Public | ||
20 | * License along with this program; if not, write to the Free | ||
21 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef _DEBUGWIDGET_ | ||
25 | #define _DEBUGWIDGET_ | ||
26 | |||
27 | #include <qdialog.h> | ||
28 | #include <qstring.h> | ||
29 | #include <qlabel.h> | ||
30 | #include <qmultilineedit.h> | ||
31 | #include <qpushbutton.h> | ||
32 | |||
33 | |||
34 | class myMultiEdit : public QMultiLineEdit { | ||
35 | public: | ||
36 | |||
37 | myMultiEdit(QWidget *parent=0, const char *name=0); | ||
38 | |||
39 | void newLine(); | ||
40 | void insertChar(unsigned char c); | ||
41 | }; | ||
42 | |||
43 | |||
44 | class DebugWidget : public QDialog { | ||
45 | Q_OBJECT | ||
46 | public: | ||
47 | DebugWidget(QWidget *parent=0, const char *name=0); | ||
48 | |||
49 | void clear(); | ||
50 | |||
51 | public slots: | ||
52 | void statusLabel(const QString &); | ||
53 | void toggleVisibility(); | ||
54 | void addChar(unsigned char); | ||
55 | |||
56 | protected: | ||
57 | virtual void hideEvent(QHideEvent *); | ||
58 | virtual void resizeEvent(QResizeEvent *e); | ||
59 | |||
60 | private: | ||
61 | void enter(); | ||
62 | QFrame *fline; | ||
63 | QPushButton *dismiss; | ||
64 | myMultiEdit *text_window; | ||
65 | |||
66 | QLabel *statuslabel; | ||
67 | }; | ||
68 | |||
69 | #endif | ||
70 | |||
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp index 8d70cd4..f8a8dc3 100644 --- a/noncore/settings/networksettings/ppp/kpppwidget.cpp +++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp | |||
@@ -196,134 +196,117 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl | |||
196 | 196 | ||
197 | // help_b = new QPushButton(i18n("&Help"), this); | 197 | // help_b = new QPushButton(i18n("&Help"), this); |
198 | // connect( help_b, SIGNAL(clicked()), SLOT(helpbutton())); | 198 | // connect( help_b, SIGNAL(clicked()), SLOT(helpbutton())); |
199 | 199 | ||
200 | // KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true); | 200 | // KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true); |
201 | // help_b->setPopup((QPopupMenu*)helpMenu->menu()); | 201 | // help_b->setPopup((QPopupMenu*)helpMenu->menu()); |
202 | // help_b->setGuiItem (KGuiItem(i18n("&Help"), "help" ) ); | 202 | // help_b->setGuiItem (KGuiItem(i18n("&Help"), "help" ) ); |
203 | 203 | ||
204 | // if(help_b->sizeHint().width() > minw) | 204 | // if(help_b->sizeHint().width() > minw) |
205 | // minw = help_b->sizeHint().width(); | 205 | // minw = help_b->sizeHint().width(); |
206 | 206 | ||
207 | // connect_b = new QPushButton(i18n("&Connect"), this); | 207 | // connect_b = new QPushButton(i18n("&Connect"), this); |
208 | // connect_b->setDefault(true); | 208 | // connect_b->setDefault(true); |
209 | // connect_b->setFocus(); | 209 | // connect_b->setFocus(); |
210 | // connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect())); | 210 | // connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect())); |
211 | // if(connect_b->sizeHint().width() > minw) | 211 | // if(connect_b->sizeHint().width() > minw) |
212 | // minw = connect_b->sizeHint().width(); | 212 | // minw = connect_b->sizeHint().width(); |
213 | 213 | ||
214 | // quit_b->setFixedWidth(minw); | 214 | // quit_b->setFixedWidth(minw); |
215 | // setup_b->setFixedWidth(minw); | 215 | // setup_b->setFixedWidth(minw); |
216 | // // help_b->setFixedWidth(help_b->sizeHint().width()); | 216 | // // help_b->setFixedWidth(help_b->sizeHint().width()); |
217 | // connect_b->setFixedWidth(minw); | 217 | // connect_b->setFixedWidth(minw); |
218 | 218 | ||
219 | // l2->addWidget(quit_b); | 219 | // l2->addWidget(quit_b); |
220 | // l2->addWidget(setup_b); | 220 | // l2->addWidget(setup_b); |
221 | // // l2->addWidget(help_b); | 221 | // // l2->addWidget(help_b); |
222 | // l2->addSpacing(20); | 222 | // l2->addSpacing(20); |
223 | // l2->addWidget(connect_b); | 223 | // l2->addWidget(connect_b); |
224 | 224 | ||
225 | setFixedSize(sizeHint()); | 225 | setFixedSize(sizeHint()); |
226 | 226 | ||
227 | (void)new Modem; | 227 | (void)new Modem; |
228 | 228 | ||
229 | // we also connect cmld_start to the beginConnect so that I can run | 229 | // we also connect cmld_start to the beginConnect so that I can run |
230 | // the dialer through a command line argument | 230 | // the dialer through a command line argument |
231 | connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect())); | 231 | connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect())); |
232 | 232 | ||
233 | // stats = new PPPStats; | 233 | // stats = new PPPStats; |
234 | 234 | ||
235 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); | 235 | // KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); |
236 | 236 | ||
237 | // constructor of con_win reads position from config file | 237 | // constructor of con_win reads position from config file |
238 | // con_win = new ConWindow(0, "conw", this); | 238 | // con_win = new ConWindow(0, "conw", this); |
239 | // KWin::setIcons(con_win->winId(), kapp->icon(), kapp->miniIcon()); | 239 | // KWin::setIcons(con_win->winId(), kapp->icon(), kapp->miniIcon()); |
240 | 240 | ||
241 | // statdlg = new PPPStatsDlg(0, "stats", this, stats); | 241 | // statdlg = new PPPStatsDlg(0, "stats", this, stats); |
242 | // statdlg->hide(); | 242 | // statdlg->hide(); |
243 | 243 | ||
244 | debugwindow = new DebugWidget(0,"debugwindow"); | ||
245 | // KWin::setIcons(debugwindow->winId(), kapp->icon(), kapp->miniIcon()); | ||
246 | debugwindow->hide(); | ||
247 | |||
248 | // load up the accounts combo box | 244 | // load up the accounts combo box |
249 | 245 | ||
250 | // resetaccounts(); | 246 | // resetaccounts(); |
251 | // con = new ConnectWidget(0, "con"); | 247 | // con = new ConnectWidget(0, "con"); |
252 | //KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() ); | 248 | //KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() ); |
253 | // connect(this, SIGNAL(begin_connect()),con, SLOT(preinit())); | 249 | // connect(this, SIGNAL(begin_connect()),con, SLOT(preinit())); |
254 | // Is this the best we can do here? it's not right. | 250 | // Is this the best we can do here? it's not right. |
255 | // QRect desk = QApplication::desktop()->screenGeometry( | 251 | // QRect desk = QApplication::desktop()->screenGeometry( |
256 | // QApplication::desktop()->screenNumber(topLevelWidget())); | 252 | // QApplication::desktop()->screenNumber(topLevelWidget())); |
257 | // con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); | 253 | // con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); |
258 | 254 | ||
259 | // connect the ConnectWidgets various signals | 255 | // connect the ConnectWidgets various signals |
260 | // connect(con, SIGNAL(closeDebugWindow()), | ||
261 | // debugwindow, SLOT(hide())); | ||
262 | // connect(con, SIGNAL(debugMessage(const QString &)), | ||
263 | // debugwindow, SLOT(statusLabel(const QString &))); | ||
264 | // connect(con, SIGNAL(toggleDebugWindow()), | ||
265 | // debugwindow, SLOT(toggleVisibility())); | ||
266 | // connect(con, SIGNAL(debugPutChar(unsigned char)), | ||
267 | // debugwindow, SLOT(addChar(unsigned char))); | ||
268 | // // connect(con, SIGNAL(startAccounting()), | 256 | // // connect(con, SIGNAL(startAccounting()), |
269 | // // this, SLOT(startAccounting())); | 257 | // // this, SLOT(startAccounting())); |
270 | // // connect(con, SIGNAL(stopAccounting()), | 258 | // // connect(con, SIGNAL(stopAccounting()), |
271 | // // this, SLOT(stopAccounting())); | 259 | // // this, SLOT(stopAccounting())); |
272 | // connect(qApp, SIGNAL(saveYourself()), | 260 | // connect(qApp, SIGNAL(saveYourself()), |
273 | // this, SLOT(saveMyself())); | 261 | // this, SLOT(saveMyself())); |
274 | // connect(qApp, SIGNAL(shutDown()), | 262 | // connect(qApp, SIGNAL(shutDown()), |
275 | // this, SLOT(shutDown())); | 263 | // this, SLOT(shutDown())); |
276 | 264 | ||
277 | // debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55, | ||
278 | // debugwindow->width(),debugwindow->height()); | ||
279 | |||
280 | // move(desk.center().x()-width()/2, desk.center().y()-height()/2); | ||
281 | |||
282 | 265 | ||
283 | // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); | 266 | // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); |
284 | 267 | ||
285 | // m_strCmdlAccount = args->getOption("c"); | 268 | // m_strCmdlAccount = args->getOption("c"); |
286 | // m_bQuitOnDisconnect = args->isSet("q"); | 269 | // m_bQuitOnDisconnect = args->isSet("q"); |
287 | 270 | ||
288 | // if(!m_strCmdlAccount.isEmpty()) { | 271 | // if(!m_strCmdlAccount.isEmpty()) { |
289 | // m_bCmdlAccount = true; | 272 | // m_bCmdlAccount = true; |
290 | // kdDebug(5002) << "cmdl_account: " << m_bCmdlAccount << endl; | 273 | // kdDebug(5002) << "cmdl_account: " << m_bCmdlAccount << endl; |
291 | // } | 274 | // } |
292 | 275 | ||
293 | // if(m_bCmdlAccount){ | 276 | // if(m_bCmdlAccount){ |
294 | // bool result = PPPData::data()->setAccount(m_strCmdlAccount); | 277 | // bool result = PPPData::data()->setAccount(m_strCmdlAccount); |
295 | // if (!result){ | 278 | // if (!result){ |
296 | // QString string; | 279 | // QString string; |
297 | // string = i18n("No such Account:\n%1").arg(m_strCmdlAccount); | 280 | // string = i18n("No such Account:\n%1").arg(m_strCmdlAccount); |
298 | // KMessageBox::error(this, string); | 281 | // KMessageBox::error(this, string); |
299 | // m_bCmdlAccount = false; | 282 | // m_bCmdlAccount = false; |
300 | // this->show(); | 283 | // this->show(); |
301 | // } else { | 284 | // } else { |
302 | // beginConnect(); | 285 | // beginConnect(); |
303 | // } | 286 | // } |
304 | // } else | 287 | // } else |
305 | // expandbutton(); | 288 | // expandbutton(); |
306 | // show(); | 289 | // show(); |
307 | 290 | ||
308 | 291 | ||
309 | //#define KPPP_SHOW_NEWS | 292 | //#define KPPP_SHOW_NEWS |
310 | #ifdef KPPP_SHOW_NEWS | 293 | #ifdef KPPP_SHOW_NEWS |
311 | // keep user informed about recent changes | 294 | // keep user informed about recent changes |
312 | if(!m_bCmdlAccount) | 295 | if(!m_bCmdlAccount) |
313 | showNews(); | 296 | showNews(); |
314 | #endif | 297 | #endif |
315 | } | 298 | } |
316 | 299 | ||
317 | KPPPWidget::~KPPPWidget() | 300 | KPPPWidget::~KPPPWidget() |
318 | { | 301 | { |
319 | p_kppp = 0; | 302 | p_kppp = 0; |
320 | // delete stats; | 303 | // delete stats; |
321 | } | 304 | } |
322 | 305 | ||
323 | // bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { | 306 | // bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { |
324 | // if(e->type() == QEvent::User) { | 307 | // if(e->type() == QEvent::User) { |
325 | // switch(((SignalEvent*)e)->sigType()) { | 308 | // switch(((SignalEvent*)e)->sigType()) { |
326 | // case SIGINT: | 309 | // case SIGINT: |
327 | // qDebug( "Received a SIGINT" ); | 310 | // qDebug( "Received a SIGINT" ); |
328 | // interruptConnection(); | 311 | // interruptConnection(); |
329 | // break; | 312 | // break; |
@@ -590,105 +573,96 @@ void KPPPWidget::beginConnect() { | |||
590 | QString string; | 573 | QString string; |
591 | string = i18n("kppp can not find:\n %1\nPlease make sure you have setup " | 574 | string = i18n("kppp can not find:\n %1\nPlease make sure you have setup " |
592 | "your modem device properly " | 575 | "your modem device properly " |
593 | "and/or adjust the location of the modem device on " | 576 | "and/or adjust the location of the modem device on " |
594 | "the modem tab of " | 577 | "the modem tab of " |
595 | "the setup dialog.").arg(PPPData::data()->modemDevice()); | 578 | "the setup dialog.").arg(PPPData::data()->modemDevice()); |
596 | QMessageBox::warning(this, "error", string); | 579 | QMessageBox::warning(this, "error", string); |
597 | return; | 580 | return; |
598 | } | 581 | } |
599 | 582 | ||
600 | // if this is a PAP or CHAP account, ensure that username is | 583 | // if this is a PAP or CHAP account, ensure that username is |
601 | // supplied | 584 | // supplied |
602 | if(PPPData::data()->authMethod() == AUTH_PAP || | 585 | if(PPPData::data()->authMethod() == AUTH_PAP || |
603 | PPPData::data()->authMethod() == AUTH_CHAP || | 586 | PPPData::data()->authMethod() == AUTH_CHAP || |
604 | PPPData::data()->authMethod() == AUTH_PAPCHAP ) { | 587 | PPPData::data()->authMethod() == AUTH_PAPCHAP ) { |
605 | if(ID_Edit->text().isEmpty()) { | 588 | if(ID_Edit->text().isEmpty()) { |
606 | QMessageBox::warning(this,"error", | 589 | QMessageBox::warning(this,"error", |
607 | i18n( | 590 | i18n( |
608 | "You have selected the authentication " | 591 | "You have selected the authentication " |
609 | "method PAP or CHAP. This requires that you " | 592 | "method PAP or CHAP. This requires that you " |
610 | "supply a username and a password!")); | 593 | "supply a username and a password!")); |
611 | return; | 594 | return; |
612 | } else { | 595 | } else { |
613 | if(!Modem::modem->setSecret(PPPData::data()->authMethod(), | 596 | if(!Modem::modem->setSecret(PPPData::data()->authMethod(), |
614 | encodeWord(PPPData::data()->storedUsername()), | 597 | encodeWord(PPPData::data()->storedUsername()), |
615 | encodeWord(PPPData::data()->password()))) { | 598 | encodeWord(PPPData::data()->password()))) { |
616 | QString s; | 599 | QString s; |
617 | s = i18n("Cannot create PAP/CHAP authentication\n" | 600 | s = i18n("Cannot create PAP/CHAP authentication\n" |
618 | "file \"%1\"").arg(PAP_AUTH_FILE); | 601 | "file \"%1\"").arg(PAP_AUTH_FILE); |
619 | QMessageBox::warning(this, "error", s); | 602 | QMessageBox::warning(this, "error", s); |
620 | return; | 603 | return; |
621 | } | 604 | } |
622 | } | 605 | } |
623 | } | 606 | } |
624 | 607 | ||
625 | if (PPPData::data()->phonenumber().isEmpty()) { | 608 | if (PPPData::data()->phonenumber().isEmpty()) { |
626 | QString s = i18n("You must specify a telephone number!"); | 609 | QString s = i18n("You must specify a telephone number!"); |
627 | QMessageBox::warning(this, "error", s); | 610 | QMessageBox::warning(this, "error", s); |
628 | return; | 611 | return; |
629 | } | 612 | } |
630 | 613 | ||
631 | this->hide(); | 614 | this->hide(); |
632 | 615 | ||
633 | QString tit = i18n("Connecting to: %1").arg(PPPData::data()->accname()); | 616 | QString tit = i18n("Connecting to: %1").arg(PPPData::data()->accname()); |
634 | // con->setCaption(tit); | 617 | // con->setCaption(tit); |
635 | 618 | ||
636 | // con->show(); | 619 | // con->show(); |
637 | 620 | ||
638 | bool show_debug = PPPData::data()->get_show_log_window(); | ||
639 | // con->debug->setOn(show_debug);// toggle button | ||
640 | debugwindow->clear(); | ||
641 | if (!show_debug) | ||
642 | debugwindow->hide(); | ||
643 | else { | ||
644 | debugwindow->show(); | ||
645 | // con->raise(); | ||
646 | } | ||
647 | 621 | ||
648 | emit begin_connect(); | 622 | emit begin_connect(); |
649 | } | 623 | } |
650 | 624 | ||
651 | 625 | ||
652 | void KPPPWidget::disconnect() { | 626 | void KPPPWidget::disconnect() { |
653 | if (!PPPData::data()->command_before_disconnect().isEmpty()) { | 627 | if (!PPPData::data()->command_before_disconnect().isEmpty()) { |
654 | // con_win->hide(); | 628 | // con_win->hide(); |
655 | // con->show(); | 629 | // con->show(); |
656 | // con->setCaption(i18n("Disconnecting...")); | 630 | // con->setCaption(i18n("Disconnecting...")); |
657 | // con->setMsg(i18n("Executing command before disconnection.")); | 631 | // con->setMsg(i18n("Executing command before disconnection.")); |
658 | 632 | ||
659 | qApp->processEvents(); | 633 | qApp->processEvents(); |
660 | QApplication::flushX(); | 634 | QApplication::flushX(); |
661 | // pid_t id = | 635 | // pid_t id = |
662 | execute_command(PPPData::data()->command_before_disconnect()); | 636 | execute_command(PPPData::data()->command_before_disconnect()); |
663 | // int i, status; | 637 | // int i, status; |
664 | 638 | ||
665 | // do { | 639 | // do { |
666 | // kapp->processEvents(); | 640 | // kapp->processEvents(); |
667 | // i = waitpid(id, &status, WNOHANG); | 641 | // i = waitpid(id, &status, WNOHANG); |
668 | // usleep(500000); | 642 | // usleep(500000); |
669 | // } while (i == 0 && errno == 0); | 643 | // } while (i == 0 && errno == 0); |
670 | 644 | ||
671 | // con->hide(); | 645 | // con->hide(); |
672 | } | 646 | } |
673 | 647 | ||
674 | qApp->processEvents(); | 648 | qApp->processEvents(); |
675 | 649 | ||
676 | // statdlg->stop_stats(); | 650 | // statdlg->stop_stats(); |
677 | Modem::modem->killPPPDaemon(); | 651 | Modem::modem->killPPPDaemon(); |
678 | 652 | ||
679 | QApplication::flushX(); | 653 | QApplication::flushX(); |
680 | execute_command(PPPData::data()->command_on_disconnect()); | 654 | execute_command(PPPData::data()->command_on_disconnect()); |
681 | 655 | ||
682 | Modem::modem->removeSecret(AUTH_PAP); | 656 | Modem::modem->removeSecret(AUTH_PAP); |
683 | Modem::modem->removeSecret(AUTH_CHAP); | 657 | Modem::modem->removeSecret(AUTH_CHAP); |
684 | 658 | ||
685 | removedns(); | 659 | removedns(); |
686 | Modem::modem->unlockdevice(); | 660 | Modem::modem->unlockdevice(); |
687 | 661 | ||
688 | // con_win->stopClock(); | 662 | // con_win->stopClock(); |
689 | // p_kppp->stopAccounting(); | 663 | // p_kppp->stopAccounting(); |
690 | // con_win->hide(); | 664 | // con_win->hide(); |
691 | 665 | ||
692 | // DockWidget::dock_widget->stop_stats(); | 666 | // DockWidget::dock_widget->stop_stats(); |
693 | // DockWidget::dock_widget->hide(); | 667 | // DockWidget::dock_widget->hide(); |
694 | 668 | ||
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.h b/noncore/settings/networksettings/ppp/kpppwidget.h index 266d829..d7e74af 100644 --- a/noncore/settings/networksettings/ppp/kpppwidget.h +++ b/noncore/settings/networksettings/ppp/kpppwidget.h | |||
@@ -1,157 +1,114 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * kPPP: A pppd front end for the KDE project | 3 | * kPPP: A pppd front end for the KDE project |
4 | * | 4 | * |
5 | * $Id$ | 5 | * $Id$ |
6 | * | 6 | * |
7 | * Copyright (C) 1997 Bernd Johannes Wuebben | 7 | * Copyright (C) 1997 Bernd Johannes Wuebben |
8 | * wuebben@math.cornell.edu | 8 | * wuebben@math.cornell.edu |
9 | * | 9 | * |
10 | * Copyright (C) 1998-2002 Harri Porten <porten@kde.org> | 10 | * Copyright (C) 1998-2002 Harri Porten <porten@kde.org> |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU Library General Public | 13 | * modify it under the terms of the GNU Library General Public |
14 | * License as published by the Free Software Foundation; either | 14 | * License as published by the Free Software Foundation; either |
15 | * version 2 of the License, or (at your option) any later version. | 15 | * version 2 of the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This program is distributed in the hope that it will be useful, | 17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20 | * Library General Public License for more details. | 20 | * Library General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU Library General Public | 22 | * You should have received a copy of the GNU Library General Public |
23 | * License along with this program; if not, write to the Free | 23 | * License along with this program; if not, write to the Free |
24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef __KPPPWIDGET_H__ | 27 | #ifndef __KPPPWIDGET_H__ |
28 | #define __KPPPWIDGET_H__ | 28 | #define __KPPPWIDGET_H__ |
29 | 29 | ||
30 | #include <qstring.h> | 30 | #include <qstring.h> |
31 | 31 | ||
32 | //#include "accounting.h" | ||
33 | #include "conwindow.h" | 32 | #include "conwindow.h" |
34 | #include "accounts.h" | 33 | #include "accounts.h" |
35 | #include "connect.h" | 34 | #include "connect.h" |
36 | #include "debug.h" | ||
37 | //#include "pppstatdlg.h" | ||
38 | 35 | ||
39 | //class GraphSetup; | ||
40 | //class AboutWidget; | ||
41 | //class PPPStats; | ||
42 | class QDialog; | ||
43 | class QPushButton; | 36 | class QPushButton; |
44 | 37 | ||
45 | /* class SignalEvent : public QEvent { */ | ||
46 | /* public: */ | ||
47 | /* SignalEvent(int s) : QEvent(User), sig(s) { } */ | ||
48 | /* int sigType() const { return sig; } */ | ||
49 | /* private: */ | ||
50 | /* int sig; */ | ||
51 | /* }; */ | ||
52 | |||
53 | 38 | ||
54 | class KPPPWidget : public QDialog { | 39 | class KPPPWidget : public QDialog { |
55 | Q_OBJECT | 40 | Q_OBJECT |
56 | public: | 41 | public: |
57 | 42 | ||
58 | KPPPWidget( QWidget *parent=0, const char *name=0, bool modal = false, WFlags fl = 0 ); | 43 | KPPPWidget( QWidget *parent=0, const char *name=0, bool modal = false, WFlags fl = 0 ); |
59 | ~KPPPWidget(); | 44 | ~KPPPWidget(); |
60 | 45 | ||
61 | void setPW_Edit(const QString &); | 46 | void setPW_Edit(const QString &); |
62 | // virtual bool eventFilter(QObject *, QEvent *); | ||
63 | 47 | ||
64 | void setQuitOnDisconnect (bool b); | ||
65 | // bool quitOnDisconnect () {return m_bQuitOnDisconnect;}; | ||
66 | 48 | ||
67 | private slots: | 49 | private slots: |
68 | void newdefaultaccount(int); | 50 | void newdefaultaccount(int); |
69 | // void expandbutton(); | ||
70 | void beginConnect(); | 51 | void beginConnect(); |
71 | void quitbutton(); | 52 | void quitbutton(); |
72 | // void helpbutton(); | ||
73 | // void setup(); | ||
74 | // void rulesetLoadError(); | ||
75 | void usernameChanged(const QString &); | 53 | void usernameChanged(const QString &); |
76 | void passwordChanged(const QString &); | 54 | void passwordChanged(const QString &); |
77 | void enterPressedInID(); | 55 | void enterPressedInID(); |
78 | void enterPressedInPW(); | 56 | void enterPressedInPW(); |
79 | void saveMyself(); | 57 | void saveMyself(); |
80 | void shutDown(); | 58 | void shutDown(); |
81 | 59 | ||
82 | /* protected slots: */ | ||
83 | /* virtual void accept(); */ | ||
84 | /* virtual void reject(); */ | ||
85 | 60 | ||
86 | public slots: | 61 | public slots: |
87 | // void resetaccounts(); | ||
88 | /* void resetCosts(const QString &); */ | ||
89 | /* void resetVolume(const QString &); */ | ||
90 | void disconnect(); | 62 | void disconnect(); |
91 | void log_window_toggled(bool on); | 63 | void log_window_toggled(bool on); |
92 | /* void startAccounting(); */ | ||
93 | /* void stopAccounting(); */ | ||
94 | /* void showStats(); */ | ||
95 | 64 | ||
96 | signals: | 65 | signals: |
97 | void begin_connect(); | 66 | void begin_connect(); |
98 | void cmdl_start(); | 67 | void cmdl_start(); |
99 | 68 | ||
100 | public: | 69 | public: |
101 | QCheckBox *log; | 70 | QCheckBox *log; |
102 | bool connected; | 71 | bool connected; |
103 | DebugWidget *debugwindow; | ||
104 | QString con_speed; | 72 | QString con_speed; |
105 | // ConnectWidget *con; | 73 | // ConnectWidget *con; |
106 | // ConWindow *con_win; | 74 | // ConWindow *con_win; |
107 | // PPPStatsDlg *statdlg; | 75 | // PPPStatsDlg *statdlg; |
108 | // AccountingBase *acct; | 76 | // AccountingBase *acct; |
109 | QPushButton *quit_b; | 77 | QPushButton *quit_b; |
110 | //PPPStats *stats; | 78 | //PPPStats *stats; |
111 | 79 | ||
112 | private: | 80 | private: |
113 | // void prepareSetupDialog(); | 81 | // void prepareSetupDialog(); |
114 | void interruptConnection(); | 82 | void interruptConnection(); |
115 | void sigChld(); | 83 | void sigChld(); |
116 | void sigPPPDDied(); | 84 | void sigPPPDDied(); |
117 | QString encodeWord(const QString &s); | 85 | QString encodeWord(const QString &s); |
118 | void showNews (); | 86 | void showNews (); |
119 | 87 | ||
120 | QString ruleset_load_errmsg; | 88 | QString ruleset_load_errmsg; |
121 | 89 | ||
122 | // QPushButton *help_b; | ||
123 | QPushButton *setup_b; | 90 | QPushButton *setup_b; |
124 | QFrame *fline; | 91 | QFrame *fline; |
125 | QFrame *fline1; | 92 | QFrame *fline1; |
126 | QPushButton *connect_b; | 93 | QPushButton *connect_b; |
127 | QComboBox *connectto_c; | 94 | QComboBox *connectto_c; |
128 | QLabel *ID_Label; | 95 | QLabel *ID_Label; |
129 | QLabel *PW_Label; | 96 | QLabel *PW_Label; |
130 | QLineEdit *ID_Edit; | 97 | QLineEdit *ID_Edit; |
131 | QLineEdit *PW_Edit; | 98 | QLineEdit *PW_Edit; |
132 | QLabel *label1; | 99 | QLabel *label1; |
133 | QLabel *label2; | 100 | QLabel *label2; |
134 | QLabel *label3; | 101 | QLabel *label3; |
135 | QLabel *label4; | 102 | QLabel *label4; |
136 | QLabel *label5; | 103 | QLabel *label5; |
137 | QLabel *label6; | 104 | QLabel *label6; |
138 | QLabel *radio_label; | 105 | QLabel *radio_label; |
139 | 106 | ||
140 | |||
141 | // QTabWidget *tabWindow; | ||
142 | // AccountWidget *accounts; | ||
143 | // GeneralWidget *general; | ||
144 | // ModemWidget *modem1; | ||
145 | // ModemWidget2 *modem2; | ||
146 | // GraphSetup *graph; | ||
147 | // AboutWidget *about; | ||
148 | |||
149 | |||
150 | /* QString m_strCmdlAccount; */ | 107 | /* QString m_strCmdlAccount; */ |
151 | /* bool m_bQuitOnDisconnect; */ | 108 | /* bool m_bQuitOnDisconnect; */ |
152 | /* bool m_bCmdlAccount; */ | 109 | /* bool m_bCmdlAccount; */ |
153 | }; | 110 | }; |
154 | 111 | ||
155 | 112 | ||
156 | #endif | 113 | #endif |
157 | 114 | ||
diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro index ebfc713..a2e0118 100644 --- a/noncore/settings/networksettings/ppp/ppp.pro +++ b/noncore/settings/networksettings/ppp/ppp.pro | |||
@@ -1,18 +1,18 @@ | |||
1 | #TEMPLATE = app | 1 | #TEMPLATE = app |
2 | # | 2 | # |
3 | TEMPLATE = lib | 3 | TEMPLATE = lib |
4 | #CONFIG += qt warn_on release | 4 | #CONFIG += qt warn_on release |
5 | CONFIG += qt warn_on debug | 5 | CONFIG += qt warn_on debug |
6 | DESTDIR = $(OPIEDIR)/plugins/networksettings | 6 | DESTDIR = $(OPIEDIR)/plugins/networksettings |
7 | HEADERS = pppmodule.h devices.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h knuminput.h knumvalidator.h kpppwidget.h conwindow.h debug.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h | 7 | HEADERS = pppmodule.h devices.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h knuminput.h knumvalidator.h kpppwidget.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h |
8 | SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp knuminput.cpp knumvalidator.cpp kpppwidget.cpp conwindow.cpp debug.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp | 8 | SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp knuminput.cpp knumvalidator.cpp kpppwidget.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp |
9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ | 9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ |
10 | DEPENDPATH+= $(OPIEDIR)/include | 10 | DEPENDPATH+= $(OPIEDIR)/include |
11 | LIBS += -lqpe -L../interfaces/ -linterfaces | 11 | LIBS += -lqpe -L../interfaces/ -linterfaces |
12 | INTERFACES= | 12 | INTERFACES= |
13 | TARGET = pppplugin | 13 | TARGET = pppplugin |
14 | VERSION = 1.0.0 | 14 | VERSION = 1.0.0 |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | include ( $(OPIEDIR)/include.pro ) | 18 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index e13f8c8..fb2f3e5 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -35,91 +35,92 @@ void PPPModule::setProfile(const QString &newProfile){ | |||
35 | /** | 35 | /** |
36 | * get the icon name for this device. | 36 | * get the icon name for this device. |
37 | * @param Interface* can be used in determining the icon. | 37 | * @param Interface* can be used in determining the icon. |
38 | * @return QString the icon name (minus .png, .gif etc) | 38 | * @return QString the icon name (minus .png, .gif etc) |
39 | */ | 39 | */ |
40 | QString PPPModule::getPixmapName(Interface* ){ | 40 | QString PPPModule::getPixmapName(Interface* ){ |
41 | return "ppp"; | 41 | return "ppp"; |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Check to see if the interface i is owned by this module. | 45 | * Check to see if the interface i is owned by this module. |
46 | * @param Interface* interface to check against | 46 | * @param Interface* interface to check against |
47 | * @return bool true if i is owned by this module, false otherwise. | 47 | * @return bool true if i is owned by this module, false otherwise. |
48 | */ | 48 | */ |
49 | bool PPPModule::isOwner(Interface *i){ | 49 | bool PPPModule::isOwner(Interface *i){ |
50 | return list.find( i ) != -1; | 50 | return list.find( i ) != -1; |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Create, and return the WLANConfigure Module | 54 | * Create, and return the WLANConfigure Module |
55 | * @return QWidget* pointer to this modules configure. | 55 | * @return QWidget* pointer to this modules configure. |
56 | */ | 56 | */ |
57 | QWidget *PPPModule::configure(Interface *i){ | 57 | QWidget *PPPModule::configure(Interface *i){ |
58 | qDebug("return ModemWidget"); | 58 | qDebug("return ModemWidget"); |
59 | PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, | 59 | PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, |
60 | Qt::WDestructiveClose ); | 60 | Qt::WDestructiveClose ); |
61 | return pppconfig; | 61 | return pppconfig; |
62 | } | 62 | } |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Create, and return the Information Module | 65 | * Create, and return the Information Module |
66 | * @return QWidget* pointer to this modules info. | 66 | * @return QWidget* pointer to this modules info. |
67 | */ | 67 | */ |
68 | QWidget *PPPModule::information(Interface *i){ | 68 | QWidget *PPPModule::information(Interface *i){ |
69 | // We don't have any advanced pppd information widget yet :-D | 69 | // We don't have any advanced pppd information widget yet :-D |
70 | // TODO ^ | 70 | // TODO ^ |
71 | qDebug("return PPPModule::information"); | 71 | qDebug("return PPPModule::information"); |
72 | InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); | 72 | InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); |
73 | return information; | 73 | return information; |
74 | } | 74 | } |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Get all active (up or down) interfaces | 77 | * Get all active (up or down) interfaces |
78 | * @return QList<Interface> A list of interfaces that exsist that havn't | 78 | * @return QList<Interface> A list of interfaces that exsist that havn't |
79 | * been called by isOwner() | 79 | * been called by isOwner() |
80 | */ | 80 | */ |
81 | QList<Interface> PPPModule::getInterfaces(){ | 81 | QList<Interface> PPPModule::getInterfaces(){ |
82 | // List all of the files in the peer directory | 82 | // List all of the files in the peer directory |
83 | qDebug("PPPModule::getInterfaces"); | ||
83 | return list; | 84 | return list; |
84 | } | 85 | } |
85 | 86 | ||
86 | /** | 87 | /** |
87 | * Attempt to add a new interface as defined by name | 88 | * Attempt to add a new interface as defined by name |
88 | * @param name the name of the type of interface that should be created given | 89 | * @param name the name of the type of interface that should be created given |
89 | * by possibleNewInterfaces(); | 90 | * by possibleNewInterfaces(); |
90 | * @return Interface* NULL if it was unable to be created. | 91 | * @return Interface* NULL if it was unable to be created. |
91 | */ | 92 | */ |
92 | Interface *PPPModule::addNewInterface(const QString &newInterface){ | 93 | Interface *PPPModule::addNewInterface(const QString &newInterface){ |
93 | 94 | ||
94 | qDebug("try to add iface %s",newInterface.latin1()); | 95 | qDebug("try to add iface %s",newInterface.latin1()); |
95 | 96 | ||
96 | PPPConfigWidget imp(0, "PPPConfigImp", true); | 97 | PPPConfigWidget imp(0, "PPPConfigImp", true); |
97 | imp.showMaximized(); | 98 | imp.showMaximized(); |
98 | if(imp.exec() == QDialog::Accepted ){ | 99 | if(imp.exec() == QDialog::Accepted ){ |
99 | qDebug("ACCEPTED"); | 100 | qDebug("ACCEPTED"); |
100 | PPPData::data()->save(); | 101 | PPPData::data()->save(); |
101 | Interface *iface; | 102 | Interface *iface; |
102 | iface = new Interface( 0, PPPData::data()->modemDevice() ); | 103 | iface = new Interface( 0, PPPData::data()->modemDevice() ); |
103 | iface->setHardwareName( PPPData::data()->accname() ); | 104 | iface->setHardwareName( PPPData::data()->accname() ); |
104 | list.append( iface ); | 105 | list.append( iface ); |
105 | return iface; | 106 | return iface; |
106 | } | 107 | } |
107 | return NULL; | 108 | return NULL; |
108 | } | 109 | } |
109 | 110 | ||
110 | /** | 111 | /** |
111 | * Attempts to remove the interface, doesn't delete i | 112 | * Attempts to remove the interface, doesn't delete i |
112 | * @return bool true if successfull, false otherwise. | 113 | * @return bool true if successfull, false otherwise. |
113 | */ | 114 | */ |
114 | bool PPPModule::remove(Interface*){ | 115 | bool PPPModule::remove(Interface*){ |
115 | // Can't remove a hardware device, you can stop it though. | 116 | // Can't remove a hardware device, you can stop it though. |
116 | return false; | 117 | return false; |
117 | } | 118 | } |
118 | 119 | ||
119 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 120 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) |
120 | { | 121 | { |
121 | newIfaces.insert(QObject::tr("PPP") , | 122 | newIfaces.insert(QObject::tr("PPP") , |
122 | QObject::tr("generic ppp device")); | 123 | QObject::tr("generic ppp device")); |
123 | } | 124 | } |
124 | 125 | ||
125 | 126 | ||