summaryrefslogtreecommitdiff
path: root/core/applets/obex/obeximpl.cc
authorzecke <zecke>2002-06-13 19:04:05 (UTC)
committer zecke <zecke>2002-06-13 19:04:05 (UTC)
commited10b73df98c1b4c41a0b940e4f8729fe28c2b8a (patch) (side-by-side diff)
tree9fe7679c82a41b21de3378090ce211c00a8bc178 /core/applets/obex/obeximpl.cc
parent9939c618389465ef5837bf510186d583891e65e3 (diff)
downloadopie-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.cc12
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
@@ -49,6 +49,7 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
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()),
@@ -56,9 +57,14 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
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;
@@ -87,7 +93,7 @@ void ObexImpl::slotSent() {
void ObexImpl::slotError( int errorCode) {
QString errorString = "";
- if (errorCode = -1) {
+ if (errorCode == -1) {
errorString = "test";
}
qDebug("Error: " + errorString);