-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index a6fc30b..3acbfad 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -389,54 +389,61 @@ void MainWindow::slotConnect() { | |||
389 | } | 389 | } |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 | ||
393 | void MainWindow::slotDisconnect() { | 393 | void MainWindow::slotDisconnect() { |
394 | if ( currentSession() ) { | 394 | if ( currentSession() ) { |
395 | currentSession()->layer()->close(); | 395 | currentSession()->layer()->close(); |
396 | m_connect->setEnabled( true ); | 396 | m_connect->setEnabled( true ); |
397 | m_disconnect->setEnabled( false ); | 397 | m_disconnect->setEnabled( false ); |
398 | m_transfer->setEnabled( false ); | 398 | m_transfer->setEnabled( false ); |
399 | m_recordScript->setEnabled( false); | 399 | m_recordScript->setEnabled( false); |
400 | m_saveScript->setEnabled( false ); | 400 | m_saveScript->setEnabled( false ); |
401 | m_scripts->setItemEnabled(m_runScript_id, false); | 401 | m_scripts->setItemEnabled(m_runScript_id, false); |
402 | } | 402 | } |
403 | } | 403 | } |
404 | 404 | ||
405 | void MainWindow::slotTerminate() { | 405 | void MainWindow::slotTerminate() { |
406 | if ( currentSession() ) | 406 | if ( currentSession() ) |
407 | currentSession()->layer()->close(); | 407 | currentSession()->layer()->close(); |
408 | 408 | ||
409 | slotClose(); | 409 | slotClose(); |
410 | /* FIXME move to the next session */ | 410 | /* FIXME move to the next session */ |
411 | } | 411 | } |
412 | 412 | ||
413 | |||
414 | |||
415 | |||
416 | |||
417 | |||
413 | void MainWindow::slotQuickLaunch() { | 418 | void MainWindow::slotQuickLaunch() { |
414 | Profile prof = manager()->profile( "default" ); | 419 | Profile prof = manager()->profile( "default" ); |
415 | if ( prof.name() == "default" ) { | 420 | if ( prof.name() == "default" ) { |
416 | create( prof ); | 421 | create( prof ); |
417 | } else { | 422 | } else { |
418 | QMessageBox::warning(this, tr("Failure"),tr("please configure one profile named \"default\"")); | 423 | Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); |
424 | newProf.setAutoConnect( true ); | ||
425 | create( newProf ); | ||
419 | } | 426 | } |
420 | 427 | ||
421 | } | 428 | } |
422 | 429 | ||
423 | void MainWindow::slotConfigure() { | 430 | void MainWindow::slotConfigure() { |
424 | ConfigDialog conf( manager()->all(), factory() ); | 431 | ConfigDialog conf( manager()->all(), factory() ); |
425 | conf.showMaximized(); | 432 | conf.showMaximized(); |
426 | 433 | ||
427 | int ret = conf.exec(); | 434 | int ret = conf.exec(); |
428 | 435 | ||
429 | if ( QDialog::Accepted == ret ) { | 436 | if ( QDialog::Accepted == ret ) { |
430 | manager()->setProfiles( conf.list() ); | 437 | manager()->setProfiles( conf.list() ); |
431 | manager()->save(); | 438 | manager()->save(); |
432 | populateProfiles(); | 439 | populateProfiles(); |
433 | } | 440 | } |
434 | } | 441 | } |
435 | /* | 442 | /* |
436 | * we will remove | 443 | * we will remove |
437 | * this window from the tabwidget | 444 | * this window from the tabwidget |
438 | * remove it from the list | 445 | * remove it from the list |
439 | * delete it | 446 | * delete it |
440 | * and set the currentSession() | 447 | * and set the currentSession() |
441 | */ | 448 | */ |
442 | void MainWindow::slotClose() { | 449 | void MainWindow::slotClose() { |