author | josef <josef> | 2002-10-16 17:25:49 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-16 17:25:49 (UTC) |
commit | 1a305f211913ce4a4d73ed0b36a0be535c0e03ec (patch) (unidiff) | |
tree | 5b6e4a814107750e0edb2b10ab6a04a658f5c4f4 | |
parent | 9a7e223378c2d178f575b14f7632843f39faf461 (diff) | |
download | opie-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.
-rw-r--r-- | noncore/apps/opie-console/transferdialog.cpp | 30 | ||||
-rw-r--r-- | noncore/apps/opie-console/transferdialog.h | 3 |
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) | |||
30 | 30 | ||
31 | m_autocleanup = 0; | ||
32 | |||
31 | group = new QButtonGroup(QObject::tr("Transfer mode"), this); | 33 | group = new QButtonGroup(QObject::tr("Transfer mode"), this); |
@@ -115,2 +117,5 @@ void TransferDialog::slotTransfer() | |||
115 | 117 | ||
118 | cleanup(); | ||
119 | m_autocleanup = 0; | ||
120 | |||
116 | if(m_transfermode == id_send) statusbar->setText(QObject::tr("Sending...")); | 121 | if(m_transfermode == id_send) statusbar->setText(QObject::tr("Sending...")); |
@@ -140,8 +145,3 @@ void TransferDialog::slotTransfer() | |||
140 | 145 | ||
141 | void TransferDialog::slotCancel() | 146 | void TransferDialog::cleanup() |
142 | { | ||
143 | ok->setEnabled(true); | ||
144 | statusbar->setText(QObject::tr("Ready")); | ||
145 | |||
146 | if((m_lay) || (m_recvlay)) | ||
147 | { | 147 | { |
@@ -159,2 +159,15 @@ void TransferDialog::slotCancel() | |||
159 | } | 159 | } |
160 | } | ||
161 | |||
162 | void TransferDialog::slotCancel() | ||
163 | { | ||
164 | ok->setEnabled(true); | ||
165 | statusbar->setText(QObject::tr("Ready")); | ||
166 | |||
167 | if((m_lay) || (m_recvlay)) | ||
168 | { | ||
169 | cleanup(); | ||
170 | if(m_autocleanup) close(); | ||
171 | else | ||
172 | { | ||
160 | QMessageBox::information(this, | 173 | QMessageBox::information(this, |
@@ -163,2 +176,3 @@ void TransferDialog::slotCancel() | |||
163 | } | 176 | } |
177 | } | ||
164 | else | 178 | else |
@@ -212,2 +226,4 @@ void TransferDialog::slotError(int error, const QString& message) | |||
212 | } | 226 | } |
227 | |||
228 | m_autocleanup = 1; | ||
213 | } | 229 | } |
@@ -219,2 +235,3 @@ void TransferDialog::slotSent() | |||
219 | statusbar->setText(QObject::tr("Ready")); | 235 | statusbar->setText(QObject::tr("Ready")); |
236 | m_autocleanup = 1; | ||
220 | } | 237 | } |
@@ -226,2 +243,3 @@ void TransferDialog::slotReceived(const QString& file) | |||
226 | statusbar->setText(QObject::tr("Ready")); | 243 | statusbar->setText(QObject::tr("Ready")); |
244 | m_autocleanup = 1; | ||
227 | } | 245 | } |
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 | |||
38 | 38 | ||
39 | void cleanup(); | ||
40 | |||
39 | QLineEdit *filename; | 41 | QLineEdit *filename; |
@@ -47,2 +49,3 @@ class TransferDialog : public QDialog | |||
47 | int m_transfermode; | 49 | int m_transfermode; |
50 | int m_autocleanup; | ||
48 | }; | 51 | }; |