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.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index c44b359..5f6dc12 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -534,6 +534,9 @@ void MainWindow::slotProfile( int id) {
534 create( prof ); 534 create( prof );
535} 535}
536void MainWindow::create( const Profile& prof ) { 536void MainWindow::create( const Profile& prof ) {
537 if(m_curSession)
538 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
539
537 Session *ses = manager()->fromProfile( prof, tabWidget() ); 540 Session *ses = manager()->fromProfile( prof, tabWidget() );
538 541
539 if((!ses) || (!ses->layer()) || (!ses->widgetStack())) 542 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
@@ -578,10 +581,15 @@ void MainWindow::create( const Profile& prof ) {
578void MainWindow::slotTransfer() 581void MainWindow::slotTransfer()
579{ 582{
580 if ( currentSession() ) { 583 if ( currentSession() ) {
581 TransferDialog dlg(currentSession()->widgetStack(), this); 584 Session *mysession = currentSession();
582 dlg.showMaximized(); 585 TransferDialog dlg(mysession->widgetStack(), this);
586 mysession->setTransferDialog(&dlg);
587 dlg.show();
588 //dlg.showMaximized();
583 //currentSession()->widgetStack()->add(dlg); 589 //currentSession()->widgetStack()->add(dlg);
584 dlg.exec(); 590 //dlg.exec();
591 while(dlg.isRunning()) qApp->processEvents();
592 mysession->setTransferDialog(0l);
585 } 593 }
586} 594}
587 595
@@ -607,6 +615,12 @@ void MainWindow::slotOpenButtons( bool state ) {
607 615
608void MainWindow::slotSessionChanged( Session* ses ) { 616void MainWindow::slotSessionChanged( Session* ses ) {
609 qWarning("changed!"); 617 qWarning("changed!");
618
619 if(m_curSession)
620 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
621 if(ses)
622 if(ses->transferDialog()) ses->transferDialog()->show();
623
610 if ( ses ) { 624 if ( ses ) {
611 m_curSession = ses; 625 m_curSession = ses;
612 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); 626 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) );
@@ -630,10 +644,6 @@ void MainWindow::slotSessionChanged( Session* ses ) {
630 m_transfer->setEnabled( true ); 644 m_transfer->setEnabled( true );
631 } 645 }
632 646
633
634
635
636
637 QWidget *w = m_curSession->widget(); 647 QWidget *w = m_curSession->widget();
638 if(w) w->setFocus(); 648 if(w) w->setFocus();
639 649