-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 132 | ||||
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.h | 18 | ||||
-rw-r--r-- | noncore/unsupported/filebrowser/opie-filebrowser.control | 2 | ||||
-rw-r--r-- | pics/symlink.png | bin | 0 -> 103 bytes |
4 files changed, 117 insertions, 35 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp index 6f82f95..34d5177 100644 --- a/noncore/unsupported/filebrowser/filebrowser.cpp +++ b/noncore/unsupported/filebrowser/filebrowser.cpp | |||
@@ -22,12 +22,13 @@ | |||
22 | #include "filebrowser.h" | 22 | #include "filebrowser.h" |
23 | #include "filePermissions.h" | 23 | #include "filePermissions.h" |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | #include <qpe/global.h> | 25 | #include <qpe/global.h> |
26 | #include <qpe/mimetype.h> | 26 | #include <qpe/mimetype.h> |
27 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
28 | #include <qpe/config.h> | ||
28 | 29 | ||
29 | #include <qcopchannel_qws.h> | 30 | #include <qcopchannel_qws.h> |
30 | #include <qpe/qcopenvelope_qws.h> | 31 | #include <qpe/qcopenvelope_qws.h> |
31 | 32 | ||
32 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
33 | #include <qdir.h> | 34 | #include <qdir.h> |
@@ -58,14 +59,16 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi ) | |||
58 | setText( 0, fi.fileName() ); | 59 | setText( 0, fi.fileName() ); |
59 | setText( 1, sizeString( fi.size() ) + " " ); | 60 | setText( 1, sizeString( fi.size() ) + " " ); |
60 | setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) ); | 61 | setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) ); |
61 | 62 | ||
62 | MimeType mt(fi.filePath()); | 63 | MimeType mt(fi.filePath()); |
63 | 64 | ||
64 | if( fi.isDir() ) | 65 | if ( fi.isSymLink() ) |
65 | setText( 3, "directory" ); | 66 | setText( 3, "symlink" ); |
67 | else if( fi.isDir() ) | ||
68 | setText( 3, "directory" ); | ||
66 | else if( isLib() ) | 69 | else if( isLib() ) |
67 | setText( 3, "library" ); | 70 | setText( 3, "library" ); |
68 | else | 71 | else |
69 | setText( 3, mt.description() ); | 72 | setText( 3, mt.description() ); |
70 | 73 | ||
71 | QPixmap pm; | 74 | QPixmap pm; |
@@ -80,12 +83,19 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi ) | |||
80 | else if( isLib() ) | 83 | else if( isLib() ) |
81 | pm = Resource::loadPixmap( "library" ); | 84 | pm = Resource::loadPixmap( "library" ); |
82 | else | 85 | else |
83 | pm = mt.pixmap(); | 86 | pm = mt.pixmap(); |
84 | if ( pm.isNull() ) | 87 | if ( pm.isNull() ) |
85 | pm = Resource::loadPixmap("UnknownDocument-14"); | 88 | pm = Resource::loadPixmap("UnknownDocument-14"); |
89 | if( fi.isSymLink() ){ | ||
90 | // overlay link image | ||
91 | QPixmap lnk = Resource::loadPixmap( "symlink" ); | ||
92 | QPainter painter( &pm ); | ||
93 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | ||
94 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | ||
95 | } | ||
86 | setPixmap(0,pm); | 96 | setPixmap(0,pm); |
87 | } | 97 | } |
88 | 98 | ||
89 | QString FileItem::sizeString( unsigned int s ) | 99 | QString FileItem::sizeString( unsigned int s ) |
90 | { | 100 | { |
91 | double size = s; | 101 | double size = s; |
@@ -162,27 +172,29 @@ bool FileItem::rename( const QString & name ) | |||
162 | } | 172 | } |
163 | 173 | ||
164 | // | 174 | // |
165 | // FileView | 175 | // FileView |
166 | // | 176 | // |
167 | FileView::FileView( const QString & dir, QWidget * parent, | 177 | FileView::FileView( const QString & dir, QWidget * parent, |
168 | const char * name ) | 178 | const char * name, |
179 | bool hidden, bool symlinks ) | ||
169 | : QListView( parent, name ), | 180 | : QListView( parent, name ), |
170 | menuTimer( this ), | 181 | menuTimer( this ), |
171 | le( NULL ), | 182 | le( NULL ), |
172 | itemToRename( NULL ) | 183 | itemToRename( NULL ), |
184 | showHidden( hidden ), | ||
185 | showSymlinks( symlinks), | ||
186 | menuKeepsOpen( FALSE ) | ||
173 | { | 187 | { |
174 | addColumn( "Name" ); | 188 | addColumn( "Name" ); |
175 | addColumn( "Date" ); | 189 | addColumn( "Date" ); |
176 | addColumn( "Size" ); | 190 | addColumn( "Size" ); |
177 | addColumn( "Type" ); | 191 | addColumn( "Type" ); |
178 | 192 | ||
179 | showingHidden=FALSE; | ||
180 | |||
181 | setMultiSelection( TRUE ); | 193 | setMultiSelection( TRUE ); |
182 | header()->hide(); | 194 | //header()->hide(); |
183 | 195 | ||
184 | setColumnWidthMode( 0, Manual ); | 196 | setColumnWidthMode( 0, Manual ); |
185 | setColumnWidthMode( 3, Manual ); | 197 | setColumnWidthMode( 3, Manual ); |
186 | 198 | ||
187 | // right align yize column | 199 | // right align yize column |
188 | setColumnAlignment( 1, AlignRight ); | 200 | setColumnAlignment( 1, AlignRight ); |
@@ -199,13 +211,13 @@ FileView::FileView( const QString & dir, QWidget * parent, | |||
199 | 211 | ||
200 | void FileView::resizeEvent( QResizeEvent *e ) | 212 | void FileView::resizeEvent( QResizeEvent *e ) |
201 | { | 213 | { |
202 | setColumnWidth( 0, width() - 2 * lineWidth() - 20 - columnWidth( 1 ) - columnWidth( 2 ) ); | 214 | setColumnWidth( 0, width() - 2 * lineWidth() - 20 - columnWidth( 1 ) - columnWidth( 2 ) ); |
203 | 215 | ||
204 | // hide type column, we use it for "sort by type" only | 216 | // hide type column, we use it for "sort by type" only |
205 | setColumnWidth( 3, 0 ); | 217 | //setColumnWidth( 3, 0 ); |
206 | QListView::resizeEvent( e ); | 218 | QListView::resizeEvent( e ); |
207 | } | 219 | } |
208 | 220 | ||
209 | void FileView::updateDir() | 221 | void FileView::updateDir() |
210 | { | 222 | { |
211 | generateDir( currentDir ); | 223 | generateDir( currentDir ); |
@@ -221,19 +233,22 @@ void FileView::setDir( const QString & dir ) | |||
221 | dirHistory += currentDir; | 233 | dirHistory += currentDir; |
222 | generateDir( dir ); | 234 | generateDir( dir ); |
223 | } | 235 | } |
224 | 236 | ||
225 | void FileView::generateDir( const QString & dir ) | 237 | void FileView::generateDir( const QString & dir ) |
226 | { | 238 | { |
227 | QDir d( dir ); | 239 | if(menuKeepsOpen){ |
240 | cancelMenuTimer(); | ||
241 | } | ||
242 | QDir d( dir ); | ||
228 | 243 | ||
229 | if( d.exists() && !d.isReadable() ) return; | 244 | if( d.exists() && !d.isReadable() ) return; |
230 | 245 | ||
231 | currentDir = d.canonicalPath(); | 246 | currentDir = d.canonicalPath(); |
232 | 247 | ||
233 | if( !showingHidden) | 248 | if( !showHidden) |
234 | d.setFilter( QDir::Dirs | QDir::Files ); | 249 | d.setFilter( QDir::Dirs | QDir::Files ); |
235 | else | 250 | else |
236 | d.setFilter( QDir::Dirs | QDir::Files |QDir::Hidden | QDir::All); | 251 | d.setFilter( QDir::Dirs | QDir::Files |QDir::Hidden | QDir::All); |
237 | 252 | ||
238 | d.setSorting( QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | QDir::Reversed ); | 253 | d.setSorting( QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | QDir::Reversed ); |
239 | 254 | ||
@@ -245,13 +260,17 @@ void FileView::generateDir( const QString & dir ) | |||
245 | clear(); | 260 | clear(); |
246 | while( (fi = it.current()) ){ | 261 | while( (fi = it.current()) ){ |
247 | if( (fi->fileName() == ".") || (fi->fileName() == "..") ){ | 262 | if( (fi->fileName() == ".") || (fi->fileName() == "..") ){ |
248 | ++it; | 263 | ++it; |
249 | continue; | 264 | continue; |
250 | } | 265 | } |
251 | (void) new FileItem( (QListView *) this, *fi ); | 266 | if(!showSymlinks && fi->isSymLink()){ |
267 | ++it; | ||
268 | continue; | ||
269 | } | ||
270 | (void) new FileItem( (QListView *) this, *fi ); | ||
252 | ++it; | 271 | ++it; |
253 | } | 272 | } |
254 | emit dirChanged(); | 273 | emit dirChanged(); |
255 | } | 274 | } |
256 | 275 | ||
257 | void FileView::rename() | 276 | void FileView::rename() |
@@ -567,13 +586,17 @@ void FileView::itemClicked( QListViewItem * i) | |||
567 | setDir( t->getFilePath() ); | 586 | setDir( t->getFilePath() ); |
568 | } | 587 | } |
569 | } | 588 | } |
570 | 589 | ||
571 | void FileView::itemDblClicked( QListViewItem * i) | 590 | void FileView::itemDblClicked( QListViewItem * i) |
572 | { | 591 | { |
573 | FileItem * t = (FileItem *) i; | 592 | if(menuKeepsOpen){ |
593 | cancelMenuTimer(); | ||
594 | } | ||
595 | |||
596 | FileItem * t = (FileItem *) i; | ||
574 | 597 | ||
575 | if(t == NULL) return; | 598 | if(t == NULL) return; |
576 | if(t->launch() == -1){ | 599 | if(t->launch() == -1){ |
577 | QMessageBox::warning( this, tr( "Launch Application" ), | 600 | QMessageBox::warning( this, tr( "Launch Application" ), |
578 | tr( "Launch failed!" ), tr( "Ok" ) ); | 601 | tr( "Launch failed!" ), tr( "Ok" ) ); |
579 | } | 602 | } |
@@ -599,13 +622,16 @@ void FileView::contentsMousePressEvent( QMouseEvent * e ) | |||
599 | menuTimer.start( 750, TRUE ); | 622 | menuTimer.start( 750, TRUE ); |
600 | } | 623 | } |
601 | 624 | ||
602 | void FileView::contentsMouseReleaseEvent( QMouseEvent * e ) | 625 | void FileView::contentsMouseReleaseEvent( QMouseEvent * e ) |
603 | { | 626 | { |
604 | QListView::contentsMouseReleaseEvent( e ); | 627 | QListView::contentsMouseReleaseEvent( e ); |
605 | menuTimer.stop(); | 628 | if(!menuKeepsOpen){ |
629 | menuTimer.stop(); | ||
630 | } | ||
631 | |||
606 | } | 632 | } |
607 | 633 | ||
608 | void FileView::cancelMenuTimer() | 634 | void FileView::cancelMenuTimer() |
609 | { | 635 | { |
610 | if( menuTimer.isActive() ) | 636 | if( menuTimer.isActive() ) |
611 | menuTimer.stop(); | 637 | menuTimer.stop(); |
@@ -673,12 +699,27 @@ void FileView::showFileMenu() | |||
673 | } | 699 | } |
674 | 700 | ||
675 | // | 701 | // |
676 | // FileBrowser | 702 | // FileBrowser |
677 | // | 703 | // |
678 | 704 | ||
705 | void FileView::setShowHidden(bool hidden) | ||
706 | { | ||
707 | showHidden=hidden; | ||
708 | } | ||
709 | |||
710 | void FileView::setShowSymlinks(bool symlinks) | ||
711 | { | ||
712 | showSymlinks=symlinks; | ||
713 | } | ||
714 | |||
715 | void FileView::setMenuKeepsOpen(bool keepOpen) | ||
716 | { | ||
717 | menuKeepsOpen=keepOpen; | ||
718 | } | ||
719 | |||
679 | FileBrowser::FileBrowser( QWidget * parent, | 720 | FileBrowser::FileBrowser( QWidget * parent, |
680 | const char * name, WFlags f ) : | 721 | const char * name, WFlags f ) : |
681 | QMainWindow( parent, name, f ) | 722 | QMainWindow( parent, name, f ) |
682 | { | 723 | { |
683 | init( QDir::current().canonicalPath() ); | 724 | init( QDir::current().canonicalPath() ); |
684 | } | 725 | } |
@@ -692,15 +733,25 @@ FileBrowser::FileBrowser( const QString & dir, QWidget * parent, | |||
692 | 733 | ||
693 | void FileBrowser::init(const QString & dir) | 734 | void FileBrowser::init(const QString & dir) |
694 | { | 735 | { |
695 | setCaption( tr("File Manager") ); | 736 | setCaption( tr("File Manager") ); |
696 | setIcon( Resource::loadPixmap( "filebrowser_icon" ) ); | 737 | setIcon( Resource::loadPixmap( "filebrowser_icon" ) ); |
697 | 738 | ||
698 | fileView = new FileView( dir, this ); | 739 | Config cfg("Filebrowser"); |
699 | fileView->setAllColumnsShowFocus( TRUE ); | 740 | cfg.setGroup("View"); |
741 | bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE"); | ||
742 | bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE"); | ||
743 | |||
744 | cfg.setGroup("Menu"); | ||
745 | bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE"); | ||
746 | |||
700 | 747 | ||
748 | fileView = new FileView( dir, this, 0, showHidden, showSymlinks ); | ||
749 | fileView->setAllColumnsShowFocus( TRUE ); | ||
750 | fileView->setMenuKeepsOpen(menuKeepsOpen); | ||
751 | |||
701 | setCentralWidget( fileView ); | 752 | setCentralWidget( fileView ); |
702 | setToolBarsMovable( FALSE ); | 753 | setToolBarsMovable( FALSE ); |
703 | 754 | ||
704 | QPEToolBar* toolBar = new QPEToolBar( this ); | 755 | QPEToolBar* toolBar = new QPEToolBar( this ); |
705 | toolBar->setHorizontalStretchable( TRUE ); | 756 | toolBar->setHorizontalStretchable( TRUE ); |
706 | 757 | ||
@@ -714,20 +765,24 @@ void FileBrowser::init(const QString & dir) | |||
714 | sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); | 765 | sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); |
715 | sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); | 766 | sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); |
716 | sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); | 767 | sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); |
717 | sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); | 768 | sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); |
718 | sortMenu->insertSeparator(); | 769 | sortMenu->insertSeparator(); |
719 | sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); | 770 | sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); |
720 | sortMenu->insertSeparator(); | ||
721 | sortMenu->insertItem( tr( "Show Hidden "), this, SLOT( showHidden() ) ); | ||
722 | |||
723 | // fileView->showingHidden=FALSE; | ||
724 | 771 | ||
725 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); | 772 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); |
726 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); | 773 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); |
727 | 774 | ||
775 | viewMenu = new QPopupMenu( this); | ||
776 | viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) ); | ||
777 | viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) ); | ||
778 | viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden ); | ||
779 | viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks ); | ||
780 | |||
781 | menuBar->insertItem( tr("View"), viewMenu ); | ||
782 | |||
728 | toolBar = new QPEToolBar( this ); | 783 | toolBar = new QPEToolBar( this ); |
729 | 784 | ||
730 | lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), | 785 | lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), |
731 | QString::null, 0, this, 0 ); | 786 | QString::null, 0, this, 0 ); |
732 | connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); | 787 | connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); |
733 | lastAction->addTo( toolBar ); | 788 | lastAction->addTo( toolBar ); |
@@ -867,23 +922,12 @@ void FileBrowser::updateSorting() | |||
867 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 2 ) ) ) | 922 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 2 ) ) ) |
868 | sortDate(); | 923 | sortDate(); |
869 | else | 924 | else |
870 | sortType(); | 925 | sortType(); |
871 | } | 926 | } |
872 | 927 | ||
873 | void FileBrowser::showHidden() { | ||
874 | if(!fileView->showingHidden) { | ||
875 | fileView->showingHidden=TRUE; | ||
876 | sortMenu->setItemChecked( sortMenu->idAt( 7),TRUE); | ||
877 | } else { | ||
878 | fileView->showingHidden=FALSE; | ||
879 | sortMenu->setItemChecked( sortMenu->idAt( 7),FALSE); | ||
880 | } | ||
881 | fileView->updateDir(); | ||
882 | } | ||
883 | |||
884 | void FileView::chPerm() { | 928 | void FileView::chPerm() { |
885 | FileItem * i; | 929 | FileItem * i; |
886 | QStringList fl; | 930 | QStringList fl; |
887 | QString cmd; | 931 | QString cmd; |
888 | int err; | 932 | int err; |
889 | 933 | ||
@@ -906,6 +950,34 @@ void FileView::chPerm() { | |||
906 | delete filePerm; | 950 | delete filePerm; |
907 | break; | 951 | break; |
908 | } | 952 | } |
909 | updateDir(); | 953 | updateDir(); |
910 | } | 954 | } |
911 | } | 955 | } |
956 | |||
957 | void FileBrowser::updateShowHidden() | ||
958 | { | ||
959 | bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) ); | ||
960 | valShowHidden=!valShowHidden; | ||
961 | viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden ); | ||
962 | fileView->setShowHidden(valShowHidden); | ||
963 | |||
964 | Config cfg("Filebrowser"); | ||
965 | cfg.setGroup("View"); | ||
966 | cfg.writeEntry("Hidden",valShowHidden?"TRUE":"FALSE"); | ||
967 | |||
968 | fileView->updateDir(); | ||
969 | } | ||
970 | |||
971 | void FileBrowser::updateShowSymlinks() | ||
972 | { | ||
973 | bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) ); | ||
974 | valShowSymlinks=!valShowSymlinks; | ||
975 | viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks ); | ||
976 | fileView->setShowSymlinks(valShowSymlinks); | ||
977 | |||
978 | Config cfg("Filebrowser"); | ||
979 | cfg.setGroup("View"); | ||
980 | cfg.writeEntry("Symlinks",valShowSymlinks?"TRUE":"FALSE"); | ||
981 | |||
982 | fileView->updateDir(); | ||
983 | } | ||
diff --git a/noncore/unsupported/filebrowser/filebrowser.h b/noncore/unsupported/filebrowser/filebrowser.h index 54856a0..983e58e 100644 --- a/noncore/unsupported/filebrowser/filebrowser.h +++ b/noncore/unsupported/filebrowser/filebrowser.h | |||
@@ -51,18 +51,25 @@ private: | |||
51 | class FileView : public QListView | 51 | class FileView : public QListView |
52 | { | 52 | { |
53 | Q_OBJECT | 53 | Q_OBJECT |
54 | 54 | ||
55 | public: | 55 | public: |
56 | FileView( const QString & dir, QWidget * parent = 0, | 56 | FileView( const QString & dir, QWidget * parent = 0, |
57 | const char * name = 0 ); | 57 | const char * name = 0, |
58 | bool hidden = FALSE, | ||
59 | bool symlinks = FALSE ); | ||
60 | |||
58 | void setDir( const QString & dir ); | 61 | void setDir( const QString & dir ); |
59 | QString cd(){ return currentDir; } | 62 | QString cd(){ return currentDir; } |
60 | QStringList history() const { return dirHistory; } | 63 | QStringList history() const { return dirHistory; } |
61 | bool showingHidden; | 64 | bool showingHidden; |
62 | 65 | ||
66 | void setShowHidden(bool hidden); | ||
67 | void setShowSymlinks(bool symlinks); | ||
68 | void setMenuKeepsOpen(bool keepOpen); | ||
69 | |||
63 | public slots: | 70 | public slots: |
64 | void updateDir(); | 71 | void updateDir(); |
65 | void parentDir(); | 72 | void parentDir(); |
66 | void lastDir(); | 73 | void lastDir(); |
67 | 74 | ||
68 | void rename(); | 75 | void rename(); |
@@ -94,12 +101,15 @@ private: | |||
94 | QString currentDir; | 101 | QString currentDir; |
95 | QStringList dirHistory, flist; | 102 | QStringList dirHistory, flist; |
96 | QTimer menuTimer; | 103 | QTimer menuTimer; |
97 | InlineEdit * le; | 104 | InlineEdit * le; |
98 | FileItem * itemToRename; | 105 | FileItem * itemToRename; |
99 | bool selected; | 106 | bool selected; |
107 | bool showHidden; | ||
108 | bool showSymlinks; | ||
109 | bool menuKeepsOpen; | ||
100 | 110 | ||
101 | bool copyFile( const QString & dest, const QString & src ); | 111 | bool copyFile( const QString & dest, const QString & src ); |
102 | 112 | ||
103 | signals: | 113 | signals: |
104 | void dirChanged(); | 114 | void dirChanged(); |
105 | void textViewActivated( QWidget * w ); | 115 | void textViewActivated( QWidget * w ); |
@@ -117,13 +127,13 @@ public: | |||
117 | const char * name = 0, WFlags f = 0 ); | 127 | const char * name = 0, WFlags f = 0 ); |
118 | public slots: | 128 | public slots: |
119 | void changeCaption(const QString &); | 129 | void changeCaption(const QString &); |
120 | private: | 130 | private: |
121 | void init(const QString & dir); | 131 | void init(const QString & dir); |
122 | QString fileToCopy; | 132 | QString fileToCopy; |
123 | QPopupMenu * dirMenu, * sortMenu; | 133 | QPopupMenu * dirMenu, * sortMenu, *viewMenu; |
124 | FileView * fileView; | 134 | FileView * fileView; |
125 | QAction * pasteAction; | 135 | QAction * pasteAction; |
126 | QAction *lastAction; | 136 | QAction *lastAction; |
127 | QAction *upAction; | 137 | QAction *upAction; |
128 | 138 | ||
129 | bool copyFile( const QString & dest, const QString & src ); | 139 | bool copyFile( const QString & dest, const QString & src ); |
@@ -133,13 +143,13 @@ private slots: | |||
133 | 143 | ||
134 | void sortName(); | 144 | void sortName(); |
135 | void sortDate(); | 145 | void sortDate(); |
136 | void sortSize(); | 146 | void sortSize(); |
137 | void sortType(); | 147 | void sortType(); |
138 | void updateSorting(); | 148 | void updateSorting(); |
139 | 149 | void updateShowHidden(); | |
150 | void updateShowSymlinks(); | ||
140 | void updateDirMenu(); | 151 | void updateDirMenu(); |
141 | void dirSelected( int id ); | 152 | void dirSelected( int id ); |
142 | void showHidden(); | ||
143 | }; | 153 | }; |
144 | 154 | ||
145 | #endif | 155 | #endif |
diff --git a/noncore/unsupported/filebrowser/opie-filebrowser.control b/noncore/unsupported/filebrowser/opie-filebrowser.control index c15ae17..0b8528a 100644 --- a/noncore/unsupported/filebrowser/opie-filebrowser.control +++ b/noncore/unsupported/filebrowser/opie-filebrowser.control | |||
@@ -1,7 +1,7 @@ | |||
1 | Files: bin/filebrowser apps/Applications/filebrowser.desktop | 1 | Files: bin/filebrowser apps/Applications/filebrowser.desktop pics/symlink.png |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Warwick Allison <warwick@trolltech.com> | 4 | Maintainer: Warwick Allison <warwick@trolltech.com> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
diff --git a/pics/symlink.png b/pics/symlink.png new file mode 100644 index 0000000..a0b267a --- a/dev/null +++ b/pics/symlink.png | |||
Binary files differ | |||