summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-16 09:55:52 (UTC)
committer llornkcor <llornkcor>2005-08-16 09:55:52 (UTC)
commitdd4792fe0ac89205e7d7a7e38f3d4350e19f25d7 (patch) (unidiff)
tree4a9bcee8e558a66ab9ecd0c1c6337581821c9d95
parent8c44cc4fdb67ea6b96cf7e49ec648de4049a9f1c (diff)
downloadopie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.zip
opie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.tar.gz
opie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.tar.bz2
fix a few things
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opie-smb/qsmb.cpp19
-rw-r--r--noncore/net/opie-smb/qsmb.h4
2 files changed, 21 insertions, 2 deletions
diff --git a/noncore/net/opie-smb/qsmb.cpp b/noncore/net/opie-smb/qsmb.cpp
index 7f3ae89..d35e09a 100644
--- a/noncore/net/opie-smb/qsmb.cpp
+++ b/noncore/net/opie-smb/qsmb.cpp
@@ -45,4 +45,5 @@ Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl )
45 connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked())); 45 connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked()));
46 connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear())); 46 connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear()));
47 connect(ListViewScan, SIGNAL(clicked(QListViewItem*)), this, SLOT(TextViewClicked(QListViewItem*)));
47 48
48 mountpt->setEditable(true); 49 mountpt->setEditable(true);
@@ -354,4 +355,10 @@ void Qsmb::DoIt()
354void Qsmb::umountIt() 355void Qsmb::umountIt()
355{ 356{
357 QListViewItem *element;
358 element = ListViewScan->selectedItem();
359 if(!element) {
360 return;
361 }
362
356 QString mount = mountpt->currentText(); 363 QString mount = mountpt->currentText();
357 if(!isMounted(mount)) { 364 if(!isMounted(mount)) {
@@ -363,6 +370,4 @@ void Qsmb::umountIt()
363 QStringList ccmd; 370 QStringList ccmd;
364 QString share; 371 QString share;
365 QListViewItem *element;
366 element = ListViewScan->selectedItem();
367 share = element->text(0); 372 share = element->text(0);
368 qWarning("selected share is "+share); 373 qWarning("selected share is "+share);
@@ -436,2 +441,12 @@ QString Qsmb::getMount(const QString &shareName)
436 return mount; 441 return mount;
437} 442}
443
444void Qsmb::TextViewClicked(QListViewItem* item)
445{
446 if(item == NULL) return;
447
448 QString text = item->text(2);
449 qWarning(text);
450 if( !text.isEmpty())
451 mountpt->insertItem(text,0);
452}
diff --git a/noncore/net/opie-smb/qsmb.h b/noncore/net/opie-smb/qsmb.h
index abf27da..175b2c3 100644
--- a/noncore/net/opie-smb/qsmb.h
+++ b/noncore/net/opie-smb/qsmb.h
@@ -11,4 +11,6 @@
11#include <pthread.h> 11#include <pthread.h>
12 12
13#include <qlistview.h>
14
13class Qsmb : public FormQPESMBBase 15class Qsmb : public FormQPESMBBase
14{ 16{
@@ -39,4 +41,6 @@ public slots:
39 bool runCommand(const QStringList &); 41 bool runCommand(const QStringList &);
40 42
43private slots:
44 void TextViewClicked(QListViewItem*);
41}; 45};
42void* runit(void *arg); 46void* runit(void *arg);