summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-18 10:25:44 (UTC)
committer josef <josef>2002-10-18 10:25:44 (UTC)
commitdd15f8b7104678da5969a3e93a4b14cd3640955c (patch) (unidiff)
treeca05d8e196a72101a6044ac0f7ca5fefdbd63d66
parentc01fc99488d4ff9e1de2eb4d93fc200ed8e19a81 (diff)
downloadopie-dd15f8b7104678da5969a3e93a4b14cd3640955c.zip
opie-dd15f8b7104678da5969a3e93a4b14cd3640955c.tar.gz
opie-dd15f8b7104678da5969a3e93a4b14cd3640955c.tar.bz2
- implement proper disconnect for modem connections
- let transfer dialog use widgetStack()
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/dialer.cpp6
-rw-r--r--noncore/apps/opie-console/dialer.h1
-rw-r--r--noncore/apps/opie-console/io_modem.cpp5
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp3
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp4
-rw-r--r--noncore/apps/opie-console/transferdialog.h2
6 files changed, 16 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp
index bd6b50f..7bf9352 100644
--- a/noncore/apps/opie-console/dialer.cpp
+++ b/noncore/apps/opie-console/dialer.cpp
@@ -81,12 +81,18 @@ Dialer::Dialer(const Profile& profile, int fd, QWidget *parent, const char *name
81} 81}
82 82
83Dialer::~Dialer() 83Dialer::~Dialer()
84{ 84{
85} 85}
86 86
87void Dialer::setHangupOnly()
88{
89 state = state_cancel;
90 usercancel = 1;
91}
92
87void Dialer::slotCancel() 93void Dialer::slotCancel()
88{ 94{
89 if(state != state_online) 95 if(state != state_online)
90 { 96 {
91 usercancel = 1; 97 usercancel = 1;
92 reset(); 98 reset();
diff --git a/noncore/apps/opie-console/dialer.h b/noncore/apps/opie-console/dialer.h
index 4011880..84444b9 100644
--- a/noncore/apps/opie-console/dialer.h
+++ b/noncore/apps/opie-console/dialer.h
@@ -11,12 +11,13 @@ class QProgressBar;
11class Dialer : public QDialog 11class Dialer : public QDialog
12{ 12{
13 Q_OBJECT 13 Q_OBJECT
14 public: 14 public:
15 Dialer(const Profile& profile, int fd, QWidget *parent = NULL, const char *name = NULL); 15 Dialer(const Profile& profile, int fd, QWidget *parent = NULL, const char *name = NULL);
16 ~Dialer(); 16 ~Dialer();
17 void setHangupOnly();
17 18
18 public slots: 19 public slots:
19 void slotCancel(); 20 void slotCancel();
20 void slotAutostart(); 21 void slotAutostart();
21 22
22 private: 23 private:
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp
index c04aad1..2f0c04e 100644
--- a/noncore/apps/opie-console/io_modem.cpp
+++ b/noncore/apps/opie-console/io_modem.cpp
@@ -12,13 +12,16 @@ IOModem::IOModem( const Profile &profile )
12IOModem::~IOModem() { 12IOModem::~IOModem() {
13 13
14} 14}
15 15
16 16
17void IOModem::close() { 17void IOModem::close() {
18 // maybe do a hangup here just in case...? 18 // Hangup, discarding result
19 Dialer d(m_profile, rawIO());
20 d.setHangupOnly();
21 d.exec();
19 22
20 IOSerial::close(); 23 IOSerial::close();
21} 24}
22 25
23bool IOModem::open() { 26bool IOModem::open() {
24 bool ret = IOSerial::open(); 27 bool ret = IOSerial::open();
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 9a226bb..55e9836 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -439,14 +439,15 @@ void MainWindow::create( const Profile& prof ) {
439 } 439 }
440} 440}
441 441
442void MainWindow::slotTransfer() 442void MainWindow::slotTransfer()
443{ 443{
444 if ( currentSession() ) { 444 if ( currentSession() ) {
445 TransferDialog dlg(this); 445 TransferDialog dlg(currentSession()->widgetStack(), this);
446 dlg.showMaximized(); 446 dlg.showMaximized();
447 //currentSession()->widgetStack()->add(dlg);
447 dlg.exec(); 448 dlg.exec();
448 } 449 }
449} 450}
450 451
451 452
452void MainWindow::slotOpenKeb(bool state) { 453void MainWindow::slotOpenKeb(bool state) {
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index f9a0b87..ac5b1d0 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -14,14 +14,14 @@
14#include "receive_layer.h" 14#include "receive_layer.h"
15#include "metafactory.h" 15#include "metafactory.h"
16#include "mainwindow.h" 16#include "mainwindow.h"
17 17
18#include "transferdialog.h" 18#include "transferdialog.h"
19 19
20TransferDialog::TransferDialog(MainWindow *parent, const char *name) 20TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *name)
21: QDialog(0l, 0l, true), m_win(parent) 21: QDialog(parent, 0l, true), m_win(mainwindow)
22{ 22{
23 m_lay = 0l; 23 m_lay = 0l;
24 m_recvlay = 0l; 24 m_recvlay = 0l;
25 QVBoxLayout *vbox, *vbox2; 25 QVBoxLayout *vbox, *vbox2;
26 QHBoxLayout *hbox, *hbox2, *hbox3; 26 QHBoxLayout *hbox, *hbox2, *hbox3;
27 QLabel *file, *mode, *progress, *status; 27 QLabel *file, *mode, *progress, *status;
diff --git a/noncore/apps/opie-console/transferdialog.h b/noncore/apps/opie-console/transferdialog.h
index 1b27f16..d87be6a 100644
--- a/noncore/apps/opie-console/transferdialog.h
+++ b/noncore/apps/opie-console/transferdialog.h
@@ -13,13 +13,13 @@ class FileTransferLayer;
13class ReceiveLayer; 13class ReceiveLayer;
14 14
15class TransferDialog : public QDialog 15class TransferDialog : public QDialog
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 public: 18 public:
19 TransferDialog(MainWindow *parent = 0l, const char *name = 0l); 19 TransferDialog(QWidget *parent = 0l, MainWindow *mainwindow = 0l, const char *name = 0l);
20 ~TransferDialog(); 20 ~TransferDialog();
21 21
22 public slots: 22 public slots:
23 void slotFilename(); 23 void slotFilename();
24 void slotTransfer(); 24 void slotTransfer();
25 void slotCancel(); 25 void slotCancel();