Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-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 b177fa5..745efaf 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -398,24 +398,26 @@ void MainWindow::slotClose() { | |||
398 | 398 | ||
399 | if (!currentSession() ) { | 399 | if (!currentSession() ) { |
400 | m_connect->setEnabled( false ); | 400 | m_connect->setEnabled( false ); |
401 | m_disconnect->setEnabled( false ); | 401 | m_disconnect->setEnabled( false ); |
402 | m_terminate->setEnabled( false ); | 402 | m_terminate->setEnabled( false ); |
403 | m_transfer->setEnabled( false ); | 403 | m_transfer->setEnabled( false ); |
404 | m_recordScript->setEnabled( false ); | 404 | m_recordScript->setEnabled( false ); |
405 | m_saveScript->setEnabled( false ); | 405 | m_saveScript->setEnabled( false ); |
406 | m_runScript->setEnabled( false ); | 406 | m_runScript->setEnabled( false ); |
407 | m_fullscreen->setEnabled( false ); | 407 | m_fullscreen->setEnabled( false ); |
408 | m_closewindow->setEnabled( false ); | 408 | m_closewindow->setEnabled( false ); |
409 | } | 409 | } |
410 | |||
411 | m_kb->loadDefaults(); | ||
410 | } | 412 | } |
411 | 413 | ||
412 | /* | 414 | /* |
413 | * We will get the name | 415 | * We will get the name |
414 | * Then the profile | 416 | * Then the profile |
415 | * and then we will make a profile | 417 | * and then we will make a profile |
416 | */ | 418 | */ |
417 | void MainWindow::slotProfile( int id) { | 419 | void MainWindow::slotProfile( int id) { |
418 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); | 420 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); |
419 | create( prof ); | 421 | create( prof ); |
420 | } | 422 | } |
421 | void MainWindow::create( const Profile& prof ) { | 423 | void MainWindow::create( const Profile& prof ) { |
@@ -447,24 +449,26 @@ void MainWindow::create( const Profile& prof ) { | |||
447 | m_runScript->setEnabled( false ); | 449 | m_runScript->setEnabled( false ); |
448 | 450 | ||
449 | // is io_layer wants direct connection, then autoconnect | 451 | // is io_layer wants direct connection, then autoconnect |
450 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { | 452 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { |
451 | if (prof.autoConnect()) { | 453 | if (prof.autoConnect()) { |
452 | slotConnect(); | 454 | slotConnect(); |
453 | } | 455 | } |
454 | 456 | ||
455 | 457 | ||
456 | 458 | ||
457 | QWidget *w = currentSession()->widget(); | 459 | QWidget *w = currentSession()->widget(); |
458 | if(w) w->setFocus(); | 460 | if(w) w->setFocus(); |
461 | |||
462 | m_kb->load(currentSession()->profile()); | ||
459 | } | 463 | } |
460 | 464 | ||
461 | void MainWindow::slotTransfer() | 465 | void MainWindow::slotTransfer() |
462 | { | 466 | { |
463 | if ( currentSession() ) { | 467 | if ( currentSession() ) { |
464 | TransferDialog dlg(currentSession()->widgetStack(), this); | 468 | TransferDialog dlg(currentSession()->widgetStack(), this); |
465 | dlg.showMaximized(); | 469 | dlg.showMaximized(); |
466 | //currentSession()->widgetStack()->add(dlg); | 470 | //currentSession()->widgetStack()->add(dlg); |
467 | dlg.exec(); | 471 | dlg.exec(); |
468 | } | 472 | } |
469 | } | 473 | } |
470 | 474 | ||
@@ -510,24 +514,26 @@ void MainWindow::slotSessionChanged( Session* ses ) { | |||
510 | if ( ( m_curSession->layer() )->supports()[1] == 0 ) { | 514 | if ( ( m_curSession->layer() )->supports()[1] == 0 ) { |
511 | m_transfer->setEnabled( false ); | 515 | m_transfer->setEnabled( false ); |
512 | } else { | 516 | } else { |
513 | m_transfer->setEnabled( true ); | 517 | m_transfer->setEnabled( true ); |
514 | } | 518 | } |
515 | 519 | ||
516 | 520 | ||
517 | 521 | ||
518 | 522 | ||
519 | 523 | ||
520 | QWidget *w = m_curSession->widget(); | 524 | QWidget *w = m_curSession->widget(); |
521 | if(w) w->setFocus(); | 525 | if(w) w->setFocus(); |
526 | |||
527 | m_kb->load(currentSession()->profile()); | ||
522 | } | 528 | } |
523 | } | 529 | } |
524 | 530 | ||
525 | void MainWindow::slotFullscreen() { | 531 | void MainWindow::slotFullscreen() { |
526 | 532 | ||
527 | 533 | ||
528 | 534 | ||
529 | if ( m_isFullscreen ) { | 535 | if ( m_isFullscreen ) { |
530 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); | 536 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); |
531 | ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); | 537 | ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); |
532 | ( m_curSession->emulationHandler() )->cornerButton()->hide(); | 538 | ( m_curSession->emulationHandler() )->cornerButton()->hide(); |
533 | disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); | 539 | disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); |