Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 92804b2..c653b90 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -312,13 +312,14 @@ void AdvancedFm::populateRemoteView() { | |||
312 | void AdvancedFm::localListClicked(QListViewItem *selectedItem) { | 312 | void AdvancedFm::localListClicked(QListViewItem *selectedItem) { |
313 | if(selectedItem) { | 313 | if(selectedItem) { |
314 | QString strItem=selectedItem->text(0); | 314 | QString strItem=selectedItem->text(0); |
315 | QString strSize=selectedItem->text(1); | 315 | QString strSize=selectedItem->text(1); |
316 | strSize=strSize.stripWhiteSpace(); | 316 | strSize=strSize.stripWhiteSpace(); |
317 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 317 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
318 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 318 | QString strItem2 = dealWithSymName((const QString&)strItem); |
319 | // QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | ||
319 | if(QDir(strItem2).exists() ) { | 320 | if(QDir(strItem2).exists() ) { |
320 | currentDir.cd(strItem2, TRUE); | 321 | currentDir.cd(strItem2, TRUE); |
321 | populateLocalView(); | 322 | populateLocalView(); |
322 | 323 | ||
323 | } | 324 | } |
324 | } else { // not a symlink | 325 | } else { // not a symlink |
@@ -358,13 +359,14 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem) { | |||
358 | 359 | ||
359 | if(selectedItem) { | 360 | if(selectedItem) { |
360 | QString strItem=selectedItem->text(0); | 361 | QString strItem=selectedItem->text(0); |
361 | QString strSize=selectedItem->text(1); | 362 | QString strSize=selectedItem->text(1); |
362 | strSize=strSize.stripWhiteSpace(); | 363 | strSize=strSize.stripWhiteSpace(); |
363 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 364 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
364 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 365 | QString strItem2 = dealWithSymName((const QString&)strItem); |
366 | // QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | ||
365 | currentRemoteDir.cd(strItem2, TRUE); | 367 | currentRemoteDir.cd(strItem2, TRUE); |
366 | populateRemoteView(); | 368 | populateRemoteView(); |
367 | } else { // not a symlink | 369 | } else { // not a symlink |
368 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { | 370 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { |
369 | if(QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem)).exists() ) { | 371 | if(QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem)).exists() ) { |
370 | strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem); | 372 | strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem); |
@@ -458,13 +460,13 @@ void AdvancedFm::currentPathComboChanged() { | |||
458 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); | 460 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); |
459 | } | 461 | } |
460 | } | 462 | } |
461 | } | 463 | } |
462 | 464 | ||
463 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 465 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
464 | 466 | qDebug("%d",TabWidget->getCurrentTab()); | |
465 | if (TabWidget->getCurrentTab() == 0) { | 467 | if (TabWidget->getCurrentTab() == 0) { |
466 | // if (TabWidget->currentPageIndex() == 0) { | 468 | // if (TabWidget->currentPageIndex() == 0) { |
467 | currentPathCombo->lineEdit()->setText( currentPath); | 469 | currentPathCombo->lineEdit()->setText( currentPath); |
468 | if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { | 470 | if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { |
469 | currentPathCombo->clear(); | 471 | currentPathCombo->clear(); |
470 | localDirPathStringList.prepend( currentPath ); | 472 | localDirPathStringList.prepend( currentPath ); |