Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 94c99bc..29dbcf3 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -357,17 +357,18 @@ void MainWindow::slotConfigure() { | |||
357 | * and set the currentSession() | 357 | * and set the currentSession() |
358 | */ | 358 | */ |
359 | void MainWindow::slotClose() { | 359 | void MainWindow::slotClose() { |
360 | if (!currentSession() ) | 360 | if (!currentSession() ) |
361 | return; | 361 | return; |
362 | 362 | ||
363 | Session* ses = currentSession(); | ||
364 | qWarning("removing! currentSession %s", currentSession()->name().latin1() ); | ||
363 | tabWidget()->remove( currentSession() ); | 365 | tabWidget()->remove( currentSession() ); |
364 | /*it's autodelete */ | 366 | /*it's autodelete */ |
365 | m_sessions.remove( m_curSession ); | 367 | m_sessions.remove( ses ); |
366 | m_curSession = m_sessions.first(); | 368 | qWarning("after remove!!"); |
367 | tabWidget()->setCurrent( m_curSession ); | ||
368 | 369 | ||
369 | if (!currentSession() ) { | 370 | if (!currentSession() ) { |
370 | m_connect->setEnabled( false ); | 371 | m_connect->setEnabled( false ); |
371 | m_disconnect->setEnabled( false ); | 372 | m_disconnect->setEnabled( false ); |
372 | m_terminate->setEnabled( false ); | 373 | m_terminate->setEnabled( false ); |
373 | m_transfer->setEnabled( false ); | 374 | m_transfer->setEnabled( false ); |
@@ -392,13 +393,13 @@ void MainWindow::create( const Profile& prof ) { | |||
392 | Session *ses = manager()->fromProfile( prof, tabWidget() ); | 393 | Session *ses = manager()->fromProfile( prof, tabWidget() ); |
393 | 394 | ||
394 | if((!ses) || (!ses->layer()) || (!ses->widgetStack())) | 395 | if((!ses) || (!ses->layer()) || (!ses->widgetStack())) |
395 | { | 396 | { |
396 | QMessageBox::warning(this, | 397 | QMessageBox::warning(this, |
397 | QObject::tr("Session failed"), | 398 | QObject::tr("Session failed"), |
398 | QObject::tr("Cannot open session: Not all components were found.")); | 399 | QObject::tr("<qt>Cannot open session: Not all components were found.</qt>")); |
399 | //if(ses) delete ses; | 400 | //if(ses) delete ses; |
400 | return; | 401 | return; |
401 | } | 402 | } |
402 | 403 | ||
403 | m_sessions.append( ses ); | 404 | m_sessions.append( ses ); |
404 | tabWidget()->add( ses ); | 405 | tabWidget()->add( ses ); |
@@ -430,12 +431,13 @@ void MainWindow::slotOpenKeb(bool state) { | |||
430 | 431 | ||
431 | if (state) m_keyBar->show(); | 432 | if (state) m_keyBar->show(); |
432 | else m_keyBar->hide(); | 433 | else m_keyBar->hide(); |
433 | 434 | ||
434 | } | 435 | } |
435 | void MainWindow::slotSessionChanged( Session* ses ) { | 436 | void MainWindow::slotSessionChanged( Session* ses ) { |
437 | qWarning("changed!"); | ||
436 | if ( ses ) { | 438 | if ( ses ) { |
437 | m_curSession = ses; | 439 | m_curSession = ses; |
438 | 440 | ||
439 | if ( m_curSession->isConnected() ) { | 441 | if ( m_curSession->isConnected() ) { |
440 | m_connect->setEnabled( false ); | 442 | m_connect->setEnabled( false ); |
441 | m_disconnect->setEnabled( true ); | 443 | m_disconnect->setEnabled( true ); |