author | llornkcor <llornkcor> | 2004-07-07 21:00:39 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-07-07 21:00:39 (UTC) |
commit | 30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d (patch) (unidiff) | |
tree | 686ad6e5b4873c5c3046442e106c99cb6f9a0907 | |
parent | e6a4d3d3e45f1a39aafb3ecfe298611621590d22 (diff) | |
download | opie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.zip opie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.tar.gz opie-30d8a50aba298e26a3d3cc1d5b6a0c69c1d2783d.tar.bz2 |
bug fix 1267
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 27 |
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 | |||
@@ -43,5 +43,4 @@ using namespace Opie::Core; | |||
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> |
@@ -303,8 +302,6 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | |||
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); |
@@ -318,5 +315,4 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | |||
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&) ) ); |
@@ -324,5 +320,4 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | |||
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); |
@@ -330,7 +325,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | |||
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 | ||
@@ -668,5 +661,5 @@ void OpieFtp::populateLocalView() | |||
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() ); |
@@ -674,5 +667,5 @@ void OpieFtp::populateLocalView() | |||
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() ); |
@@ -681,7 +674,9 @@ void OpieFtp::populateLocalView() | |||
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 ); |
@@ -719,5 +714,5 @@ void OpieFtp::populateLocalView() | |||
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 | ||
@@ -1146,13 +1141,18 @@ void OpieFtp::currentPathComboActivated(const QString & currentPath) { | |||
1146 | 1141 | ||
1147 | void OpieFtp::fillCombo(const QString ¤tPath) { | 1142 | void OpieFtp::fillCombo(const QString ¤tPath) { |
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 ); |
@@ -1288,4 +1288,5 @@ void 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"); |