summaryrefslogtreecommitdiff
path: root/noncore/unsupported/filebrowser/filebrowser.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/filebrowser/filebrowser.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index d16e771..114ebfa 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -16,49 +16,49 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "inlineedit.h" 22#include "inlineedit.h"
23#include "filebrowser.h" 23#include "filebrowser.h"
24#include "filePermissions.h" 24#include "filePermissions.h"
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include <qpe/global.h> 26#include <qpe/global.h>
27#include <qpe/mimetype.h> 27#include <qpe/mimetype.h>
28#include <qpe/applnk.h> 28#include <qpe/applnk.h>
29#include <qpe/config.h> 29#include <qpe/config.h>
30 30
31#include <qcopchannel_qws.h> 31#include <qcopchannel_qws.h>
32#include <qpe/qcopenvelope_qws.h> 32#include <qpe/qcopenvelope_qws.h>
33 33
34#include <qmessagebox.h> 34#include <qmessagebox.h>
35#include <qdir.h> 35#include <qdir.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qheader.h> 37#include <qheader.h>
38#include <qpe/qpetoolbar.h> 38#include <qpe/qpetoolbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qpe/qpemenubar.h> 40#include <qmenubar.h>
41#include <qaction.h> 41#include <qaction.h>
42#include <qstringlist.h> 42#include <qstringlist.h>
43#include <qcursor.h> 43#include <qcursor.h>
44#include <qmultilineedit.h> 44#include <qmultilineedit.h>
45#include <qfont.h> 45#include <qfont.h>
46#include <qpainter.h> 46#include <qpainter.h>
47#include <qprogressbar.h> 47#include <qprogressbar.h>
48 48
49#include <unistd.h> 49#include <unistd.h>
50#include <stdlib.h> 50#include <stdlib.h>
51#include <sys/stat.h> 51#include <sys/stat.h>
52#include <qpe/qpeapplication.h> 52#include <qpe/qpeapplication.h>
53 53
54// 54//
55// FileItem 55// FileItem
56// 56//
57FileItem::FileItem( QListView * parent, const QFileInfo & fi ) 57FileItem::FileItem( QListView * parent, const QFileInfo & fi )
58 : QListViewItem( parent ), 58 : QListViewItem( parent ),
59 fileInfo( fi ) 59 fileInfo( fi )
60{ 60{
61 QDate d = fi.lastModified().date(); 61 QDate d = fi.lastModified().date();
62 62
63 setText( 0, fi.fileName() ); 63 setText( 0, fi.fileName() );
64 setText( 1, sizeString( fi.size() ) + " " ); 64 setText( 1, sizeString( fi.size() ) + " " );
@@ -821,49 +821,49 @@ void FileBrowser::init(const QString & dir)
821 setIcon( Resource::loadPixmap( "filebrowser_icon" ) ); 821 setIcon( Resource::loadPixmap( "filebrowser_icon" ) );
822 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 822 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
823 823
824 824
825 Config cfg("Filebrowser"); 825 Config cfg("Filebrowser");
826 cfg.setGroup("View"); 826 cfg.setGroup("View");
827 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE"); 827 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE");
828 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE"); 828 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE");
829 bool showThumbnails=(cfg.readEntry("Thumbnails","FALSE") == "TRUE"); 829 bool showThumbnails=(cfg.readEntry("Thumbnails","FALSE") == "TRUE");
830 830
831 cfg.setGroup("Menu"); 831 cfg.setGroup("Menu");
832 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE"); 832 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE");
833 833
834 834
835 fileView = new FileView( dir, this, 0, showHidden, showSymlinks, showThumbnails ); 835 fileView = new FileView( dir, this, 0, showHidden, showSymlinks, showThumbnails );
836 fileView->setAllColumnsShowFocus( TRUE ); 836 fileView->setAllColumnsShowFocus( TRUE );
837 fileView->setMenuKeepsOpen(menuKeepsOpen); 837 fileView->setMenuKeepsOpen(menuKeepsOpen);
838 838
839 setCentralWidget( fileView ); 839 setCentralWidget( fileView );
840 setToolBarsMovable( FALSE ); 840 setToolBarsMovable( FALSE );
841 841
842 QPEToolBar* toolBar = new QPEToolBar( this ); 842 QPEToolBar* toolBar = new QPEToolBar( this );
843 toolBar->setHorizontalStretchable( TRUE ); 843 toolBar->setHorizontalStretchable( TRUE );
844 844
845 QPEMenuBar* menuBar = new QPEMenuBar( toolBar ); 845 QMenuBar* menuBar = new QMenuBar( toolBar );
846 846
847 dirMenu = new QPopupMenu( this ); 847 dirMenu = new QPopupMenu( this );
848 menuBar->insertItem( tr( "Dir" ), dirMenu ); 848 menuBar->insertItem( tr( "Dir" ), dirMenu );
849 849
850 sortMenu = new QPopupMenu( this ); 850 sortMenu = new QPopupMenu( this );
851 menuBar->insertItem( tr( "Sort" ), sortMenu ); 851 menuBar->insertItem( tr( "Sort" ), sortMenu );
852 sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); 852 sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) );
853 sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); 853 sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) );
854 sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); 854 sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) );
855 sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); 855 sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) );
856 sortMenu->insertSeparator(); 856 sortMenu->insertSeparator();
857 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); 857 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) );
858 858
859 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); 859 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE );
860 sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); 860 sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE );
861 861
862 viewMenu = new QPopupMenu( this); 862 viewMenu = new QPopupMenu( this);
863 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) ); 863 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) );
864 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) ); 864 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) );
865 viewMenu->insertItem( tr( "Thumbnails"), this, SLOT( updateShowThumbnails() ) ); 865 viewMenu->insertItem( tr( "Thumbnails"), this, SLOT( updateShowThumbnails() ) );
866 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden ); 866 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden );
867 viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks ); 867 viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks );
868 viewMenu->setItemChecked( viewMenu->idAt( 2 ), showThumbnails ); 868 viewMenu->setItemChecked( viewMenu->idAt( 2 ), showThumbnails );
869 869