summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 7481360..6748bec 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -1,8 +1,9 @@
1 1
2 2
3#include <qwmatrix.h>
3#include <qcheckbox.h> 4#include <qcheckbox.h>
4#include <qcombobox.h> 5#include <qcombobox.h>
5#include <qheader.h> 6#include <qheader.h>
6#include <qlabel.h> 7#include <qlabel.h>
7#include <qabstractlayout.h> 8#include <qabstractlayout.h>
8#include <qlayout.h> 9#include <qlayout.h>
@@ -131,13 +132,12 @@ OFileSelector::OFileSelector(const QString &mimeFilter, QWidget *parent,
131 m_shNew = newVisible; 132 m_shNew = newVisible;
132 m_shLne = false; 133 m_shLne = false;
133 m_shPerm = false; 134 m_shPerm = false;
134 m_shYesNo = false; 135 m_shYesNo = false;
135 init(); 136 init();
136 137
137
138} 138}
139 139
140OFileSelector::~OFileSelector() 140OFileSelector::~OFileSelector()
141{ 141{
142 142
143 143
@@ -693,14 +693,20 @@ void OFileSelector::addFile(const QString &/*mime*/, QFileInfo *info, bool symli
693 return; 693 return;
694 694
695 QPixmap pix = type.pixmap(); 695 QPixmap pix = type.pixmap();
696 QString dir; 696 QString dir;
697 QString name; 697 QString name;
698 bool locked; 698 bool locked;
699 if( pix.isNull() ) 699 if( pix.isNull() ) {
700 pix = Resource::loadPixmap( "UnknownDocument-14"); 700 //TODO make this scaled pixmap global, so we dont have to keep doing this
701 QWMatrix matrix;
702 QPixmap pixer(Resource::loadPixmap( "UnknownDocument" ));
703 matrix.scale( .4, .4);
704 pix = pixer.xForm(matrix);
705// pix = Resource::loadPixmap( "UnknownDocument-14");
706 }
701 dir = info->dirPath( true ); 707 dir = info->dirPath( true );
702 if( symlink ) 708 if( symlink )
703 name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink(); 709 name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink();
704 else { 710 else {
705 name = info->fileName(); 711 name = info->fileName();
706 if( ( m_mode == OPEN && !info->isReadable() )|| 712 if( ( m_mode == OPEN && !info->isReadable() )||
@@ -919,13 +925,14 @@ void OFileSelector::initializeListView()
919 m_View->setSorting( 1 ); 925 m_View->setSorting( 1 );
920 m_View->setAllColumnsShowFocus( TRUE ); 926 m_View->setAllColumnsShowFocus( TRUE );
921 927
922 connect(m_View, SIGNAL(selectionChanged() ), 928 connect(m_View, SIGNAL(selectionChanged() ),
923 this, SLOT(slotSelectionChanged() ) ); 929 this, SLOT(slotSelectionChanged() ) );
924 930
925 connect(m_View, SIGNAL(currentChanged(QListViewItem *) ), 931 connect(m_View, SIGNAL(clicked(QListViewItem *) ),
932// connect(m_View, SIGNAL(currentChanged(QListViewItem *) ),
926 this, SLOT(slotCurrentChanged(QListViewItem * ) ) ); 933 this, SLOT(slotCurrentChanged(QListViewItem * ) ) );
927 934
928 connect(m_View, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint &, int) ), 935 connect(m_View, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint &, int) ),
929 this, SLOT(slotClicked( int, QListViewItem *, const QPoint &, int) ) ); 936 this, SLOT(slotClicked( int, QListViewItem *, const QPoint &, int) ) );
930 937
931 connect(m_View, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int )), 938 connect(m_View, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int )),