-rw-r--r-- | noncore/net/opie-smb/qsmb.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/net/opie-smb/qsmb.cpp b/noncore/net/opie-smb/qsmb.cpp index b978b46..e2ddc7f 100644 --- a/noncore/net/opie-smb/qsmb.cpp +++ b/noncore/net/opie-smb/qsmb.cpp @@ -37,47 +37,54 @@ Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl ) : FormQPESMBBase( parent, name, fl ) { connect(CBHost, SIGNAL(activated(int)), this, SLOT(hostSelected(int))); connect(DoItBtn, SIGNAL(clicked()), this, SLOT(DoItClicked())); connect(UnmountBtn, SIGNAL(clicked()), this, SLOT(umountIt())); connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked())); connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear())); mountpt->setEditable(true); mountpt->insertItem("/mnt/samba1",-1); mountpt->insertItem("/mnt/samba2",-1); mountpt->insertItem("/mnt/samba3",-1); -// TextViewOutput + setTabOrder(BtnScan, username); + setTabOrder(username, password); + setTabOrder(password, CBHost); + setTabOrder(CBHost, TextViewOutput); + setTabOrder(TextViewOutput, mountpt); + setTabOrder(mountpt, DoItBtn); + setTabOrder(DoItBtn, UnmountBtn); top_element = NULL; scanning = false; } Qsmb::~Qsmb() { } void Qsmb::clear() { if (scanning) return; ListViewScan->clear(); TextViewOutput->setText(""); + CBHost->clear(); top_element = NULL; } void Qsmb::scanClicked() { if (scanning) return; pthread_create(&tpid, NULL, runit, (void *)this); } void Qsmb::DoItClicked() { if( !ListViewScan->selectedItem()) { QMessageBox::warning(this, tr("Error"),tr("<p>No share selected!</p>")); return; } @@ -88,33 +95,34 @@ void Qsmb::DoItClicked() void* runit(void* arg) { Qsmb* caller = (Qsmb*)arg; caller->scan(); return(0); } void* runitm(void* arg) { Qsmb* caller = (Qsmb*)arg; caller->DoIt(); return(0); } void Qsmb::scan() { - if (scanning) return; + clear(); +// if (scanning) return; scanning = true; QString match; QString cmd; LScan->setText("Scanning..."); qApp->processEvents(); sockaddr_in my_addr; get_myaddress( &my_addr); QString ip = inet_ntoa( my_addr.sin_addr); qWarning("IP Address : "+ip); match = ip.left(5); QStringList ccmd; |