-rw-r--r-- | core/obex/obexsend.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index 9cd9972..dbbb7b3 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp @@ -21,6 +21,6 @@ using namespace Opie::Core; #include <qpixmap.h> #include <qlistview.h> -#include <qtimer.h> +#include <unistd.h> /* TRANSLATOR OpieObex::SendWidget */ @@ -84,5 +84,5 @@ int SendWidget::addReceiver(const char *r, const char *icon) bool SendWidget::receiverSelected(int id) { - return receivers[id]->pixmap(2); + return (bool)(receivers[id]->pixmap(2) != NULL); } @@ -142,5 +142,5 @@ void SendWidget::slotStartIrda() { if ( !m_irDa.count() ) return; if ( m_irDaIt == m_irDa.end() ) { - irdaStatus->setText(tr("complete.")); + irdaStatus->setText(tr("complete.")); return; } @@ -174,5 +174,5 @@ void SendWidget::slotStartBt() { ++m_btIt; if (m_btIt == m_bt.end() ) { - btStatus->setText(tr("complete.")); + btStatus->setText(tr("complete.")); return; } @@ -188,5 +188,6 @@ void SendWidget::send_to_receivers() { void SendWidget::scan_for_receivers() { - //FIXME: Clean ListBox prior to (re)scan + receiverList->clear(); + receivers.clear(); sendButton->setDisabled( true ); @@ -220,19 +221,20 @@ void SendWidget::toggle_receiver(QListViewItem* item) // toggle the state of an individual receiver. if(item->pixmap(2)) - item->setPixmap(2,QPixmap()); + item->setPixmap(2,QPixmap()); else - item->setPixmap(2,Resource::loadPixmap("backup/check.png")); + item->setPixmap(2,Resource::loadPixmap("backup/check.png")); } void SendWidget::closeEvent( QCloseEvent* e) { - e->accept(); // make sure - QTimer::singleShot(0, this, SLOT(userDone() ) ); -} -void SendWidget::userDone() { + obexSendBase::closeEvent(e); QCopEnvelope e0("QPE/IrDaApplet", "disableIrda()"); QCopEnvelope e1("QPE/Bluetooth", "disableBluetooth()"); - emit done(); } + +void SendWidget::userDone() { + close(); +} + QString SendWidget::file()const { return m_file; |