summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-02-24 03:49:20 (UTC)
committer llornkcor <llornkcor>2003-02-24 03:49:20 (UTC)
commit04470810d71cc8aa3ddde193559312fd3ecc7a11 (patch) (side-by-side diff)
treef9d291fed1aa1627927863fc0381d6d15f6b6f7e
parente144592570ddacf26d27f3e2759dbe7f2370d0a0 (diff)
downloadopie-04470810d71cc8aa3ddde193559312fd3ecc7a11.zip
opie-04470810d71cc8aa3ddde193559312fd3ecc7a11.tar.gz
opie-04470810d71cc8aa3ddde193559312fd3ecc7a11.tar.bz2
fix for hidden dirs
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp34
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp18
2 files changed, 26 insertions, 26 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fc6c3bf..d56e746 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -277,25 +277,24 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem)
chdir( strItem.latin1());
}
}
void AdvancedFm::ListPressed( int mouse, QListViewItem *, const QPoint& , int ) {
switch (mouse) {
case 1:
{
if(renameBox != 0 )
{
cancelRename();
}
-
}
break;
case 2:
menuTimer.start( 500, TRUE );
break;
};
}
void AdvancedFm::switchToLocalTab()
{
TabWidget->setCurrentTab(0);
Local_View->setFocus();
@@ -358,73 +357,71 @@ void AdvancedFm::fillCombo(const QString &currentPath)
void AdvancedFm::currentPathComboActivated(const QString & currentPath)
{
chdir( currentPath.latin1() );
CurrentDir()->cd( currentPath, TRUE);
populateView();
update();
}
QStringList AdvancedFm::getPath()
{
QStringList strList;
QListView *thisView=CurrentView();
- QList<QListViewItem> * getSelectedItems( QListView * thisView );
- QListViewItemIterator it( thisView );
- for ( ; it.current(); ++it )
- {
- if ( it.current()->isSelected() )
- {
- strList << it.current()->text(0);
+ QList<QListViewItem> * getSelectedItems( QListView * thisView );
+ QListViewItemIterator it( thisView );
+ for ( ; it.current(); ++it )
+ {
+ if ( it.current()->isSelected() )
+ {
+ strList << it.current()->text(0);
// qDebug(it.current()->text(0));
- }
- }
- return strList;
+ }
+ }
+ return strList;
}
void AdvancedFm::homeButtonPushed()
{
QString current = QDir::homeDirPath();
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::docButtonPushed()
{
QString current = QPEApplication::documentDir();
chdir( current.latin1() );
-
- CurrentDir()->cd( current, TRUE);
- populateView();
+ CurrentDir()->cd( current, TRUE);
+ populateView();
update();
}
void AdvancedFm::SDButtonPushed()
{
QString current = "/mnt/card";// this can change so fix
chdir( current.latin1() );
- CurrentDir()->cd( current, TRUE);
- populateView();
+ CurrentDir()->cd( current, TRUE);
+ populateView();
update();
}
void AdvancedFm::CFButtonPushed()
{
QString current;
if(zaurusDevice)
current= "/mnt/cf"; //zaurus
else
current = "/mnt/hda"; //ipaq
-
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::doAbout()
{
QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n"
"is copyright 2002-2003 by\n"
"L.J.Potter<llornkcor@handhelds.org>\n"
@@ -778,25 +775,26 @@ void AdvancedFm::removeCustomDir()
// qDebug("remove custom dir");
Config cfg("AdvancedFm");
cfg.setGroup("Menu");
QString dir;
QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)',');
QStringList list2;
dir = CurrentDir()->canonicalPath();
int ramble=2;
// int ramble=-24;
//first remove list
if(list.grep(dir,true).isEmpty())
{
- QMessageBox::message("AdvancedFm",tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!"));
+ QMessageBox::message("AdvancedFm",
+ tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!"));
}
else
{
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
if((*it) != dir)//current item is not our current dir, so add it to temp list
{
list2 <<(*it);
}
else
{
// customDirMenu->removeItem( ramble);
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index c553017..062a013 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -46,55 +46,57 @@
#include <dirent.h>
void AdvancedFm::doDirChange()
{
ListClicked( CurrentView()->currentItem());
}
void AdvancedFm::showMenuHidden()
{
if (b)
{
- currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
// b=FALSE;
- }
+ }
else
{
- currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
+ CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
// b=TRUE;
- }
+ }
populateView();
// populateRemoteView();
// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
if(b) b = false; else b = true;
}
void AdvancedFm::showHidden()
{
if (b)
{
CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
// b=FALSE;
}
else
{
CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+s OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
// b=TRUE;
}
populateView();
}
QString AdvancedFm::dealWithSymName(const QString &fileName)
{
QString strItem = fileName;
return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
}