-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 49f9653..afac542 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -426,24 +426,27 @@ void MainWindow::create( const Profile& prof ) { | |||
426 | m_recordScript->setEnabled( true ); | 426 | m_recordScript->setEnabled( true ); |
427 | m_saveScript->setEnabled( true ); | 427 | m_saveScript->setEnabled( true ); |
428 | m_runScript->setEnabled( true ); | 428 | m_runScript->setEnabled( true ); |
429 | m_fullscreen->setEnabled( true ); | 429 | m_fullscreen->setEnabled( true ); |
430 | m_closewindow->setEnabled( true ); | 430 | m_closewindow->setEnabled( true ); |
431 | 431 | ||
432 | 432 | ||
433 | // is io_layer wants direct connection, then autoconnect | 433 | // is io_layer wants direct connection, then autoconnect |
434 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { | 434 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { |
435 | if (prof.autoConnect()) { | 435 | if (prof.autoConnect()) { |
436 | slotConnect(); | 436 | slotConnect(); |
437 | } | 437 | } |
438 | |||
439 | QWidget *w = currentSession()->widget(); | ||
440 | if(w) w->setFocus(); | ||
438 | } | 441 | } |
439 | 442 | ||
440 | void MainWindow::slotTransfer() | 443 | void MainWindow::slotTransfer() |
441 | { | 444 | { |
442 | if ( currentSession() ) { | 445 | if ( currentSession() ) { |
443 | TransferDialog dlg(currentSession()->widgetStack(), this); | 446 | TransferDialog dlg(currentSession()->widgetStack(), this); |
444 | dlg.showMaximized(); | 447 | dlg.showMaximized(); |
445 | //currentSession()->widgetStack()->add(dlg); | 448 | //currentSession()->widgetStack()->add(dlg); |
446 | dlg.exec(); | 449 | dlg.exec(); |
447 | } | 450 | } |
448 | } | 451 | } |
449 | 452 | ||
@@ -470,24 +473,27 @@ void MainWindow::slotOpenButtons( bool state ) { | |||
470 | void MainWindow::slotSessionChanged( Session* ses ) { | 473 | void MainWindow::slotSessionChanged( Session* ses ) { |
471 | qWarning("changed!"); | 474 | qWarning("changed!"); |
472 | if ( ses ) { | 475 | if ( ses ) { |
473 | m_curSession = ses; | 476 | m_curSession = ses; |
474 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); | 477 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); |
475 | if ( m_curSession->layer()->isConnected() ) { | 478 | if ( m_curSession->layer()->isConnected() ) { |
476 | m_connect->setEnabled( false ); | 479 | m_connect->setEnabled( false ); |
477 | m_disconnect->setEnabled( true ); | 480 | m_disconnect->setEnabled( true ); |
478 | } else { | 481 | } else { |
479 | m_connect->setEnabled( true ); | 482 | m_connect->setEnabled( true ); |
480 | m_disconnect->setEnabled( false ); | 483 | m_disconnect->setEnabled( false ); |
481 | } | 484 | } |
485 | |||
486 | QWidget *w = m_curSession->widget(); | ||
487 | if(w) w->setFocus(); | ||
482 | } | 488 | } |
483 | } | 489 | } |
484 | 490 | ||
485 | void MainWindow::slotFullscreen() { | 491 | void MainWindow::slotFullscreen() { |
486 | 492 | ||
487 | 493 | ||
488 | 494 | ||
489 | if ( m_isFullscreen ) { | 495 | if ( m_isFullscreen ) { |
490 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), false ); | 496 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), false ); |
491 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 497 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
492 | 498 | ||
493 | setCentralWidget( m_consoleWindow ); | 499 | setCentralWidget( m_consoleWindow ); |