-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index b9e254e..18952c3 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -675,24 +675,25 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) | |||
675 | m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 675 | m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
676 | m.insertItem( tr( "Copy" ), this, SLOT( copy() )); | 676 | m.insertItem( tr( "Copy" ), this, SLOT( copy() )); |
677 | m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 677 | m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
678 | m.insertItem( tr( "Move" ), this, SLOT( move() )); | 678 | m.insertItem( tr( "Move" ), this, SLOT( move() )); |
679 | m.insertSeparator(); | 679 | m.insertSeparator(); |
680 | m.insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); | 680 | m.insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); |
681 | m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 681 | m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
682 | m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 682 | m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
683 | m.insertSeparator(); | 683 | m.insertSeparator(); |
684 | m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 684 | m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
685 | m.insertSeparator(); | 685 | m.insertSeparator(); |
686 | m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 686 | m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
687 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | ||
687 | m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 688 | m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
688 | m.setCheckable(TRUE); | 689 | m.setCheckable(TRUE); |
689 | if (!b) | 690 | if (!b) |
690 | m.setItemChecked(m.idAt(0),TRUE); | 691 | m.setItemChecked(m.idAt(0),TRUE); |
691 | else | 692 | else |
692 | m.setItemChecked(m.idAt(0),FALSE); | 693 | m.setItemChecked(m.idAt(0),FALSE); |
693 | m.exec( QCursor::pos() ); | 694 | m.exec( QCursor::pos() ); |
694 | } | 695 | } |
695 | } | 696 | } |
696 | 697 | ||
697 | void AdvancedFm::showRemoteMenu(QListViewItem * item) | 698 | void AdvancedFm::showRemoteMenu(QListViewItem * item) |
698 | { | 699 | { |
@@ -711,24 +712,25 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) | |||
711 | m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 712 | m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
712 | m.insertItem( tr( "Copy" ), this, SLOT( copy() )); | 713 | m.insertItem( tr( "Copy" ), this, SLOT( copy() )); |
713 | m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 714 | m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
714 | m.insertItem( tr( "Move" ), this, SLOT( move() )); | 715 | m.insertItem( tr( "Move" ), this, SLOT( move() )); |
715 | m.insertSeparator(); | 716 | m.insertSeparator(); |
716 | m.insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); | 717 | m.insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); |
717 | m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 718 | m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
718 | m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 719 | m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
719 | m.insertSeparator(); | 720 | m.insertSeparator(); |
720 | m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 721 | m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
721 | m.insertSeparator(); | 722 | m.insertSeparator(); |
722 | m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 723 | m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
724 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | ||
723 | m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 725 | m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
724 | m.setCheckable(TRUE); | 726 | m.setCheckable(TRUE); |
725 | if (!b) | 727 | if (!b) |
726 | m.setItemChecked(m.idAt(0),TRUE); | 728 | m.setItemChecked(m.idAt(0),TRUE); |
727 | else | 729 | else |
728 | m.setItemChecked(m.idAt(0),FALSE); | 730 | m.setItemChecked(m.idAt(0),FALSE); |
729 | m.exec( QCursor::pos() ); | 731 | m.exec( QCursor::pos() ); |
730 | } | 732 | } |
731 | } | 733 | } |
732 | 734 | ||
733 | void AdvancedFm::runThis() { | 735 | void AdvancedFm::runThis() { |
734 | // QFileInfo *fi; | 736 | // QFileInfo *fi; |
@@ -1047,29 +1049,32 @@ void AdvancedFm::filePerms() { | |||
1047 | populateLocalView(); | 1049 | populateLocalView(); |
1048 | } else { | 1050 | } else { |
1049 | populateRemoteView(); | 1051 | populateRemoteView(); |
1050 | } | 1052 | } |
1051 | 1053 | ||
1052 | 1054 | ||
1053 | } | 1055 | } |
1054 | 1056 | ||
1055 | void AdvancedFm::doProperties() { | 1057 | void AdvancedFm::doProperties() { |
1056 | QStringList curFileList = getPath(); | 1058 | QStringList curFileList = getPath(); |
1057 | QString filePath; | 1059 | QString filePath; |
1058 | if (TabWidget->currentPageIndex() == 0) { | 1060 | if (TabWidget->currentPageIndex() == 0) { |
1061 | |||
1059 | filePath = currentDir.canonicalPath()+"/"; | 1062 | filePath = currentDir.canonicalPath()+"/"; |
1060 | } else { | 1063 | } else { |
1061 | filePath= currentRemoteDir.canonicalPath()+"/"; | 1064 | filePath= currentRemoteDir.canonicalPath()+"/"; |
1062 | } | 1065 | } |
1066 | // qDebug("%d",curFileList.count()); | ||
1063 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1067 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1068 | qDebug((filePath+*it)); | ||
1064 | DocLnk lnk( (filePath+*it)); | 1069 | DocLnk lnk( (filePath+*it)); |
1065 | LnkProperties prop( &lnk ); | 1070 | LnkProperties prop( &lnk ); |
1066 | // connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); | 1071 | // connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); |
1067 | prop.showMaximized(); | 1072 | prop.showMaximized(); |
1068 | prop.exec(); | 1073 | prop.exec(); |
1069 | } | 1074 | } |
1070 | } | 1075 | } |
1071 | 1076 | ||
1072 | QStringList AdvancedFm::getPath() { | 1077 | QStringList AdvancedFm::getPath() { |
1073 | QStringList strList; | 1078 | QStringList strList; |
1074 | if (TabWidget->currentPageIndex() == 0) { | 1079 | if (TabWidget->currentPageIndex() == 0) { |
1075 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 1080 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |