summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfm.cpp
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fc6c3bf..d56e746 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -283,13 +283,12 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *, const QPoint& , int )
283 case 1: 283 case 1:
284 { 284 {
285 if(renameBox != 0 ) 285 if(renameBox != 0 )
286 { 286 {
287 cancelRename(); 287 cancelRename();
288 } 288 }
289
290 } 289 }
291 break; 290 break;
292 case 2: 291 case 2:
293 menuTimer.start( 500, TRUE ); 292 menuTimer.start( 500, TRUE );
294 break; 293 break;
295 }; 294 };
@@ -364,23 +363,23 @@ void AdvancedFm::currentPathComboActivated(const QString & currentPath)
364} 363}
365 364
366QStringList AdvancedFm::getPath() 365QStringList AdvancedFm::getPath()
367{ 366{
368 QStringList strList; 367 QStringList strList;
369 QListView *thisView=CurrentView(); 368 QListView *thisView=CurrentView();
370 QList<QListViewItem> * getSelectedItems( QListView * thisView ); 369 QList<QListViewItem> * getSelectedItems( QListView * thisView );
371 QListViewItemIterator it( thisView ); 370 QListViewItemIterator it( thisView );
372 for ( ; it.current(); ++it ) 371 for ( ; it.current(); ++it )
373 { 372 {
374 if ( it.current()->isSelected() ) 373 if ( it.current()->isSelected() )
375 { 374 {
376 strList << it.current()->text(0); 375 strList << it.current()->text(0);
377// qDebug(it.current()->text(0)); 376// qDebug(it.current()->text(0));
378 } 377 }
379 } 378 }
380 return strList; 379 return strList;
381} 380}
382 381
383void AdvancedFm::homeButtonPushed() 382void AdvancedFm::homeButtonPushed()
384{ 383{
385 QString current = QDir::homeDirPath(); 384 QString current = QDir::homeDirPath();
386 chdir( current.latin1() ); 385 chdir( current.latin1() );
@@ -390,35 +389,33 @@ void AdvancedFm::homeButtonPushed()
390} 389}
391 390
392void AdvancedFm::docButtonPushed() 391void AdvancedFm::docButtonPushed()
393{ 392{
394 QString current = QPEApplication::documentDir(); 393 QString current = QPEApplication::documentDir();
395 chdir( current.latin1() ); 394 chdir( current.latin1() );
396 395 CurrentDir()->cd( current, TRUE);
397 CurrentDir()->cd( current, TRUE); 396 populateView();
398 populateView();
399 update(); 397 update();
400} 398}
401 399
402void AdvancedFm::SDButtonPushed() 400void AdvancedFm::SDButtonPushed()
403{ 401{
404 QString current = "/mnt/card";// this can change so fix 402 QString current = "/mnt/card";// this can change so fix
405 chdir( current.latin1() ); 403 chdir( current.latin1() );
406 CurrentDir()->cd( current, TRUE); 404 CurrentDir()->cd( current, TRUE);
407 populateView(); 405 populateView();
408 update(); 406 update();
409} 407}
410 408
411void AdvancedFm::CFButtonPushed() 409void AdvancedFm::CFButtonPushed()
412{ 410{
413 QString current; 411 QString current;
414 if(zaurusDevice) 412 if(zaurusDevice)
415 current= "/mnt/cf"; //zaurus 413 current= "/mnt/cf"; //zaurus
416 else 414 else
417 current = "/mnt/hda"; //ipaq 415 current = "/mnt/hda"; //ipaq
418
419 chdir( current.latin1() ); 416 chdir( current.latin1() );
420 CurrentDir()->cd( current, TRUE); 417 CurrentDir()->cd( current, TRUE);
421 populateView(); 418 populateView();
422 update(); 419 update();
423} 420}
424 421
@@ -784,13 +781,14 @@ void AdvancedFm::removeCustomDir()
784 dir = CurrentDir()->canonicalPath(); 781 dir = CurrentDir()->canonicalPath();
785 int ramble=2; 782 int ramble=2;
786// int ramble=-24; 783// int ramble=-24;
787//first remove list 784//first remove list
788 if(list.grep(dir,true).isEmpty()) 785 if(list.grep(dir,true).isEmpty())
789 { 786 {
790 QMessageBox::message("AdvancedFm",tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!")); 787 QMessageBox::message("AdvancedFm",
788 tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!"));
791 } 789 }
792 else 790 else
793 { 791 {
794 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) 792 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
795 { 793 {
796 if((*it) != dir)//current item is not our current dir, so add it to temp list 794 if((*it) != dir)//current item is not our current dir, so add it to temp list