-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 6f017b4..ec7a08a 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -284,29 +284,30 @@ void AdvancedFm::switchToLocalTab() { | |||
284 | TabWidget->setCurrentWidget(0); | 284 | TabWidget->setCurrentWidget(0); |
285 | // Local_View->setFocus(); | 285 | // Local_View->setFocus(); |
286 | whichTab = 1; | 286 | whichTab = 1; |
287 | } | 287 | } |
288 | 288 | ||
289 | void AdvancedFm::switchToRemoteTab() { | 289 | void AdvancedFm::switchToRemoteTab() { |
290 | TabWidget->setCurrentWidget(1); | 290 | TabWidget->setCurrentWidget(1); |
291 | // Remote_View->setFocus(); | 291 | // Remote_View->setFocus(); |
292 | whichTab = 2; | 292 | whichTab = 2; |
293 | } | 293 | } |
294 | 294 | ||
295 | void AdvancedFm::currentPathComboChanged() { | 295 | void AdvancedFm::currentPathComboChanged() { |
296 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { | 296 | QString pDir = currentPathCombo->lineEdit()->text(); |
297 | CurrentDir()->setPath( currentPathCombo->lineEdit()->text() ); | 297 | if(QDir(pDir).exists()) { |
298 | CurrentDir()->setPath(pDir ); | ||
298 | populateView(); | 299 | populateView(); |
299 | } else { | 300 | } else { |
300 | QMessageBox::message(tr("Note"),tr("<p>That directory does not exist</p>")); | 301 | QMessageBox::message(tr("Note"),tr("<p>%1 does not exist</p>").arg(pDir)); |
301 | } | 302 | } |
302 | } | 303 | } |
303 | 304 | ||
304 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 305 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
305 | 306 | ||
306 | if ( TabWidget->currentWidget() == tab) { | 307 | if ( TabWidget->currentWidget() == tab) { |
307 | // if ( whichTab == 1) { | 308 | // if ( whichTab == 1) { |
308 | currentPathCombo->lineEdit()->setText( currentPath); | 309 | currentPathCombo->lineEdit()->setText( currentPath); |
309 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { | 310 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { |
310 | currentPathCombo->clear(); | 311 | currentPathCombo->clear(); |
311 | localDirPathStringList.prepend( currentPath ); | 312 | localDirPathStringList.prepend( currentPath ); |
312 | currentPathCombo->insertStringList( localDirPathStringList,-1); | 313 | currentPathCombo->insertStringList( localDirPathStringList,-1); |