summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-07-07 21:00:39 (UTC)
committer llornkcor <llornkcor>2004-07-07 21:00:39 (UTC)
commit30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d (patch) (unidiff)
tree686ad6e5b4873c5c3046442e106c99cb6f9a0907
parente6a4d3d3e45f1a39aafb3ecfe298611621590d22 (diff)
downloadopie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.zip
opie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.tar.gz
opie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.tar.bz2
bug fix 1267
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index aa4314a..817943b 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -42,7 +42,6 @@ using namespace Opie::Core;
42#include <qlineedit.h> 42#include <qlineedit.h>
43#include <qlistbox.h> 43#include <qlistbox.h>
44#include <qvbox.h> 44#include <qvbox.h>
45
46/* STD */ 45/* STD */
47#include <unistd.h> 46#include <unistd.h>
48#include <stdlib.h> 47#include <stdlib.h>
@@ -302,10 +301,8 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
302 301
303 TabWidget->insertTab( tab_3, tr( "Config" ) ); 302 TabWidget->insertTab( tab_3, tr( "Config" ) );
304 303
305#if 0
306 connect(TabWidget,SIGNAL(currentChanged(QWidget*)), 304 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),
307 this,SLOT(tabChanged(QWidget*))); 305 this,SLOT(tabChanged(QWidget*)));
308#endif
309 306
310 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 307 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
311 currentDir.setPath( QDir::currentDirPath()); 308 currentDir.setPath( QDir::currentDirPath());
@@ -317,21 +314,17 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
317 currentPathCombo->setEditable(TRUE); 314 currentPathCombo->setEditable(TRUE);
318 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 315 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
319 316
320#if 0
321 connect( currentPathCombo, SIGNAL( activated(const QString&) ), 317 connect( currentPathCombo, SIGNAL( activated(const QString&) ),
322 this, SLOT( currentPathComboActivated(const QString&) ) ); 318 this, SLOT( currentPathComboActivated(const QString&) ) );
323 319
324 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), 320 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
325 this,SLOT(currentPathComboChanged())); 321 this,SLOT(currentPathComboChanged()));
326#endif
327 ProgressBar = new QProgressBar( view, "ProgressBar" ); 322 ProgressBar = new QProgressBar( view, "ProgressBar" );
328 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); 323 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4);
329 ProgressBar->setMaximumHeight(10); 324 ProgressBar->setMaximumHeight(10);
330 filterStr="*"; 325 filterStr="*";
331 b=FALSE; 326 b=FALSE;
332#if 0
333 populateLocalView(); 327 populateLocalView();
334#endif
335 readConfig(); 328 readConfig();
336 329
337// ServerComboBox->setCurrentItem(currentServerConfig); 330// ServerComboBox->setCurrentItem(currentServerConfig);
@@ -667,22 +660,24 @@ void OpieFtp::populateLocalView()
667 while ( (fi=it.current()) ) { 660 while ( (fi=it.current()) ) {
668 if (fi->isSymLink() ){ 661 if (fi->isSymLink() ){
669 QString symLink=fi->readLink(); 662 QString symLink=fi->readLink();
670 odebug << "Symlink detected "+symLink << oendl; 663// odebug << "Symlink detected "+symLink << oendl;
671 QFileInfo sym( symLink); 664 QFileInfo sym( symLink);
672 fileS.sprintf( "%10i", sym.size() ); 665 fileS.sprintf( "%10i", sym.size() );
673 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); 666 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() );
674 fileDate = sym.lastModified().toString(); 667 fileDate = sym.lastModified().toString();
675 } else { 668 } else {
676 odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; 669// odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl;
677 fileS.sprintf( "%10i", fi->size() ); 670 fileS.sprintf( "%10i", fi->size() );
678 fileL.sprintf( "%s",fi->fileName().data() ); 671 fileL.sprintf( "%s",fi->fileName().data() );
679 fileDate= fi->lastModified().toString(); 672 fileDate= fi->lastModified().toString();
680 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { 673 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) {
681 fileL+="/"; 674 fileL+="/";
682 isDir=TRUE; 675 isDir=TRUE;
683 odebug << fileL << oendl; 676// odebug << fileL << oendl;
684 } 677 }
685 } 678 }
679
680
686 if(fileL !="./" && fi->exists()) { 681 if(fileL !="./" && fi->exists()) {
687 item = new QListViewItem( Local_View,fileL, fileDate, fileS ); 682 item = new QListViewItem( Local_View,fileL, fileDate, fileS );
688 QPixmap pm; 683 QPixmap pm;
@@ -718,7 +713,7 @@ void OpieFtp::populateLocalView()
718 } 713 }
719 Local_View->setSorting( 3,FALSE); 714 Local_View->setSorting( 3,FALSE);
720 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); 715 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() );
721 fillCombo( (const QString &)currentDir); 716 // fillCombo( (const QString &)currentDir);
722} 717}
723 718
724bool OpieFtp::populateRemoteView( ) 719bool OpieFtp::populateRemoteView( )
@@ -1145,15 +1140,20 @@ void OpieFtp::currentPathComboActivated(const QString & currentPath) {
1145} 1140}
1146 1141
1147void OpieFtp::fillCombo(const QString &currentPath) { 1142void OpieFtp::fillCombo(const QString &currentPath) {
1148 1143 qDebug("Fill Combo "+currentPath);
1149 currentPathCombo->lineEdit()->setText(currentPath); 1144 currentPathCombo->lineEdit()->setText(currentPath);
1145
1150 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { 1146 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) {
1147 qDebug("Clearing local");
1151 currentPathCombo->clear(); 1148 currentPathCombo->clear();
1152 localDirPathStringList.prepend(currentPath ); 1149 localDirPathStringList.prepend(currentPath );
1153 currentPathCombo->insertStringList( localDirPathStringList,-1); 1150 currentPathCombo->insertStringList( localDirPathStringList,-1);
1154 } 1151 }
1152
1155 currentPathCombo->lineEdit()->setText(currentPath); 1153 currentPathCombo->lineEdit()->setText(currentPath);
1156 if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { 1154
1155 if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) {
1156 qDebug("Clearing remote");
1157 currentPathCombo->clear(); 1157 currentPathCombo->clear();
1158 remoteDirPathStringList.prepend(currentPath ); 1158 remoteDirPathStringList.prepend(currentPath );
1159 currentPathCombo->insertStringList( remoteDirPathStringList,-1); 1159 currentPathCombo->insertStringList( remoteDirPathStringList,-1);
@@ -1287,6 +1287,7 @@ void OpieFtp::clearCombos() {
1287void OpieFtp::fillCombos() 1287void OpieFtp::fillCombos()
1288{ 1288{
1289 clearCombos(); 1289 clearCombos();
1290 qDebug("did we get here yet?");
1290 1291
1291 Config cfg("opieftp"); 1292 Config cfg("opieftp");
1292 cfg.setGroup("Server"); 1293 cfg.setGroup("Server");