summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index ecf471d..ac16540 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -580,65 +580,66 @@ void AdvancedFm::showFileMenu() {
580 n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); 580 n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
581 581
582 n->insertSeparator(); 582 n->insertSeparator();
583 n->insertItem( tr( "Rename" ), this, SLOT( renameIt() )); 583 n->insertItem( tr( "Rename" ), this, SLOT( renameIt() ));
584 584
585 n->insertItem( tr( "Copy" ), this, SLOT( copy() )); 585 n->insertItem( tr( "Copy" ), this, SLOT( copy() ));
586 n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); 586 n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
587 n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); 587 n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() ));
588 n->insertItem( tr( "Move" ), this, SLOT( move() )); 588 n->insertItem( tr( "Move" ), this, SLOT( move() ));
589 589
590 n->insertSeparator(); 590 n->insertSeparator();
591 n->insertItem( tr( "Delete" ), this, SLOT( doDelete() )); 591 n->insertItem( tr( "Delete" ), this, SLOT( doDelete() ));
592 m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); 592 m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() ));
593 593
594 m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); 594 m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
595 m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); 595 m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
596 596
597 m->insertSeparator(); 597 m->insertSeparator();
598 m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); 598 m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
599 599
600#if defined(QT_QWS_OPIE) 600#if defined(QT_QWS_OPIE)
601 m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); 601 m->insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
602#endif 602#endif
603 m->setCheckable(TRUE); 603 m->setCheckable(TRUE);
604 if (!b) 604 if (!b)
605 m->setItemChecked(m->idAt(0),TRUE); 605 m->setItemChecked(m->idAt(0),TRUE);
606 else 606 else
607 m->setItemChecked(m->idAt(0),FALSE); 607 m->setItemChecked(m->idAt(0),FALSE);
608 608
609 if(Ir::supported()) 609 if(Ir::supported())
610 m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); 610 m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
611 m->setFocus(); 611 m->setFocus();
612 m->exec( QPoint( 4,QCursor::pos().y()) ); 612
613 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
613 614
614 if(m) delete m; 615 if(m) delete m;
615} 616}
616 617
617 618
618void AdvancedFm::cancelMenuTimer() { 619void AdvancedFm::cancelMenuTimer() {
619 620
620 if( menuTimer.isActive() ) 621 if( menuTimer.isActive() )
621 menuTimer.stop(); 622 menuTimer.stop();
622} 623}
623 624
624QString AdvancedFm::checkDiskSpace(const QString &path) { 625QString AdvancedFm::checkDiskSpace(const QString &path) {
625 struct statfs fss; 626 struct statfs fss;
626 if ( !statfs( path.latin1(), &fss ) ) { 627 if ( !statfs( path.latin1(), &fss ) ) {
627 int blkSize = fss.f_bsize; 628 int blkSize = fss.f_bsize;
628// int totalBlks = fs.f_blocks; 629// int totalBlks = fs.f_blocks;
629 int availBlks = fss.f_bavail; 630 int availBlks = fss.f_bavail;
630 631
631 long mult = blkSize / 1024; 632 long mult = blkSize / 1024;
632 long div = 1024 / blkSize; 633 long div = 1024 / blkSize;
633 if ( !mult ) mult = 1; 634 if ( !mult ) mult = 1;
634 if ( !div ) div = 1; 635 if ( !div ) div = 1;
635 636
636 637
637 return QString::number(availBlks * mult / div); 638 return QString::number(availBlks * mult / div);
638 } 639 }
639 return ""; 640 return "";
640} 641}
641 642
642void AdvancedFm::addToDocs() { 643void AdvancedFm::addToDocs() {
643 QStringList strListPaths = getPath(); 644 QStringList strListPaths = getPath();
644 QDir *thisDir = CurrentDir(); 645 QDir *thisDir = CurrentDir();