author | zecke <zecke> | 2002-06-13 19:04:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-13 19:04:05 (UTC) |
commit | ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a (patch) (side-by-side diff) | |
tree | 9fe7679c82a41b21de3378090ce211c00a8bc178 /core/applets/obex/obeximpl.cc | |
parent | 9939c618389465ef5837bf510186d583891e65e3 (diff) | |
download | opie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.zip opie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.tar.gz opie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.tar.bz2 |
Stop receiving when wanting to send
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/obex/obeximpl.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc index 856f100..0c137af 100644 --- a/core/applets/obex/obeximpl.cc +++ b/core/applets/obex/obeximpl.cc @@ -46,22 +46,28 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { qWarning("Message %s", msg.data() ); if(msg == "send(QString,QString,QString)" ) { QString desc; stream >> desc; QString filename; stream >> filename; + m_sendgui->raise(); // should be on top m_sendgui->showMaximized(); m_sendgui->lblPath->setText(filename); connect( (QObject*)m_sendgui->PushButton2, SIGNAL(clicked()), this, SLOT(slotCancelSend())); m_obex->send(filename ); connect( (QObject*)m_obex, SIGNAL( sent() ), this, SLOT( slotSent() ) ); - }else if(msg == "receive(bool)" ) { // open a GUI + }else if(msg == "receive(int)" ) { // open a GUI m_recvgui->showMaximized(); - m_obex->receive(); + int receiveD = 0; + stream >> receiveD; + if ( receiveD == 1) + m_obex->receive(); + else + m_obex->setReceiveEnabled( false ); } else if (msg =="done(QString)") { QString text; stream >> text; m_sendgui->lblPath->setText(tr("Done transfering " + text)); @@ -84,13 +90,13 @@ void ObexImpl::slotSent() { m_sendgui->hide(); } void ObexImpl::slotError( int errorCode) { QString errorString = ""; - if (errorCode = -1) { + if (errorCode == -1) { errorString = "test"; } qDebug("Error: " + errorString); m_sendgui->hide(); } |