author | llornkcor <llornkcor> | 2003-02-24 04:08:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-24 04:08:24 (UTC) |
commit | d5746c625ebf540711179ef01a7bb99bc3b2c3d6 (patch) (side-by-side diff) | |
tree | 6fc93d296422f38e1beb27828b5b0b1dc3cf497c /noncore/apps/advancedfm/advancedfm.cpp | |
parent | 009b85e8daa341d4a2fc62404f4a58715e775b86 (diff) | |
download | opie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.zip opie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.tar.gz opie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.tar.bz2 |
fix hidden again
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index d56e746..bb7f346 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -65,28 +65,26 @@ #include <string.h> #include <errno.h> #include <sys/vfs.h> #include <mntent.h> #include <sys/utsname.h> AdvancedFm::AdvancedFm( ) : QMainWindow( ) { init(); renameBox = 0; initConnections(); - TabWidget->setCurrentTab(1); - populateView(); - TabWidget->setCurrentTab(0); - populateView(); + whichTab=1; + rePopulate(); currentPathCombo->setFocus(); } AdvancedFm::~AdvancedFm() { } void AdvancedFm::cleanUp() { QString sfile=QDir::homeDirPath(); if(sfile.right(1) != "/") sfile+="/._temp"; @@ -108,25 +106,24 @@ void AdvancedFm::tabChanged(QWidget *w) QString path = CurrentDir()->canonicalPath(); currentPathCombo->lineEdit()->setText( path ); viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); QString fs= getFileSystemType( (const QString &) path); setCaption("AdvancedFm :: "+fs+" :: " +checkDiskSpace( (const QString &) path )+ " kB free" ); chdir( path.latin1()); -//2 populateView(); } void AdvancedFm::populateView() { QPixmap pm; QListView *thisView = CurrentView(); QDir *thisDir = CurrentDir(); QString path = thisDir->canonicalPath(); thisView->clear(); thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); @@ -234,24 +231,36 @@ void AdvancedFm::populateView() pm = Resource::loadPixmap( "UnknownDocument-14" ); item->setPixmap( 0,pm); } } closedir(dir); } thisView->setSorting( 3,FALSE); fillCombo( (const QString &) path ); } +void AdvancedFm::rePopulate() +{ + int tmpTab = whichTab; + qDebug("%d", tmpTab); + + for(int i =1; i < 3; i++) + { + TabWidget->setCurrentTab(i - 1); + populateView(); + } + TabWidget->setCurrentTab( tmpTab - 1); +} void AdvancedFm::ListClicked(QListViewItem *selectedItem) { if(selectedItem) { QString strItem=selectedItem->text(0); QString strSize=selectedItem->text(1); strSize=strSize.stripWhiteSpace(); bool isDirectory = false; QString strItem2; if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 )//if symlink |