summaryrefslogtreecommitdiff
path: root/libopie/ofileselector.cc
Unidiff
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
@@ -744,12 +744,15 @@ void OFileSelector::initializeListView()
744 QListIterator<FileSystem> it ( fs ); 744 QListIterator<FileSystem> it ( fs );
745 for( ; it.current(); ++it ){ 745 for( ; it.current(); ++it ){
746 const QString disk = (*it)->name(); 746 const QString disk = (*it)->name();
747 const QString path = (*it)->path(); 747 const QString path = (*it)->path();
748 m_location->insertItem(path+ "<-"+disk ); 748 m_location->insertItem(path+ "<-"+disk );
749 } 749 }
750 int count = m_location->count();
751 m_location->insertItem(m_currentDir );
752 m_location->setCurrentItem( count );
750 }; 753 };
751 m_View = new QListView(m_pseudo, "Extended view" ); 754 m_View = new QListView(m_pseudo, "Extended view" );
752 m_stack->addWidget( m_pseudo, EXTENDED ); 755 m_stack->addWidget( m_pseudo, EXTENDED );
753 m_stack->raiseWidget( EXTENDED ); 756 m_stack->raiseWidget( EXTENDED );
754 m_pseudoLayout->addWidget(m_View ); 757 m_pseudoLayout->addWidget(m_View );
755 QPEApplication::setStylusOperation( m_View->viewport(),QPEApplication::RightOnHold); 758 QPEApplication::setStylusOperation( m_View->viewport(),QPEApplication::RightOnHold);
@@ -999,12 +1002,17 @@ bool OFileSelector::cd(const QString &str )
999{ 1002{
1000 qWarning(" dir %s", str.latin1() ); 1003 qWarning(" dir %s", str.latin1() );
1001 QDir dir( str); 1004 QDir dir( str);
1002 if(dir.exists() ){ 1005 if(dir.exists() ){
1003 m_currentDir = str; 1006 m_currentDir = str;
1004 reparse(); 1007 reparse();
1008 if(m_shTool ){
1009 int count = m_location->count();
1010 m_location->insertItem(str );
1011 m_location->setCurrentItem( count );
1012 }
1005 return true; 1013 return true;
1006 } 1014 }
1007 return false; 1015 return false;
1008} 1016}
1009 1017
1010void OFileSelector::slotChangedDir() 1018void OFileSelector::slotChangedDir()
@@ -1050,10 +1058,23 @@ void OFileSelector::cdUP()
1050{ 1058{
1051 QDir dir( m_currentDir ); 1059 QDir dir( m_currentDir );
1052 dir.cdUp(); 1060 dir.cdUp();
1053 if(dir.exists() ){ 1061 if(dir.exists() ){
1054 m_currentDir = dir.absPath(); 1062 m_currentDir = dir.absPath();
1055 reparse(); 1063 reparse();
1064 int count = m_location->count();
1065 m_location->insertItem(m_currentDir );
1066 m_location->setCurrentItem( count );
1056 } 1067 }
1057} 1068}
1069void OFileSelector::slotHome()
1070{
1071 cd(QDir::homeDirPath() );
1072}
1073void OFileSelector::slotDoc()
1074{
1075 cd(QDir::homeDirPath() + "/Documents" );
1076}
1077void OFileSelector::slotNavigate()
1078{
1058 1079
1059 1080}