author | zecke <zecke> | 2002-04-01 01:48:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-01 01:48:02 (UTC) |
commit | 9a68bd2411e65eb6c51aead50a5b0b670174458d (patch) (side-by-side diff) | |
tree | 05ab085d430edc2e821ea890da600774abc30f01 | |
parent | 84850cd8811fc29aa39ecd2452884bf48ea27e92 (diff) | |
download | opie-9a68bd2411e65eb6c51aead50a5b0b670174458d.zip opie-9a68bd2411e65eb6c51aead50a5b0b670174458d.tar.gz opie-9a68bd2411e65eb6c51aead50a5b0b670174458d.tar.bz2 |
Almost done ||
-rw-r--r-- | libopie/ofileselector.cc | 23 | ||||
-rw-r--r-- | libopie/ofileselector.h | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 14f035e..fbe69ed 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -742,16 +742,19 @@ void OFileSelector::initializeListView() 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 @@ -997,16 +1000,21 @@ void OFileSelector::slotContextMenu(QListViewItem *item) } 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(); @@ -1048,12 +1056,25 @@ void OFileSelector::slotDelete() 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() +{ - +} diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index b91c0ea..bf3cb48 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h @@ -262,14 +262,16 @@ private slots: // listview crap see above // PopupMenu crap virtual void slotChangedDir(); virtual void slotOpen(); virtual void slotRescan(); virtual void slotRename(); virtual void slotDelete(); virtual void cdUP(); - + virtual void slotHome(); + virtual void slotDoc(); + virtual void slotNavigate( ); }; #endif |