summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp7
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
@@ -9,16 +9,14 @@
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>
18using namespace Opie::Core;
19using namespace Opie::Ui; 17using 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>
@@ -478,19 +476,17 @@ void MainWindow::slotConfigure() {
478 */ 476 */
479void MainWindow::slotClose() { 477void 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 );
@@ -601,22 +597,19 @@ void MainWindow::slotOpenButtons( bool state ) {
601 } 597 }
602} 598}
603 599
604 600
605 601
606void MainWindow::slotSessionChanged( Session* ses ) { 602void 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);