author | zecke <zecke> | 2002-06-13 19:04:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-13 19:04:05 (UTC) |
commit | ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a (patch) (unidiff) | |
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 | |||
@@ -49,6 +49,7 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { | |||
49 | stream >> desc; | 49 | stream >> desc; |
50 | QString filename; | 50 | QString filename; |
51 | stream >> filename; | 51 | stream >> filename; |
52 | m_sendgui->raise(); // should be on top | ||
52 | m_sendgui->showMaximized(); | 53 | m_sendgui->showMaximized(); |
53 | m_sendgui->lblPath->setText(filename); | 54 | m_sendgui->lblPath->setText(filename); |
54 | connect( (QObject*)m_sendgui->PushButton2, SIGNAL(clicked()), | 55 | connect( (QObject*)m_sendgui->PushButton2, SIGNAL(clicked()), |
@@ -56,9 +57,14 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { | |||
56 | m_obex->send(filename ); | 57 | m_obex->send(filename ); |
57 | connect( (QObject*)m_obex, SIGNAL( sent() ), this, | 58 | connect( (QObject*)m_obex, SIGNAL( sent() ), this, |
58 | SLOT( slotSent() ) ); | 59 | SLOT( slotSent() ) ); |
59 | }else if(msg == "receive(bool)" ) { // open a GUI | 60 | }else if(msg == "receive(int)" ) { // open a GUI |
60 | m_recvgui->showMaximized(); | 61 | m_recvgui->showMaximized(); |
61 | m_obex->receive(); | 62 | int receiveD = 0; |
63 | stream >> receiveD; | ||
64 | if ( receiveD == 1) | ||
65 | m_obex->receive(); | ||
66 | else | ||
67 | m_obex->setReceiveEnabled( false ); | ||
62 | 68 | ||
63 | } else if (msg =="done(QString)") { | 69 | } else if (msg =="done(QString)") { |
64 | QString text; | 70 | QString text; |
@@ -87,7 +93,7 @@ void ObexImpl::slotSent() { | |||
87 | void ObexImpl::slotError( int errorCode) { | 93 | void ObexImpl::slotError( int errorCode) { |
88 | 94 | ||
89 | QString errorString = ""; | 95 | QString errorString = ""; |
90 | if (errorCode = -1) { | 96 | if (errorCode == -1) { |
91 | errorString = "test"; | 97 | errorString = "test"; |
92 | } | 98 | } |
93 | qDebug("Error: " + errorString); | 99 | qDebug("Error: " + errorString); |