summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-02-24 04:08:24 (UTC)
committer llornkcor <llornkcor>2003-02-24 04:08:24 (UTC)
commitd5746c625ebf540711179ef01a7bb99bc3b2c3d6 (patch) (side-by-side diff)
tree6fc93d296422f38e1beb27828b5b0b1dc3cf497c
parent009b85e8daa341d4a2fc62404f4a58715e775b86 (diff)
downloadopie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.zip
opie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.tar.gz
opie-d5746c625ebf540711179ef01a7bb99bc3b2c3d6.tar.bz2
fix hidden again
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp19
-rw-r--r--noncore/apps/advancedfm/advancedfm.h3
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp5
3 files changed, 18 insertions, 9 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
@@ -69,20 +69,18 @@
#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()
@@ -112,17 +110,16 @@ void AdvancedFm::tabChanged(QWidget *w)
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();
@@ -238,16 +235,28 @@ void AdvancedFm::populateView()
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();
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 024ab29..3250a66 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -59,16 +59,17 @@ public:
protected slots:
void selectAll();
void addToDocs();
void doDirChange();
void mkDir();
void del();
void rn();
void populateView();
+ void rePopulate();
void showHidden();
void showMenuHidden();
void writeConfig();
void readConfig();
void ListClicked(QListViewItem *);
void ListPressed( int, QListViewItem *, const QPoint&, int);
void makeDir();
void doDelete();
@@ -115,17 +116,17 @@ protected:
void keyReleaseEvent( QKeyEvent *);
void keyPressEvent( QKeyEvent *);
QString getFileSystemType(const QString &);
QString getDiskSpace(const QString &);
void parsetab(const QString &fileName);
QString checkDiskSpace(const QString &);
QString dealWithSymName(const QString &);
QDir *CurrentDir();
- QDir *OtherDir();
+ QDir *OtherDir();
QListView *CurrentView();
QListView *OtherView();
void setOtherTabCurrent();
protected slots:
void dirMenuSelected(int);
void showFileMenu();
void cancelMenuTimer();
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index f46503c..a82d69a 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -63,18 +63,17 @@ void AdvancedFm::showMenuHidden()
}
else
{
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();
+ rePopulate();
// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
if(b) b = false; else b = true;
}
void AdvancedFm::showHidden()
{
if (b)
{
@@ -86,17 +85,17 @@ void AdvancedFm::showHidden()
}
else
{
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();
+ rePopulate();
}
QString AdvancedFm::dealWithSymName(const QString &fileName)
{
QString strItem = fileName;
return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
}