author | josef <josef> | 2002-10-26 11:38:42 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-26 11:38:42 (UTC) |
commit | 2dc92ada34785bbfff8ca1202e4d53eb0606c362 (patch) (unidiff) | |
tree | c92a92b5cbb1d80962821212b9157260a9faa0f6 /noncore/apps/opie-console/mainwindow.cpp | |
parent | 65ada01d36dc25f053a09222e8abdb21f2fc3a2a (diff) | |
download | opie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.zip opie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.tar.gz opie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.tar.bz2 |
- nonmodal file transfer (doesn't work yet!)
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 24 |
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 | } |
536 | void MainWindow::create( const Profile& prof ) { | 536 | void 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 ) { | |||
578 | void MainWindow::slotTransfer() | 581 | void 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 | ||
608 | void MainWindow::slotSessionChanged( Session* ses ) { | 616 | void 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 | ||