summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 4326609..9ccefa0 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -318,8 +318,10 @@ void MainWindow::slotConnect() {
318 if(!ret) QMessageBox::warning(currentSession()->widgetStack(), 318 if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
319 QObject::tr("Failed"), 319 QObject::tr("Failed"),
320 QObject::tr("Connecting failed for this session.")); 320 QObject::tr("Connecting failed for this session."));
321 m_connect->setEnabled( false ); 321 else {
322 m_disconnect->setEnabled( true ); 322 m_connect->setEnabled( false );
323 m_disconnect->setEnabled( true );
324 }
323 } 325 }
324} 326}
325 327
@@ -364,7 +366,9 @@ void MainWindow::slotClose() {
364 366
365 Session* ses = currentSession(); 367 Session* ses = currentSession();
366 qWarning("removing! currentSession %s", currentSession()->name().latin1() ); 368 qWarning("removing! currentSession %s", currentSession()->name().latin1() );
367 tabWidget()->remove( currentSession() ); 369 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
370 m_curSession = NULL;
371 tabWidget()->remove( /*currentSession()*/ses );
368 /*it's autodelete */ 372 /*it's autodelete */
369 m_sessions.remove( ses ); 373 m_sessions.remove( ses );
370 qWarning("after remove!!"); 374 qWarning("after remove!!");