-rw-r--r-- | libopie/ofileselector.cc | 15 |
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 @@ +#include <qwmatrix.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qheader.h> #include <qlabel.h> #include <qabstractlayout.h> #include <qlayout.h> @@ -131,13 +132,12 @@ OFileSelector::OFileSelector(const QString &mimeFilter, QWidget *parent, m_shNew = newVisible; m_shLne = false; m_shPerm = false; m_shYesNo = false; init(); - } OFileSelector::~OFileSelector() { @@ -693,14 +693,20 @@ void OFileSelector::addFile(const QString &/*mime*/, QFileInfo *info, bool symli return; QPixmap pix = type.pixmap(); QString dir; QString name; bool locked; - if( pix.isNull() ) - pix = Resource::loadPixmap( "UnknownDocument-14"); + if( pix.isNull() ) { + //TODO make this scaled pixmap global, so we dont have to keep doing this + QWMatrix matrix; + QPixmap pixer(Resource::loadPixmap( "UnknownDocument" )); + matrix.scale( .4, .4); + pix = pixer.xForm(matrix); +// pix = Resource::loadPixmap( "UnknownDocument-14"); + } dir = info->dirPath( true ); if( symlink ) name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink(); else { name = info->fileName(); if( ( m_mode == OPEN && !info->isReadable() )|| @@ -919,13 +925,14 @@ void OFileSelector::initializeListView() m_View->setSorting( 1 ); m_View->setAllColumnsShowFocus( TRUE ); connect(m_View, SIGNAL(selectionChanged() ), this, SLOT(slotSelectionChanged() ) ); - connect(m_View, SIGNAL(currentChanged(QListViewItem *) ), + connect(m_View, SIGNAL(clicked(QListViewItem *) ), +// connect(m_View, SIGNAL(currentChanged(QListViewItem *) ), this, SLOT(slotCurrentChanged(QListViewItem * ) ) ); connect(m_View, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint &, int) ), this, SLOT(slotClicked( int, QListViewItem *, const QPoint &, int) ) ); connect(m_View, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int )), |