From 65ef0e86a879332cbf8b1575886d3c36c7d2d9bd Mon Sep 17 00:00:00 2001 From: josef Date: Tue, 15 Oct 2002 22:36:10 +0000 Subject: - 3 small fixes, please review: - disable all relevant menu items when last session has been closed (but this might not be the correct bugfix, so consider it temporary) - don't set menu status to connected when connection fails - modem sessions: when user cancels connection, close serial connection first again, so we can reconnect (re-dial) later without problems --- (limited to 'noncore/apps/opie-console/mainwindow.cpp') 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() { if(!ret) QMessageBox::warning(currentSession()->widgetStack(), QObject::tr("Failed"), QObject::tr("Connecting failed for this session.")); - m_connect->setEnabled( false ); - m_disconnect->setEnabled( true ); + else { + m_connect->setEnabled( false ); + m_disconnect->setEnabled( true ); + } } } @@ -364,7 +366,9 @@ void MainWindow::slotClose() { Session* ses = currentSession(); qWarning("removing! currentSession %s", currentSession()->name().latin1() ); - tabWidget()->remove( currentSession() ); + /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ + m_curSession = NULL; + tabWidget()->remove( /*currentSession()*/ses ); /*it's autodelete */ m_sessions.remove( ses ); qWarning("after remove!!"); -- cgit v0.9.0.2