summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp24
-rw-r--r--noncore/apps/opie-console/session.cpp10
-rw-r--r--noncore/apps/opie-console/session.h5
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp15
-rw-r--r--noncore/apps/opie-console/transferdialog.h2
5 files changed, 46 insertions, 10 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
@@ -536,2 +536,5 @@ void MainWindow::slotProfile( int id) {
void MainWindow::create( const Profile& prof ) {
+ if(m_curSession)
+ if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
+
Session *ses = manager()->fromProfile( prof, tabWidget() );
@@ -580,6 +583,11 @@ void MainWindow::slotTransfer()
if ( currentSession() ) {
- TransferDialog dlg(currentSession()->widgetStack(), this);
- dlg.showMaximized();
+ Session *mysession = currentSession();
+ TransferDialog dlg(mysession->widgetStack(), this);
+ mysession->setTransferDialog(&dlg);
+ dlg.show();
+ //dlg.showMaximized();
//currentSession()->widgetStack()->add(dlg);
- dlg.exec();
+ //dlg.exec();
+ while(dlg.isRunning()) qApp->processEvents();
+ mysession->setTransferDialog(0l);
}
@@ -609,2 +617,8 @@ void MainWindow::slotSessionChanged( Session* ses ) {
qWarning("changed!");
+
+ if(m_curSession)
+ if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
+ if(ses)
+ if(ses->transferDialog()) ses->transferDialog()->show();
+
if ( ses ) {
@@ -632,6 +646,2 @@ void MainWindow::slotSessionChanged( Session* ses ) {
-
-
-
-
QWidget *w = m_curSession->widget();
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index c166d95..4f52584 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -13,2 +13,3 @@ Session::Session() {
m_emu = 0l;
+ m_transfer = 0l;
}
@@ -106,2 +107,11 @@ void Session::setEmulationWidget( WidgetLayer* lay ) {
*/
+void Session::setTransferDialog(QWidget *d)
+{
+ m_transfer = d;
+}
+
+QWidget *Session::transferDialog()
+{
+ return m_transfer;
+}
diff --git a/noncore/apps/opie-console/session.h b/noncore/apps/opie-console/session.h
index f60a6c0..d69224a 100644
--- a/noncore/apps/opie-console/session.h
+++ b/noncore/apps/opie-console/session.h
@@ -66,2 +66,5 @@ public:
+ void setTransferDialog(QWidget *d);
+ QWidget *transferDialog();
+
private:
@@ -73,3 +76,3 @@ private:
Profile m_prof;
-
+ QWidget *m_transfer;
};
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index 75c4c72..0af1911 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -20,3 +20,3 @@
TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *)
-: QDialog(parent, 0l, true), m_win(mainwindow)
+: QDialog(parent, 0l, false), m_win(mainwindow)
{
@@ -31,2 +31,3 @@ TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const ch
m_autocleanup = 0;
+ m_running = true;
@@ -169,3 +170,7 @@ void TransferDialog::slotCancel()
cleanup();
- if(m_autocleanup) close();
+ if(m_autocleanup)
+ {
+ m_running = false;
+ close();
+ }
else
@@ -179,2 +184,3 @@ void TransferDialog::slotCancel()
{
+ m_running = false;
close();
@@ -266 +272,6 @@ void TransferDialog::slotMode(int id)
+bool TransferDialog::isRunning()
+{
+ return m_running;
+}
+
diff --git a/noncore/apps/opie-console/transferdialog.h b/noncore/apps/opie-console/transferdialog.h
index d87be6a..23691e0 100644
--- a/noncore/apps/opie-console/transferdialog.h
+++ b/noncore/apps/opie-console/transferdialog.h
@@ -20,2 +20,3 @@ class TransferDialog : public QDialog
~TransferDialog();
+ bool isRunning();
@@ -50,2 +51,3 @@ class TransferDialog : public QDialog
int m_autocleanup;
+ bool m_running;
};