summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofilelistview.cpp
Unidiff
Diffstat (limited to 'libopie/ofileselector/ofilelistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/ofilelistview.cpp41
1 files changed, 13 insertions, 28 deletions
diff --git a/libopie/ofileselector/ofilelistview.cpp b/libopie/ofileselector/ofilelistview.cpp
index bb15764..691bf42 100644
--- a/libopie/ofileselector/ofilelistview.cpp
+++ b/libopie/ofileselector/ofilelistview.cpp
@@ -45,7 +45,6 @@ void OFileListView::clear() {
45} 45}
46void OFileListView::addFile( const QString&, 46void OFileListView::addFile( const QPixmap& pix,
47 const QString&,
47 QFileInfo* info, 48 QFileInfo* info,
48 bool isSymlink ) { 49 bool isSymlink ) {
49 MimeType type( info->absFilePath() );
50 QPixmap pix = type.pixmap();
51 QString dir; 50 QString dir;
@@ -54,5 +53,2 @@ void OFileListView::addFile( const QString&,
54 53
55 if( pix.isNull() )
56 pix = Resource::loadPixmap( "UnknownDocument-14");
57
58 dir = info->dirPath( true ); 54 dir = info->dirPath( true );
@@ -66,3 +62,3 @@ void OFileListView::addFile( const QString&,
66 62
67 locked = true; pix = Resource::loadPixmap("locked"); 63 locked = true;
68 } 64 }
@@ -74,3 +70,4 @@ void OFileListView::addFile( const QString&,
74} 70}
75void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/, 71void OFileListView::addFile( const QPixmap&,
72 const QString& /*mime*/, const QString& /*dir*/,
76 const QString& /*file*/, bool /*isSyml*/ ) { 73 const QString& /*file*/, bool /*isSyml*/ ) {
@@ -78,3 +75,3 @@ void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/,
78} 75}
79void OFileListView::addDir( const QString&, 76void OFileListView::addDir( const QPixmap& pix, const QString&,
80 QFileInfo* info, bool symlink ) { 77 QFileInfo* info, bool symlink ) {
@@ -83,17 +80,2 @@ void OFileListView::addDir( const QString&,
83 QString name; 80 QString name;
84 QPixmap pix;
85
86 if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
87 ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
88
89 locked = true;
90
91 if( symlink )
92 pix = selector()->pixmap("symlinkedlocked");
93 else
94 pix = Resource::loadPixmap("lockedfolder");
95
96 }else { // readable
97 pix = symlink ? selector()->pixmap("dirsymlink") : Resource::loadPixmap("folder") ;
98 }
99 81
@@ -108,3 +90,4 @@ void OFileListView::addDir( const QString&,
108} 90}
109void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/, 91void OFileListView::addDir( const QPixmap&,
92 const QString& /*mime*/, const QString& /*dir*/,
110 const QString& /*file*/, bool ) { 93 const QString& /*file*/, bool ) {
@@ -112,3 +95,4 @@ void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/,
112} 95}
113void OFileListView::addSymlink( const QString& /*mime*/, 96void OFileListView::addSymlink( const QPixmap&,
97 const QString& /*mime*/,
114 QFileInfo* /*info*/, 98 QFileInfo* /*info*/,
@@ -117,4 +101,5 @@ void OFileListView::addSymlink( const QString& /*mime*/,
117} 101}
118void OFileListView::addSymlink( const QString& /*mime*/, const QString& /*path*/, 102void OFileListView::addSymlink(const QPixmap&,
119 const QString& /*file*/, bool /*isSym*/ ) { 103 const QString& /*m*/, const QString& /*path*/,
104 const QString& /*file*/, bool /*isSym*/ ) {
120 105