summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -75,24 +75,30 @@ Dialer::Dialer(const Profile& profile, int fd, QWidget *parent, const char *name
connect(cancel, SIGNAL(clicked()), SLOT(slotCancel()));
show();
QTimer::singleShot(500, this, SLOT(slotAutostart()));
}
Dialer::~Dialer()
{
}
+void Dialer::setHangupOnly()
+{
+ state = state_cancel;
+ usercancel = 1;
+}
+
void Dialer::slotCancel()
{
if(state != state_online)
{
usercancel = 1;
reset();
}
else accept();
}
void Dialer::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
@@ -5,24 +5,25 @@
#include "profile.h"
class QLabel;
class QProgressBar;
class Dialer : public QDialog
{
Q_OBJECT
public:
Dialer(const Profile& profile, int fd, QWidget *parent = NULL, const char *name = NULL);
~Dialer();
+ void setHangupOnly();
public slots:
void slotCancel();
void slotAutostart();
private:
void switchState(int newstate);
void reset();
void dial(const QString& number);
void trydial(const QString& number);
void send(const QString& msg);
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
@@ -6,25 +6,28 @@
IOModem::IOModem( const Profile &profile )
: IOSerial( profile ) {
m_profile = profile;
}
IOModem::~IOModem() {
}
void IOModem::close() {
- // maybe do a hangup here just in case...?
+ // Hangup, discarding result
+ Dialer d(m_profile, rawIO());
+ d.setHangupOnly();
+ d.exec();
IOSerial::close();
}
bool IOModem::open() {
bool ret = IOSerial::open();
if(!ret) return false;
Dialer d(m_profile, rawIO());
int result = d.exec();
if(result == QDialog::Accepted)
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
@@ -433,26 +433,27 @@ void MainWindow::create( const Profile& prof ) {
m_closewindow->setEnabled( true );
// is io_layer wants direct connection, then autoconnect
if ( ( m_curSession->layer() )->supports()[0] = 1 ) {
slotConnect();
}
}
void MainWindow::slotTransfer()
{
if ( currentSession() ) {
- TransferDialog dlg(this);
+ TransferDialog dlg(currentSession()->widgetStack(), this);
dlg.showMaximized();
+ //currentSession()->widgetStack()->add(dlg);
dlg.exec();
}
}
void MainWindow::slotOpenKeb(bool state) {
if (state) m_keyBar->show();
else m_keyBar->hide();
}
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
@@ -8,26 +8,26 @@
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <opie/ofiledialog.h>
#include "file_layer.h"
#include "receive_layer.h"
#include "metafactory.h"
#include "mainwindow.h"
#include "transferdialog.h"
-TransferDialog::TransferDialog(MainWindow *parent, const char *name)
-: QDialog(0l, 0l, true), m_win(parent)
+TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *name)
+: QDialog(parent, 0l, true), m_win(mainwindow)
{
m_lay = 0l;
m_recvlay = 0l;
QVBoxLayout *vbox, *vbox2;
QHBoxLayout *hbox, *hbox2, *hbox3;
QLabel *file, *mode, *progress, *status;
QButtonGroup *group;
QRadioButton *mode_send, *mode_receive;
m_autocleanup = 0;
group = new QButtonGroup(QObject::tr("Transfer mode"), this);
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
@@ -7,25 +7,25 @@ class QLineEdit;
class QComboBox;
class QProgressBar;
class QLabel;
class QPushButton;
class MainWindow;
class FileTransferLayer;
class ReceiveLayer;
class TransferDialog : public QDialog
{
Q_OBJECT
public:
- TransferDialog(MainWindow *parent = 0l, const char *name = 0l);
+ TransferDialog(QWidget *parent = 0l, MainWindow *mainwindow = 0l, const char *name = 0l);
~TransferDialog();
public slots:
void slotFilename();
void slotTransfer();
void slotCancel();
void slotProgress(const QString&, int, int, int, int, int);
void slotError(int error, const QString& message);
void slotSent();
void slotReceived(const QString& file);
void slotMode(int id);