author | llornkcor <llornkcor> | 2002-11-16 03:59:23 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-16 03:59:23 (UTC) |
commit | b17b2274c200403da25a994ed9d8ba4856d725c0 (patch) (unidiff) | |
tree | d3f64243b4f0a8b8ec6300ac33430633da9543a8 | |
parent | d3e670971b2b721eb2b484801cf1c6ecbf52d436 (diff) | |
download | opie-b17b2274c200403da25a994ed9d8ba4856d725c0.zip opie-b17b2274c200403da25a994ed9d8ba4856d725c0.tar.gz opie-b17b2274c200403da25a994ed9d8ba4856d725c0.tar.bz2 |
various changes, popupmenu at complete left.
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 08dc24e..23244a2 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -1,79 +1,79 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | AdvancedFm.cpp | 2 | AdvancedFm.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #define DEVELOPERS_VERSION | 12 | #define DEVELOPERS_VERSION |
13 | #include "advancedfm.h" | 13 | #include "advancedfm.h" |
14 | 14 | ||
15 | #include <opie/otabwidget.h> | 15 | #include <opie/otabwidget.h> |
16 | // #include <opie/ofileselector.h> | 16 | // #include <opie/ofileselector.h> |
17 | // #include <opie/ofiledialog.h> | 17 | // #include <opie/ofiledialog.h> |
18 | 18 | ||
19 | #include <qpe/filemanager.h> | 19 | #include <qpe/filemanager.h> |
20 | #include <qpe/qcopenvelope_qws.h> | 20 | #include <qpe/qcopenvelope_qws.h> |
21 | #include <qpe/qpemenubar.h> | 21 | #include <qpe/qpemenubar.h> |
22 | #include <qpe/qpetoolbar.h> | 22 | #include <qpe/qpetoolbar.h> |
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qpe/mimetype.h> | 26 | #include <qpe/mimetype.h> |
27 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
28 | #include <qpe/ir.h> | 28 | #include <qpe/ir.h> |
29 | #include <qpe/resource.h> | 29 | #include <qpe/resource.h> |
30 | 30 | ||
31 | #include <qtabwidget.h> | 31 | #include <qtabwidget.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
34 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
35 | #include <qdir.h> | 35 | #include <qdir.h> |
36 | #include <qfile.h> | 36 | #include <qfile.h> |
37 | #include <qstring.h> | 37 | #include <qstring.h> |
38 | #include <qcombobox.h> | 38 | #include <qcombobox.h> |
39 | #include <qpopupmenu.h> | 39 | #include <qpopupmenu.h> |
40 | #include <qlistview.h> | 40 | #include <qlistview.h> |
41 | #include <qmainwindow.h> | 41 | #include <qmainwindow.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qprogressbar.h> | 43 | #include <qprogressbar.h> |
44 | #include <qspinbox.h> | 44 | #include <qspinbox.h> |
45 | #include <qwidget.h> | 45 | #include <qwidget.h> |
46 | #include <qlayout.h> | 46 | #include <qlayout.h> |
47 | #include <qimage.h> | 47 | #include <qimage.h> |
48 | #include <qpixmap.h> | 48 | #include <qpixmap.h> |
49 | #include <qmessagebox.h> | 49 | #include <qmessagebox.h> |
50 | #include <qlineedit.h> | 50 | #include <qlineedit.h> |
51 | #include <qregexp.h> | 51 | #include <qregexp.h> |
52 | 52 | ||
53 | #include <unistd.h> | 53 | #include <unistd.h> |
54 | #include <stdlib.h> | 54 | #include <stdlib.h> |
55 | #include <sys/stat.h> | 55 | #include <sys/stat.h> |
56 | #include <dirent.h> | 56 | #include <dirent.h> |
57 | #include <stdio.h> | 57 | #include <stdio.h> |
58 | #include <time.h> | 58 | #include <time.h> |
59 | #include <fcntl.h> | 59 | #include <fcntl.h> |
60 | #include <mntent.h> | 60 | #include <mntent.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <errno.h> | 62 | #include <errno.h> |
63 | #include <sys/vfs.h> | 63 | #include <sys/vfs.h> |
64 | #include <mntent.h> | 64 | #include <mntent.h> |
65 | #include <sys/utsname.h> | 65 | #include <sys/utsname.h> |
66 | 66 | ||
67 | AdvancedFm::AdvancedFm( ) | 67 | AdvancedFm::AdvancedFm( ) |
68 | : QMainWindow( ) { | 68 | : QMainWindow( ) { |
69 | init(); | 69 | init(); |
70 | initConnections(); | 70 | initConnections(); |
71 | populateLocalView(); | 71 | populateLocalView(); |
72 | populateRemoteView(); | 72 | populateRemoteView(); |
73 | currentPathCombo->setFocus(); | 73 | currentPathCombo->setFocus(); |
74 | } | 74 | } |
75 | 75 | ||
76 | AdvancedFm::~AdvancedFm() { | 76 | AdvancedFm::~AdvancedFm() { |
77 | } | 77 | } |
78 | 78 | ||
79 | void AdvancedFm::cleanUp() { | 79 | void AdvancedFm::cleanUp() { |
@@ -752,124 +752,124 @@ void AdvancedFm::showFileMenu() { | |||
752 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() )); | 752 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() )); |
753 | 753 | ||
754 | if ( QFileInfo(fi).isDir() ) { | 754 | if ( QFileInfo(fi).isDir() ) { |
755 | m->insertSeparator(); | 755 | m->insertSeparator(); |
756 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 756 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
757 | } else { | 757 | } else { |
758 | 758 | ||
759 | if ( app ) | 759 | if ( app ) |
760 | m->insertItem( app->pixmap(), tr( "Open in " | 760 | m->insertItem( app->pixmap(), tr( "Open in " |
761 | + app->name() ), this, SLOT( runThis() ) ); | 761 | + app->name() ), this, SLOT( runThis() ) ); |
762 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this | 762 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this |
763 | m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); | 763 | m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); |
764 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | 764 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); |
765 | } | 765 | } |
766 | 766 | ||
767 | m->insertItem(tr("Actions"),n); | 767 | m->insertItem(tr("Actions"),n); |
768 | if(isLocalView) | 768 | if(isLocalView) |
769 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 769 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
770 | else | 770 | else |
771 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 771 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
772 | 772 | ||
773 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 773 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
774 | 774 | ||
775 | n->insertSeparator(); | 775 | n->insertSeparator(); |
776 | 776 | ||
777 | 777 | ||
778 | if(isLocalView) | 778 | if(isLocalView) |
779 | n->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 779 | n->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
780 | else | 780 | else |
781 | n->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 781 | n->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
782 | 782 | ||
783 | n->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 783 | n->insertItem( tr( "Copy" ), this, SLOT( copy() )); |
784 | n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 784 | n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
785 | n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | 785 | n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); |
786 | n->insertItem( tr( "Move" ), this, SLOT( move() )); | 786 | n->insertItem( tr( "Move" ), this, SLOT( move() )); |
787 | 787 | ||
788 | n->insertSeparator(); | 788 | n->insertSeparator(); |
789 | 789 | ||
790 | if(isLocalView) | 790 | if(isLocalView) |
791 | n->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 791 | n->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
792 | else | 792 | else |
793 | n->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 793 | n->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
794 | 794 | ||
795 | 795 | ||
796 | m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | 796 | m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); |
797 | 797 | ||
798 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 798 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
799 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 799 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
800 | 800 | ||
801 | m->insertSeparator(); | 801 | m->insertSeparator(); |
802 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 802 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
803 | 803 | ||
804 | #if defined(QT_QWS_OPIE) | 804 | #if defined(QT_QWS_OPIE) |
805 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 805 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
806 | #endif | 806 | #endif |
807 | m->setCheckable(TRUE); | 807 | m->setCheckable(TRUE); |
808 | if (!b) | 808 | if (!b) |
809 | m->setItemChecked(m->idAt(0),TRUE); | 809 | m->setItemChecked(m->idAt(0),TRUE); |
810 | else | 810 | else |
811 | m->setItemChecked(m->idAt(0),FALSE); | 811 | m->setItemChecked(m->idAt(0),FALSE); |
812 | 812 | ||
813 | if(Ir::supported()) | 813 | if(Ir::supported()) |
814 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 814 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
815 | m->setFocus(); | 815 | m->setFocus(); |
816 | m->exec( QCursor::pos() ); | 816 | m->exec( QPoint( 4,QCursor::pos().y()) ); |
817 | sleep(1); | 817 | |
818 | if(m) delete m; | 818 | if(m) delete m; |
819 | } | 819 | } |
820 | 820 | ||
821 | 821 | ||
822 | void AdvancedFm::cancelMenuTimer() { | 822 | void AdvancedFm::cancelMenuTimer() { |
823 | 823 | ||
824 | // qDebug("selectionChanged: cancel menu timer"); | 824 | // qDebug("selectionChanged: cancel menu timer"); |
825 | if( menuTimer.isActive() ) | 825 | if( menuTimer.isActive() ) |
826 | menuTimer.stop(); | 826 | menuTimer.stop(); |
827 | } | 827 | } |
828 | 828 | ||
829 | QString AdvancedFm::checkDiskSpace(const QString &path) { | 829 | QString AdvancedFm::checkDiskSpace(const QString &path) { |
830 | struct statfs fss; | 830 | struct statfs fss; |
831 | if ( !statfs( path.latin1(), &fss ) ) { | 831 | if ( !statfs( path.latin1(), &fss ) ) { |
832 | int blkSize = fss.f_bsize; | 832 | int blkSize = fss.f_bsize; |
833 | // int totalBlks = fs.f_blocks; | 833 | // int totalBlks = fs.f_blocks; |
834 | int availBlks = fss.f_bavail; | 834 | int availBlks = fss.f_bavail; |
835 | 835 | ||
836 | long mult = blkSize / 1024; | 836 | long mult = blkSize / 1024; |
837 | long div = 1024 / blkSize; | 837 | long div = 1024 / blkSize; |
838 | if ( !mult ) mult = 1; | 838 | if ( !mult ) mult = 1; |
839 | if ( !div ) div = 1; | 839 | if ( !div ) div = 1; |
840 | 840 | ||
841 | 841 | ||
842 | return QString::number(availBlks * mult / div); | 842 | return QString::number(availBlks * mult / div); |
843 | } | 843 | } |
844 | return ""; | 844 | return ""; |
845 | } | 845 | } |
846 | 846 | ||
847 | void AdvancedFm::addToDocs() { | 847 | void AdvancedFm::addToDocs() { |
848 | QStringList strListPaths = getPath(); | 848 | QStringList strListPaths = getPath(); |
849 | if( strListPaths.count() > 0) { | 849 | if( strListPaths.count() > 0) { |
850 | QString curFile; | 850 | QString curFile; |
851 | if (TabWidget->getCurrentTab() == 0) { | 851 | if (TabWidget->getCurrentTab() == 0) { |
852 | // if (TabWidget->currentPageIndex() == 0) { | 852 | // if (TabWidget->currentPageIndex() == 0) { |
853 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | 853 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { |
854 | curFile = currentDir.canonicalPath()+"/"+(*it); | 854 | curFile = currentDir.canonicalPath()+"/"+(*it); |
855 | qDebug(curFile); | 855 | qDebug(curFile); |
856 | DocLnk f; | 856 | DocLnk f; |
857 | // curFile.replace(QRegExp("\\..*"),""); | 857 | // curFile.replace(QRegExp("\\..*"),""); |
858 | f.setName((*it)); | 858 | f.setName((*it)); |
859 | f.setFile( curFile); | 859 | f.setFile( curFile); |
860 | f.writeLink(); | 860 | f.writeLink(); |
861 | } | 861 | } |
862 | } else { | 862 | } else { |
863 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | 863 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { |
864 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 864 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
865 | qDebug(curFile); | 865 | qDebug(curFile); |
866 | 866 | ||
867 | DocLnk f; | 867 | DocLnk f; |
868 | // curFile.replace(QRegExp("\\..*"),""); | 868 | // curFile.replace(QRegExp("\\..*"),""); |
869 | f.setName((*it)); | 869 | f.setName((*it)); |
870 | f.setFile( curFile); | 870 | f.setFile( curFile); |
871 | f.writeLink(); | 871 | f.writeLink(); |
872 | } | 872 | } |
873 | } | 873 | } |
874 | } | 874 | } |
875 | } | 875 | } |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index f0a0a35..0966f02 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -26,128 +26,129 @@ | |||
26 | #include <qlineedit.h> | 26 | #include <qlineedit.h> |
27 | #include <qlistview.h> | 27 | #include <qlistview.h> |
28 | 28 | ||
29 | #include <sys/utsname.h> | 29 | #include <sys/utsname.h> |
30 | 30 | ||
31 | 31 | ||
32 | void AdvancedFm::init() { | 32 | void AdvancedFm::init() { |
33 | #if defined(QT_QWS_OPIE) | 33 | #if defined(QT_QWS_OPIE) |
34 | qDebug("<<<<<<<<<<<<<<<<<<<<<<<< OPIE!!!"); | 34 | qDebug("<<<<<<<<<<<<<<<<<<<<<<<< OPIE!!!"); |
35 | #endif | 35 | #endif |
36 | setCaption( tr( "AdvancedFm" ) ); | 36 | setCaption( tr( "AdvancedFm" ) ); |
37 | 37 | ||
38 | QGridLayout *layout = new QGridLayout( this ); | 38 | QGridLayout *layout = new QGridLayout( this ); |
39 | layout->setSpacing( 2); | 39 | layout->setSpacing( 2); |
40 | layout->setMargin( 2); | 40 | layout->setMargin( 2); |
41 | 41 | ||
42 | 42 | ||
43 | QPEMenuBar *menuBar = new QPEMenuBar(this); | 43 | QPEMenuBar *menuBar = new QPEMenuBar(this); |
44 | fileMenu = new QPopupMenu( this ); | 44 | fileMenu = new QPopupMenu( this ); |
45 | viewMenu = new QPopupMenu( this ); | 45 | viewMenu = new QPopupMenu( this ); |
46 | 46 | ||
47 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); | 47 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); |
48 | 48 | ||
49 | menuBar->insertItem( tr( "File" ), fileMenu); | 49 | menuBar->insertItem( tr( "File" ), fileMenu); |
50 | menuBar->insertItem( tr( "View" ), viewMenu); | 50 | menuBar->insertItem( tr( "View" ), viewMenu); |
51 | 51 | ||
52 | qpeDirButton= new QToolButton(this,"QPEButton"); | 52 | qpeDirButton= new QToolButton(this,"QPEButton"); |
53 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); | 53 | qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); |
54 | qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); | 54 | qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); |
55 | layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); | 55 | layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); |
56 | 56 | ||
57 | cfButton = new QToolButton( this,"CFButton"); | 57 | cfButton = new QToolButton( this,"CFButton"); |
58 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); | 58 | cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); |
59 | cfButton ->setFixedSize( QSize( 20, 20 ) ); | 59 | cfButton ->setFixedSize( QSize( 20, 20 ) ); |
60 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); | 60 | layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); |
61 | 61 | ||
62 | sdButton = new QToolButton( this,"SDButton"); | 62 | sdButton = new QToolButton( this,"SDButton"); |
63 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); | 63 | sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); |
64 | sdButton->setFixedSize( QSize( 20, 20 ) ); | 64 | sdButton->setFixedSize( QSize( 20, 20 ) ); |
65 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); | 65 | layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); |
66 | 66 | ||
67 | cdUpButton = new QToolButton( this,"cdUpButton"); | 67 | cdUpButton = new QToolButton( this,"cdUpButton"); |
68 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 68 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
69 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 69 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
70 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); | 70 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); |
71 | 71 | ||
72 | docButton = new QToolButton( this,"docsButton"); | 72 | docButton = new QToolButton( this,"docsButton"); |
73 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); | 73 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); |
74 | docButton->setFixedSize( QSize( 20, 20 ) ); | 74 | docButton->setFixedSize( QSize( 20, 20 ) ); |
75 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); | 75 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); |
76 | 76 | ||
77 | homeButton = new QToolButton( this,"homeButton"); | 77 | homeButton = new QToolButton( this,"homeButton"); |
78 | homeButton->setPixmap(Resource::loadPixmap("home")); | 78 | homeButton->setPixmap(Resource::loadPixmap("home")); |
79 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 79 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
80 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); | 80 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); |
81 | 81 | ||
82 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); | 82 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); |
83 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 83 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
84 | fileMenu->insertSeparator(); | 84 | fileMenu->insertSeparator(); |
85 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 85 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
86 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 86 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
87 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 87 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
88 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 88 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
89 | fileMenu->insertSeparator(); | 89 | fileMenu->insertSeparator(); |
90 | fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | ||
90 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); | 91 | fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); |
91 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | 92 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); |
92 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 93 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
93 | fileMenu->setCheckable(TRUE); | 94 | fileMenu->setCheckable(TRUE); |
94 | 95 | ||
95 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 96 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
96 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 97 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
97 | viewMenu->insertSeparator(); | 98 | viewMenu->insertSeparator(); |
98 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 99 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
99 | viewMenu->setCheckable(TRUE); | 100 | viewMenu->setCheckable(TRUE); |
100 | 101 | ||
101 | 102 | ||
102 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 103 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
103 | currentPathCombo->setEditable(TRUE); | 104 | currentPathCombo->setEditable(TRUE); |
104 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 105 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
105 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 106 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
106 | 107 | ||
107 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 108 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
108 | 109 | ||
109 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 110 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
110 | 111 | ||
111 | 112 | ||
112 | TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab); | 113 | TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab); |
113 | // TabWidget = new QTabWidget( this, "TabWidget" ); | 114 | // TabWidget = new QTabWidget( this, "TabWidget" ); |
114 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); | 115 | layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); |
115 | 116 | ||
116 | tab = new QWidget( TabWidget, "tab" ); | 117 | tab = new QWidget( TabWidget, "tab" ); |
117 | tabLayout = new QGridLayout( tab ); | 118 | tabLayout = new QGridLayout( tab ); |
118 | tabLayout->setSpacing( 2); | 119 | tabLayout->setSpacing( 2); |
119 | tabLayout->setMargin( 2); | 120 | tabLayout->setMargin( 2); |
120 | 121 | ||
121 | Local_View = new QListView( tab, "Local_View" ); | 122 | Local_View = new QListView( tab, "Local_View" ); |
122 | Local_View->addColumn( tr("File"),130); | 123 | Local_View->addColumn( tr("File"),130); |
123 | Local_View->addColumn( tr("Size"),-1); | 124 | Local_View->addColumn( tr("Size"),-1); |
124 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 125 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
125 | Local_View->addColumn( tr("Date"),-1); | 126 | Local_View->addColumn( tr("Date"),-1); |
126 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 127 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
127 | Local_View->setAllColumnsShowFocus(TRUE); | 128 | Local_View->setAllColumnsShowFocus(TRUE); |
128 | Local_View->setMultiSelection( TRUE ); | 129 | Local_View->setMultiSelection( TRUE ); |
129 | Local_View->setSelectionMode(QListView::Extended); | 130 | Local_View->setSelectionMode(QListView::Extended); |
130 | 131 | ||
131 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 132 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
132 | 133 | ||
133 | tabLayout->addWidget( Local_View, 0, 0 ); | 134 | tabLayout->addWidget( Local_View, 0, 0 ); |
134 | 135 | ||
135 | TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1")); | 136 | TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1")); |
136 | // TabWidget->insertTab( tab, tr("1")); | 137 | // TabWidget->insertTab( tab, tr("1")); |
137 | 138 | ||
138 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 139 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
139 | tabLayout_2 = new QGridLayout( tab_2 ); | 140 | tabLayout_2 = new QGridLayout( tab_2 ); |
140 | tabLayout_2->setSpacing( 2); | 141 | tabLayout_2->setSpacing( 2); |
141 | tabLayout_2->setMargin( 2); | 142 | tabLayout_2->setMargin( 2); |
142 | 143 | ||
143 | Remote_View = new QListView( tab_2, "Remote_View" ); | 144 | Remote_View = new QListView( tab_2, "Remote_View" ); |
144 | Remote_View->addColumn( tr("File"),130); | 145 | Remote_View->addColumn( tr("File"),130); |
145 | Remote_View->addColumn( tr("Size"),-1); | 146 | Remote_View->addColumn( tr("Size"),-1); |
146 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 147 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
147 | Remote_View->addColumn( tr("Date"),-1); | 148 | Remote_View->addColumn( tr("Date"),-1); |
148 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 149 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
149 | Remote_View->setAllColumnsShowFocus(TRUE); | 150 | Remote_View->setAllColumnsShowFocus(TRUE); |
150 | Remote_View->setMultiSelection( TRUE ); | 151 | Remote_View->setMultiSelection( TRUE ); |
151 | Remote_View->setSelectionMode(QListView::Extended); | 152 | Remote_View->setSelectionMode(QListView::Extended); |
152 | 153 | ||
153 | 154 | ||