Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 291912c..b3cb208 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -3,28 +3,26 @@ | |||
3 | #include "configdialog.h" | 3 | #include "configdialog.h" |
4 | #include "default.h" | 4 | #include "default.h" |
5 | #include "profilemanager.h" | 5 | #include "profilemanager.h" |
6 | #include "mainwindow.h" | 6 | #include "mainwindow.h" |
7 | #include "tabwidget.h" | 7 | #include "tabwidget.h" |
8 | #include "transferdialog.h" | 8 | #include "transferdialog.h" |
9 | #include "function_keyboard.h" | 9 | #include "function_keyboard.h" |
10 | #include "emulation_handler.h" | 10 | #include "emulation_handler.h" |
11 | #include "script.h" | 11 | #include "script.h" |
12 | #include "fixit.h" | 12 | #include "fixit.h" |
13 | 13 | ||
14 | /* OPIE */ | 14 | /* OPIE */ |
15 | #include <opie2/odebug.h> | ||
16 | #include <opie2/ofiledialog.h> | 15 | #include <opie2/ofiledialog.h> |
17 | #include <qpe/filemanager.h> | 16 | #include <qpe/filemanager.h> |
18 | using namespace Opie::Core; | ||
19 | using namespace Opie::Ui; | 17 | using namespace Opie::Ui; |
20 | 18 | ||
21 | /* QT */ | 19 | /* QT */ |
22 | #include <qaction.h> | 20 | #include <qaction.h> |
23 | #include <qmenubar.h> | 21 | #include <qmenubar.h> |
24 | #include <qtoolbar.h> | 22 | #include <qtoolbar.h> |
25 | #include <qmessagebox.h> | 23 | #include <qmessagebox.h> |
26 | #include <qwhatsthis.h> | 24 | #include <qwhatsthis.h> |
27 | #include <qfileinfo.h> | 25 | #include <qfileinfo.h> |
28 | 26 | ||
29 | /* STD */ | 27 | /* STD */ |
30 | #include <assert.h> | 28 | #include <assert.h> |
@@ -472,31 +470,29 @@ void MainWindow::slotConfigure() { | |||
472 | /* | 470 | /* |
473 | * we will remove | 471 | * we will remove |
474 | * this window from the tabwidget | 472 | * this window from the tabwidget |
475 | * remove it from the list | 473 | * remove it from the list |
476 | * delete it | 474 | * delete it |
477 | * and set the currentSession() | 475 | * and set the currentSession() |
478 | */ | 476 | */ |
479 | void MainWindow::slotClose() { | 477 | void MainWindow::slotClose() { |
480 | if (!currentSession() ) | 478 | if (!currentSession() ) |
481 | return; | 479 | return; |
482 | 480 | ||
483 | Session* ses = currentSession(); | 481 | Session* ses = currentSession(); |
484 | owarn << "removing! currentSession " << currentSession()->name().latin1() << "" << oendl; | ||
485 | /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ | 482 | /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ |
486 | m_curSession = NULL; | 483 | m_curSession = NULL; |
487 | tabWidget()->remove( /*currentSession()*/ses ); | 484 | tabWidget()->remove( /*currentSession()*/ses ); |
488 | /*it's autodelete */ | 485 | /*it's autodelete */ |
489 | m_sessions.remove( ses ); | 486 | m_sessions.remove( ses ); |
490 | owarn << "after remove!!" << oendl; | ||
491 | 487 | ||
492 | if (!currentSession() ) { | 488 | if (!currentSession() ) { |
493 | m_connect->setEnabled( false ); | 489 | m_connect->setEnabled( false ); |
494 | m_disconnect->setEnabled( false ); | 490 | m_disconnect->setEnabled( false ); |
495 | m_terminate->setEnabled( false ); | 491 | m_terminate->setEnabled( false ); |
496 | m_transfer->setEnabled( false ); | 492 | m_transfer->setEnabled( false ); |
497 | m_recordScript->setEnabled( false ); | 493 | m_recordScript->setEnabled( false ); |
498 | m_saveScript->setEnabled( false ); | 494 | m_saveScript->setEnabled( false ); |
499 | m_scripts->setItemEnabled(m_runScript_id, false); | 495 | m_scripts->setItemEnabled(m_runScript_id, false); |
500 | m_fullscreen->setEnabled( false ); | 496 | m_fullscreen->setEnabled( false ); |
501 | m_wrap->setEnabled( false ); | 497 | m_wrap->setEnabled( false ); |
502 | m_closewindow->setEnabled( false ); | 498 | m_closewindow->setEnabled( false ); |
@@ -595,34 +591,31 @@ void MainWindow::slotOpenKeb(bool state) { | |||
595 | void MainWindow::slotOpenButtons( bool state ) { | 591 | void MainWindow::slotOpenButtons( bool state ) { |
596 | 592 | ||
597 | if ( state ) { | 593 | if ( state ) { |
598 | m_buttonBar->show(); | 594 | m_buttonBar->show(); |
599 | } else { | 595 | } else { |
600 | m_buttonBar->hide(); | 596 | m_buttonBar->hide(); |
601 | } | 597 | } |
602 | } | 598 | } |
603 | 599 | ||
604 | 600 | ||
605 | 601 | ||
606 | void MainWindow::slotSessionChanged( Session* ses ) { | 602 | void MainWindow::slotSessionChanged( Session* ses ) { |
607 | owarn << "changed!" << oendl; | ||
608 | |||
609 | if(m_curSession) | 603 | if(m_curSession) |
610 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); | 604 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); |
611 | if(ses) | 605 | if(ses) |
612 | if(ses->transferDialog()) ses->transferDialog()->show(); | 606 | if(ses->transferDialog()) ses->transferDialog()->show(); |
613 | 607 | ||
614 | if ( ses ) { | 608 | if ( ses ) { |
615 | m_curSession = ses; | 609 | m_curSession = ses; |
616 | odebug << QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) << oendl; | ||
617 | if ( m_curSession->layer()->isConnected() ) { | 610 | if ( m_curSession->layer()->isConnected() ) { |
618 | m_connect->setEnabled( false ); | 611 | m_connect->setEnabled( false ); |
619 | m_disconnect->setEnabled( true ); | 612 | m_disconnect->setEnabled( true ); |
620 | m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); | 613 | m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); |
621 | m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording()); | 614 | m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording()); |
622 | m_scripts->setItemEnabled(m_runScript_id, true); | 615 | m_scripts->setItemEnabled(m_runScript_id, true); |
623 | } else { | 616 | } else { |
624 | m_connect->setEnabled( true ); | 617 | m_connect->setEnabled( true ); |
625 | m_disconnect->setEnabled( false ); | 618 | m_disconnect->setEnabled( false ); |
626 | m_recordScript->setEnabled( false ); | 619 | m_recordScript->setEnabled( false ); |
627 | m_saveScript->setEnabled( false ); | 620 | m_saveScript->setEnabled( false ); |
628 | m_scripts->setItemEnabled(m_runScript_id, false); | 621 | m_scripts->setItemEnabled(m_runScript_id, false); |