-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 19 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 3 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 5 |
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 @@ -71,16 +71,14 @@ AdvancedFm::AdvancedFm( ) : QMainWindow( ) { init(); renameBox = 0; initConnections(); - TabWidget->setCurrentTab(1); - populateView(); - TabWidget->setCurrentTab(0); - populateView(); + whichTab=1; + rePopulate(); currentPathCombo->setFocus(); } AdvancedFm::~AdvancedFm() { } @@ -114,13 +112,12 @@ void AdvancedFm::tabChanged(QWidget *w) 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; @@ -240,12 +237,24 @@ void AdvancedFm::populateView() } 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); 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 @@ -61,12 +61,13 @@ protected slots: 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); @@ -117,13 +118,13 @@ protected: 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); 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 @@ -65,14 +65,13 @@ void AdvancedFm::showMenuHidden() { 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() { @@ -88,13 +87,13 @@ void AdvancedFm::showHidden() { 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); |