summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofilelistview.cpp
Unidiff
Diffstat (limited to 'libopie/ofileselector/ofilelistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/ofilelistview.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/libopie/ofileselector/ofilelistview.cpp b/libopie/ofileselector/ofilelistview.cpp
index 9cfdc48..fe8acf0 100644
--- a/libopie/ofileselector/ofilelistview.cpp
+++ b/libopie/ofileselector/ofilelistview.cpp
@@ -48,3 +48,3 @@ void OFileListView::addFile( const QPixmap& pix,
48 QFileInfo* info, 48 QFileInfo* info,
49 const QString& /*extra*/, 49 const QString& extra,
50 bool isSymlink ) { 50 bool isSymlink ) {
@@ -69,3 +69,3 @@ void OFileListView::addFile( const QPixmap& pix,
69 QString::number( info->size() ), 69 QString::number( info->size() ),
70 dir, locked ); 70 dir, locked, extra );
71} 71}
@@ -80,3 +80,3 @@ void OFileListView::addDir( const QPixmap& pix, const QString&,
80 QFileInfo* info, 80 QFileInfo* info,
81 const QString& /*extra */, 81 const QString& extra ,
82 bool symlink ) { 82 bool symlink ) {
@@ -91,3 +91,3 @@ void OFileListView::addDir( const QPixmap& pix, const QString&,
91 QString::number( info->size() ), 91 QString::number( info->size() ),
92 info->dirPath( true ), locked, 92 info->dirPath( true ), locked, extra,
93 true ); 93 true );
@@ -129,2 +129,9 @@ QString OFileListView::selectedName()const{
129} 129}
130QString OFileListView::selectedExtra()const{
131 QListViewItem* item = currentItem();
132 if (!item) return QString::null;
133 OFileSelectorItem* fit = (OFileSelectorItem*)fit;
134
135 return fit->extra();
136}
130QStringList OFileListView::selectedNames()const { 137QStringList OFileListView::selectedNames()const {
@@ -139,3 +146,3 @@ QStringList OFileListView::selectedPaths()const {
139 QStringList list; 146 QStringList list;
140b list << selectedPath(); 147 list << selectedPath();
141 return list; 148 return list;
@@ -163,6 +170,3 @@ void OFileListView::slotCurrentChanged( QListViewItem* item) {
163 QStringList str = QStringList::split("->", sel->text(1) ); 170 QStringList str = QStringList::split("->", sel->text(1) );
164 QString path =sel->directory() + "/" + str[0].stripWhiteSpace(); 171 fileSelected(sel->directory(), str[0].stripWhiteSpace(),sel->extra() );
165 DocLnk lnk( path );
166 fileSelected(lnk );
167 fileSelected( path );
168 } 172 }
@@ -183,12 +187,6 @@ void OFileListView::slotClicked( int button, QListViewItem* item,
183 if( sel->isDir() ){ 187 if( sel->isDir() ){
184 changedDir( sel->directory() + "/" + str[0].stripWhiteSpace() ); 188 changedDir( sel->directory(), str[0].stripWhiteSpace(),sel->extra() );
185 }else{ 189 }else{
186 updateLine( str[0].stripWhiteSpace() ); 190 updateLine( str[0].stripWhiteSpace() );
187 QString path = sel->directory(); 191 fileSelected( sel->directory(),str[0].stripWhiteSpace(), sel->extra() );
188 path += "/";
189 path += str[0].stripWhiteSpace();
190
191 DocLnk lnk( path );
192 fileSelected( path );
193 fileSelected( lnk );
194 } 192 }