summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofileselector.cpp
Side-by-side diff
Diffstat (limited to 'libopie/ofileselector/ofileselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/ofileselector.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp
index 255e79e..9ce07dd 100644
--- a/libopie/ofileselector/ofileselector.cpp
+++ b/libopie/ofileselector/ofileselector.cpp
@@ -259,26 +259,20 @@ void OFileSelector::setPopupFactory(OPopupMenuFactory */*popup*/ )
{
/* m_custom = popup;
m_showPopup = true;
*/
}
-//void OFileSelector::updateL
-
QString OFileSelector::selectedName() const
{
QString name;
if( m_selector == Normal ){
DocLnk lnk = m_select->selectedDocument();
name = lnk.file();
}else {
- if ( m_shLne ) {
- name = m_currentDir + "/" +m_edit->text();
- }else{
- name = m_currentDir + "/" + currentView()->selectedName();
- }
+ name = currentLister()->selectedName();
}
return name;
}
QStringList OFileSelector::selectedNames()const
{
QStringList list;
@@ -419,13 +413,12 @@ void OFileSelector::slotLocationActivated(const QString &file)
QString name = file.left( file.find("<-", 0, TRUE ) );
QFileInfo info( name );
if ( info.isFile() )
cd(info.dirPath( TRUE ) ); //absolute
else
cd(name );
- reparse();
}
void OFileSelector::slotInsertLocationPath(const QString &currentPath, int count)
{
QStringList pathList;
bool underDog = FALSE;
for(int i=0;i<count;i++) {
@@ -451,14 +444,12 @@ void OFileSelector::locationComboChanged()
QFileInfo info( m_location->lineEdit()->text() );
qWarning("info %s %s", info.dirPath(true).latin1(), m_location->lineEdit()->text().latin1() );
if (info.isFile() )
cd(info.dirPath(TRUE) ); //absolute path
else
cd( m_location->lineEdit()->text() );
-
- reparse();
}
void OFileSelector::init()
{
initFactory();
m_lay = new QVBoxLayout( this );
m_lay->setSpacing(0 );
@@ -851,22 +842,22 @@ void OFileSelector::slotDelete()
m_View->takeItem( sel );
delete sel;
*/
}
void OFileSelector::cdUP()
{
+ // FIXME won't work on non filesystem based systems
+ // better call the Olister
QDir dir( m_currentDir );
dir.cdUp();
if(dir.exists() ){
m_currentDir = dir.absPath();
reparse();
int count = m_location->count();
slotInsertLocationPath( m_currentDir, count);
m_location->setCurrentItem( indexByString( m_location, m_currentDir));
- //this wont work in all instances
- // FIXME
}
}
void OFileSelector::slotHome()
{
cd(QDir::homeDirPath() );
}