summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/ofileselector.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp
index c52aa62..458d432 100644
--- a/libopie/ofileselector/ofileselector.cpp
+++ b/libopie/ofileselector/ofileselector.cpp
@@ -919,104 +919,106 @@ void OFileSelector::reparse()
m_mimetypes.clear();
// ok we can change mimetype so we need to be able to give a selection
if( m_shChooser ) {
currentMimeType = m_mimeCheck->currentText();
m_mimeCheck->clear();
// let's find possible mimetypes
m_mimetypes = currentLister()->mimeTypes( m_currentDir );
// add them to the chooser
updateMimeCheck();
m_mimeCheck->setCurrentItem( indexByString( m_mimeCheck, currentMimeType ) );
currentMimeType = m_mimeCheck->currentText();
}
}else { // no autoMime
// let the mimetype be set from out side the m_mimeCheck FEATURE
if( m_shChooser )
currentMimeType = m_mimeCheck->currentText();
}
// now we got our mimetypes we can add the files
currentLister()->reparse( m_currentDir );
/* we're done with adding let's sort */
currentView()->sort();
if( m_shTool ){
m_location->insertItem( m_currentDir );
}
// reenable painting and updates
}
OFileView* OFileSelector::currentView() {
return m_fileView;
}
OFileView* OFileSelector::currentView() const{
return m_fileView;
}
int OFileSelector::filter() {
int filter;
if ( m_selector == ExtendedAll )
filter = QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All;
else
filter = QDir::Files | QDir::Dirs | QDir::All ;
return filter;
}
int OFileSelector::sorting() {
int sort;
if (m_case )
sort = ( QDir::IgnoreCase | QDir::Name | QDir::DirsFirst | QDir::Reversed );
else
sort = ( QDir::Name | QDir::DirsFirst | QDir::Reversed );
return sort;
}
void OFileSelector::internFileSelected( const QString& s) {
emit fileSelected( s );
}
void OFileSelector::internFileSelected( const DocLnk& d ) {
emit fileSelected( d );
}
void OFileSelector::internContextMenu() {
emit contextMenu();
}
void OFileSelector::internChangedDir( const QString& s) {
emit dirSelected( s );
cd(s );
}
void OFileSelector::internChangedDir( const QDir& s) {
emit dirSelected( s );
}
QPixmap OFileSelector::pixmap( const QString& s ) {
return (*m_pixmaps)[s];
}
OLister* OFileSelector::currentLister()const {
return m_lister;
}
void OFileSelector::initializeOldSelector() {
qWarning("initializeOldSelector");
delete m_select;
// we need to initialize but keep the selected mimetype
/* we default not to show close and new buttons */
QString mime = currentMimeType();
qWarning("MimeType " + mime );
m_select = new FileSelector( mime ,
m_mainView, "fileselector",
FALSE, FALSE);
+ m_select->setCategorySelectVisible( FALSE );
+ m_select->setTypeComboVisible( FALSE );
connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
connect(m_select, SIGNAL(closeMe() ),
this, SIGNAL(closeMe() ) );
//connect to close me and other signals as well
m_mainView->setWidget( m_select );
}