Diffstat (limited to 'noncore/settings/networksettings/ppp/connect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/connect.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp index 2615b60..89d9930 100644 --- a/noncore/settings/networksettings/ppp/connect.cpp +++ b/noncore/settings/networksettings/ppp/connect.cpp | |||
@@ -107,16 +107,16 @@ ConnectWidget::ConnectWidget(InterfacePPP *ifp, QWidget *parent, const char *nam | |||
107 | l0->addSpacing(10); | 107 | l0->addSpacing(10); |
108 | messg = new QLabel(this, "messg"); | 108 | messg = new QLabel(this, "messg"); |
109 | messg->setFrameStyle(QFrame::Panel|QFrame::Sunken); | 109 | messg->setFrameStyle(QFrame::Panel|QFrame::Sunken); |
110 | messg->setAlignment(AlignCenter); | 110 | messg->setAlignment(AlignCenter); |
111 | messg->setText(i18n("Unable to create modem lock file.")); | 111 | messg->setText(i18n("Unable to create modem lock file.")); |
112 | messg->setMinimumHeight(messg->sizeHint().height() + 5); | 112 | messg->setMinimumHeight(messg->sizeHint().height() + 5); |
113 | int messw = (messg->sizeHint().width() * 12) / 10; | 113 | // int messw = (messg->sizeHint().width() * 12) / 10; |
114 | messw = QMAX(messw,280); | 114 | // messw = QMAX(messw,280); |
115 | messg->setMinimumWidth(messw); | 115 | // messg->setMinimumWidth(messw); |
116 | messg->setText(i18n("Looking for modem...")); | 116 | messg->setText(i18n("Offline")); |
117 | l0->addSpacing(10); | 117 | l0->addSpacing(10); |
118 | l0->addWidget(messg); | 118 | l0->addWidget(messg); |
119 | l0->addSpacing(10); | 119 | l0->addSpacing(10); |
120 | 120 | ||
121 | QHBoxLayout *l1 = new QHBoxLayout(10); | 121 | QHBoxLayout *l1 = new QHBoxLayout(10); |
122 | tl->addLayout(l1); | 122 | tl->addLayout(l1); |
@@ -127,21 +127,21 @@ ConnectWidget::ConnectWidget(InterfacePPP *ifp, QWidget *parent, const char *nam | |||
127 | connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow())); | 127 | connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow())); |
128 | 128 | ||
129 | cancel = new QPushButton(i18n("Cancel"), this); | 129 | cancel = new QPushButton(i18n("Cancel"), this); |
130 | cancel->setFocus(); | 130 | cancel->setFocus(); |
131 | connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); | 131 | connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); |
132 | 132 | ||
133 | int maxw = QMAX(cancel->sizeHint().width(), | 133 | // int maxw = QMAX(cancel->sizeHint().width(), |
134 | debug->sizeHint().width()); | 134 | // debug->sizeHint().width()); |
135 | maxw = QMAX(maxw,65); | 135 | // maxw = QMAX(maxw,65); |
136 | debug->setFixedWidth(maxw); | 136 | // debug->setFixedWidth(maxw); |
137 | cancel->setFixedWidth(maxw); | 137 | // cancel->setFixedWidth(maxw); |
138 | l1->addWidget(debug); | 138 | l1->addWidget(debug); |
139 | l1->addWidget(cancel); | 139 | l1->addWidget(cancel); |
140 | 140 | ||
141 | setFixedSize(sizeHint()); | 141 | // setFixedSize(sizeHint()); |
142 | 142 | ||
143 | pausetimer = new QTimer(this); | 143 | pausetimer = new QTimer(this); |
144 | connect(pausetimer, SIGNAL(timeout()), SLOT(pause())); | 144 | connect(pausetimer, SIGNAL(timeout()), SLOT(pause())); |
145 | 145 | ||
146 | qApp->processEvents(); | 146 | qApp->processEvents(); |
147 | 147 | ||
@@ -986,29 +986,27 @@ void ConnectWidget::cancelbutton() { | |||
986 | 986 | ||
987 | qApp->processEvents(); | 987 | qApp->processEvents(); |
988 | 988 | ||
989 | _ifaceppp->modem()->killPPPDaemon(); | 989 | _ifaceppp->modem()->killPPPDaemon(); |
990 | _ifaceppp->modem()->hangup(); | 990 | _ifaceppp->modem()->hangup(); |
991 | 991 | ||
992 | this->hide(); | 992 | |
993 | messg->setText(""); | ||
994 | // p_kppp->quit_b->setFocus(); | 993 | // p_kppp->quit_b->setFocus(); |
995 | // p_kppp->show(); | 994 | // p_kppp->show(); |
996 | emit stopAccounting();// just to be sure | 995 | // emit stopAccounting();// just to be sure |
997 | // p_kppp->con_win->stopClock(); | 996 | // p_kppp->con_win->stopClock(); |
998 | _ifaceppp->modem()->closetty(); | 997 | _ifaceppp->modem()->closetty(); |
999 | _ifaceppp->modem()->unlockdevice(); | 998 | _ifaceppp->modem()->unlockdevice(); |
1000 | 999 | ||
1001 | //abort prompt window... | 1000 | //abort prompt window... |
1002 | if (prompt->isVisible()) { | 1001 | if (prompt->isVisible()) { |
1003 | prompt->hide(); | 1002 | prompt->hide(); |
1004 | } | 1003 | } |
1005 | prompt->setConsumed(); | 1004 | prompt->setConsumed(); |
1006 | 1005 | ||
1007 | // if(p_kppp->quitOnDisconnect()) | 1006 | messg->setText(tr("offline")); |
1008 | // qApp->exit(0); | ||
1009 | } | 1007 | } |
1010 | 1008 | ||
1011 | 1009 | ||
1012 | void ConnectWidget::script_timed_out() { | 1010 | void ConnectWidget::script_timed_out() { |
1013 | if(vmain == 20) { // we are in the 'wait for the user to cancel' state | 1011 | if(vmain == 20) { // we are in the 'wait for the user to cancel' state |
1014 | timeout_timer->stop(); | 1012 | timeout_timer->stop(); |