summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
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() {
* and set the currentSession()
*/
void MainWindow::slotClose() {
if (!currentSession() )
return;
+ Session* ses = currentSession();
+ qWarning("removing! currentSession %s", currentSession()->name().latin1() );
tabWidget()->remove( currentSession() );
/*it's autodelete */
- m_sessions.remove( m_curSession );
- m_curSession = m_sessions.first();
- tabWidget()->setCurrent( m_curSession );
+ m_sessions.remove( ses );
+ qWarning("after remove!!");
if (!currentSession() ) {
m_connect->setEnabled( false );
m_disconnect->setEnabled( false );
m_terminate->setEnabled( false );
m_transfer->setEnabled( false );
@@ -392,13 +393,13 @@ void MainWindow::create( const Profile& prof ) {
Session *ses = manager()->fromProfile( prof, tabWidget() );
if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
{
QMessageBox::warning(this,
QObject::tr("Session failed"),
- QObject::tr("Cannot open session: Not all components were found."));
+ QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
//if(ses) delete ses;
return;
}
m_sessions.append( ses );
tabWidget()->add( ses );
@@ -430,12 +431,13 @@ void MainWindow::slotOpenKeb(bool state) {
if (state) m_keyBar->show();
else m_keyBar->hide();
}
void MainWindow::slotSessionChanged( Session* ses ) {
+ qWarning("changed!");
if ( ses ) {
m_curSession = ses;
if ( m_curSession->isConnected() ) {
m_connect->setEnabled( false );
m_disconnect->setEnabled( true );