summaryrefslogtreecommitdiff
path: root/noncore/net/opie-smb/qsmb.cpp
authorllornkcor <llornkcor>2005-08-16 09:55:52 (UTC)
committer llornkcor <llornkcor>2005-08-16 09:55:52 (UTC)
commitdd4792fe0ac89205e7d7a7e38f3d4350e19f25d7 (patch) (unidiff)
tree4a9bcee8e558a66ab9ecd0c1c6337581821c9d95 /noncore/net/opie-smb/qsmb.cpp
parent8c44cc4fdb67ea6b96cf7e49ec648de4049a9f1c (diff)
downloadopie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.zip
opie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.tar.gz
opie-dd4792fe0ac89205e7d7a7e38f3d4350e19f25d7.tar.bz2
fix a few things
Diffstat (limited to 'noncore/net/opie-smb/qsmb.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opie-smb/qsmb.cpp19
1 files changed, 17 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
@@ -44,6 +44,7 @@ Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl )
44 connect(UnmountBtn, SIGNAL(clicked()), this, SLOT(umountIt())); 44 connect(UnmountBtn, SIGNAL(clicked()), this, SLOT(umountIt()));
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);
49 mountpt->insertItem("/mnt/samba1",-1); 50 mountpt->insertItem("/mnt/samba1",-1);
@@ -353,6 +354,12 @@ void Qsmb::DoIt()
353 354
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)) {
358 qWarning(mount +" is not mounted"); 365 qWarning(mount +" is not mounted");
@@ -362,8 +369,6 @@ void Qsmb::umountIt()
362 369
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);
369 374
@@ -435,3 +440,13 @@ QString Qsmb::getMount(const QString &shareName)
435 endmntent( mntfp ); 440 endmntent( mntfp );
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}