-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 02f8451..b143361 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -252,26 +252,30 @@ void MainWindow::slotRunScript() { | |||
252 | script << "text/plain"; | 252 | script << "text/plain"; |
253 | types.insert("Script", script); | 253 | types.insert("Script", script); |
254 | QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types); | 254 | QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types); |
255 | if (!filename.isEmpty()) { | 255 | if (!filename.isEmpty()) { |
256 | Script script(DocLnk(filename).file()); | 256 | Script script(DocLnk(filename).file()); |
257 | currentSession()->emulationLayer()->runScript(&script); | 257 | currentSession()->emulationLayer()->runScript(&script); |
258 | } | 258 | } |
259 | } | 259 | } |
260 | */ | 260 | */ |
261 | } | 261 | } |
262 | 262 | ||
263 | void MainWindow::slotConnect() { | 263 | void MainWindow::slotConnect() { |
264 | if ( currentSession() ) | 264 | if ( currentSession() ) { |
265 | currentSession()->layer()->open(); | 265 | bool ret = currentSession()->layer()->open(); |
266 | if(!ret) QMessageBox::warning(currentSession()->widgetStack(), | ||
267 | QObject::tr("Failed"), | ||
268 | QObject::tr("Connecting failed for this session.")); | ||
269 | } | ||
266 | } | 270 | } |
267 | 271 | ||
268 | void MainWindow::slotDisconnect() { | 272 | void MainWindow::slotDisconnect() { |
269 | if ( currentSession() ) | 273 | if ( currentSession() ) |
270 | currentSession()->layer()->close(); | 274 | currentSession()->layer()->close(); |
271 | } | 275 | } |
272 | 276 | ||
273 | void MainWindow::slotTerminate() { | 277 | void MainWindow::slotTerminate() { |
274 | if ( currentSession() ) | 278 | if ( currentSession() ) |
275 | currentSession()->layer()->close(); | 279 | currentSession()->layer()->close(); |
276 | 280 | ||
277 | slotClose(); | 281 | slotClose(); |