summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-16 17:25:49 (UTC)
committer josef <josef>2002-10-16 17:25:49 (UTC)
commit1a305f211913ce4a4d73ed0b36a0be535c0e03ec (patch) (side-by-side diff)
tree5b6e4a814107750e0edb2b10ab6a04a658f5c4f4
parent9a7e223378c2d178f575b14f7632843f39faf461 (diff)
downloadopie-1a305f211913ce4a4d73ed0b36a0be535c0e03ec.zip
opie-1a305f211913ce4a4d73ed0b36a0be535c0e03ec.tar.gz
opie-1a305f211913ce4a4d73ed0b36a0be535c0e03ec.tar.bz2
- if send/receive child processes exit, clicking on 'cancel' doesn't inform the
user about process cancellation because this is already done at this time.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp30
-rw-r--r--noncore/apps/opie-console/transferdialog.h3
2 files changed, 27 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index 0083cc1..f9a0b87 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -30,2 +30,4 @@ TransferDialog::TransferDialog(MainWindow *parent, const char *name)
+ m_autocleanup = 0;
+
group = new QButtonGroup(QObject::tr("Transfer mode"), this);
@@ -115,2 +117,5 @@ void TransferDialog::slotTransfer()
+ cleanup();
+ m_autocleanup = 0;
+
if(m_transfermode == id_send) statusbar->setText(QObject::tr("Sending..."));
@@ -140,8 +145,3 @@ void TransferDialog::slotTransfer()
-void TransferDialog::slotCancel()
-{
- ok->setEnabled(true);
- statusbar->setText(QObject::tr("Ready"));
-
- if((m_lay) || (m_recvlay))
+void TransferDialog::cleanup()
{
@@ -159,2 +159,15 @@ void TransferDialog::slotCancel()
}
+}
+
+void TransferDialog::slotCancel()
+{
+ ok->setEnabled(true);
+ statusbar->setText(QObject::tr("Ready"));
+
+ if((m_lay) || (m_recvlay))
+ {
+ cleanup();
+ if(m_autocleanup) close();
+ else
+ {
QMessageBox::information(this,
@@ -163,2 +176,3 @@ void TransferDialog::slotCancel()
}
+ }
else
@@ -212,2 +226,4 @@ void TransferDialog::slotError(int error, const QString& message)
}
+
+ m_autocleanup = 1;
}
@@ -219,2 +235,3 @@ void TransferDialog::slotSent()
statusbar->setText(QObject::tr("Ready"));
+ m_autocleanup = 1;
}
@@ -226,2 +243,3 @@ void TransferDialog::slotReceived(const QString& file)
statusbar->setText(QObject::tr("Ready"));
+ m_autocleanup = 1;
}
diff --git a/noncore/apps/opie-console/transferdialog.h b/noncore/apps/opie-console/transferdialog.h
index de3a5cf..1b27f16 100644
--- a/noncore/apps/opie-console/transferdialog.h
+++ b/noncore/apps/opie-console/transferdialog.h
@@ -38,2 +38,4 @@ class TransferDialog : public QDialog
+ void cleanup();
+
QLineEdit *filename;
@@ -47,2 +49,3 @@ class TransferDialog : public QDialog
int m_transfermode;
+ int m_autocleanup;
};