summaryrefslogtreecommitdiff
path: root/libopie/ofileselector.cc
Side-by-side diff
Diffstat (limited to 'libopie/ofileselector.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 14f035e..fbe69ed 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -738,24 +738,27 @@ void OFileSelector::initializeListView()
m_boxToolbar->addWidget(m_homeButton );
m_boxToolbar->addWidget(m_docButton );
m_pseudoLayout->addLayout(m_boxToolbar );
// lets fill the combobox
StorageInfo storage;
const QList<FileSystem> &fs = storage.fileSystems();
QListIterator<FileSystem> it ( fs );
for( ; it.current(); ++it ){
const QString disk = (*it)->name();
const QString path = (*it)->path();
m_location->insertItem(path+ "<-"+disk );
}
+ int count = m_location->count();
+ m_location->insertItem(m_currentDir );
+ m_location->setCurrentItem( count );
};
m_View = new QListView(m_pseudo, "Extended view" );
m_stack->addWidget( m_pseudo, EXTENDED );
m_stack->raiseWidget( EXTENDED );
m_pseudoLayout->addWidget(m_View );
QPEApplication::setStylusOperation( m_View->viewport(),QPEApplication::RightOnHold);
// set up the stuff
// Pixmap Name Date Size mime
//(m_View->header() )->hide();
//m_View->setRootIsDecorated(false);
m_View->addColumn(" ");
m_View->addColumn(tr("Name") );
@@ -993,24 +996,29 @@ void OFileSelector::slotContextMenu(QListViewItem *item)
this, SLOT(slotDelete() ) );
menu.exec(QCursor::pos() );
}
}
bool OFileSelector::cd(const QString &str )
{
qWarning(" dir %s", str.latin1() );
QDir dir( str);
if(dir.exists() ){
m_currentDir = str;
reparse();
+ if(m_shTool ){
+ int count = m_location->count();
+ m_location->insertItem(str );
+ m_location->setCurrentItem( count );
+ }
return true;
}
return false;
}
void OFileSelector::slotChangedDir()
{
OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem();
if(sel->isDir() ){
QStringList str = QStringList::split("->", sel->text(1) );
cd( sel->directory() + "/" + str[0] );
}
@@ -1044,16 +1052,29 @@ void OFileSelector::slotDelete()
}
m_View->takeItem( sel );
delete sel;
}
void OFileSelector::cdUP()
{
QDir dir( m_currentDir );
dir.cdUp();
if(dir.exists() ){
m_currentDir = dir.absPath();
reparse();
+ int count = m_location->count();
+ m_location->insertItem(m_currentDir );
+ m_location->setCurrentItem( count );
}
}
+void OFileSelector::slotHome()
+{
+ cd(QDir::homeDirPath() );
+}
+void OFileSelector::slotDoc()
+{
+ cd(QDir::homeDirPath() + "/Documents" );
+}
+void OFileSelector::slotNavigate()
+{
-
+}