-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 66 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 3 |
2 files changed, 19 insertions, 50 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 02898de..fec320d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -46,14 +46,5 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | |||
46 | initConnections(); | 46 | initConnections(); |
47 | 47 | populateView(); | |
48 | whichTab = 1; | ||
49 | populateView(); | ||
50 | // rePopulate(); | ||
51 | // currentPathCombo->setFocus(); | ||
52 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); | 48 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); |
53 | connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); | 49 | connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); |
54 | |||
55 | // if( CurrentView() == Local_View) | ||
56 | // qDebug("LOCAL VIEW"); | ||
57 | // else | ||
58 | // qDebug("REMOTE VIEW"); | ||
59 | switchToLocalTab(); | 50 | switchToLocalTab(); |
@@ -292,7 +283,5 @@ void AdvancedFm::refreshCurrentTab() { | |||
292 | void AdvancedFm::switchToLocalTab() { | 283 | void AdvancedFm::switchToLocalTab() { |
293 | qDebug("switchToLocal "); | 284 | TabWidget->setCurrentWidget(0); |
294 | TabWidget->setCurrentWidget(0); | 285 | Local_View->setFocus(); |
295 | Local_View->setFocus(); | 286 | whichTab = 1; |
296 | whichTab = 1; | ||
297 | |||
298 | } | 287 | } |
@@ -300,14 +289,5 @@ void AdvancedFm::switchToLocalTab() { | |||
300 | void AdvancedFm::switchToRemoteTab() { | 289 | void AdvancedFm::switchToRemoteTab() { |
301 | qDebug("switchToRemoteTab() "); | 290 | TabWidget->setCurrentWidget(1); |
302 | TabWidget->setCurrentWidget(1); | 291 | Remote_View->setFocus(); |
303 | Remote_View->setFocus(); | 292 | whichTab = 2; |
304 | whichTab = 2; | ||
305 | } | ||
306 | |||
307 | void AdvancedFm::readConfig() { | ||
308 | Config cfg("AdvancedFm"); | ||
309 | } | ||
310 | |||
311 | void AdvancedFm::writeConfig() { | ||
312 | Config cfg("AdvancedFm"); | ||
313 | } | 293 | } |
@@ -364,6 +344,5 @@ QStringList AdvancedFm::getPath() { | |||
364 | 344 | ||
365 | void AdvancedFm::homeButtonPushed() { | 345 | void AdvancedFm::changeTo(QString dir) { |
366 | QString current = QDir::homeDirPath(); | 346 | chdir( dir.latin1()); |
367 | chdir( current.latin1() ); | 347 | CurrentDir()->cd(dir, TRUE); |
368 | CurrentDir()->cd( current, TRUE); | ||
369 | populateView(); | 348 | populateView(); |
@@ -372,8 +351,8 @@ void AdvancedFm::homeButtonPushed() { | |||
372 | 351 | ||
352 | void AdvancedFm::homeButtonPushed() { | ||
353 | changeTo(QDir::homeDirPath()); | ||
354 | } | ||
355 | |||
373 | void AdvancedFm::docButtonPushed() { | 356 | void AdvancedFm::docButtonPushed() { |
374 | QString current = QPEApplication::documentDir(); | 357 | changeTo(QPEApplication::documentDir()); |
375 | chdir( current.latin1() ); | ||
376 | CurrentDir()->cd( current, TRUE); | ||
377 | populateView(); | ||
378 | update(); | ||
379 | } | 358 | } |
@@ -381,7 +360,3 @@ void AdvancedFm::docButtonPushed() { | |||
381 | void AdvancedFm::SDButtonPushed() { | 360 | void AdvancedFm::SDButtonPushed() { |
382 | QString current = "/mnt/card";// this can change so fix | 361 | changeTo("/mnt/card");// this can change so fix |
383 | chdir( current.latin1() ); | ||
384 | CurrentDir()->cd( current, TRUE); | ||
385 | populateView(); | ||
386 | update(); | ||
387 | } | 362 | } |
@@ -389,11 +364,6 @@ void AdvancedFm::SDButtonPushed() { | |||
389 | void AdvancedFm::CFButtonPushed() { | 364 | void AdvancedFm::CFButtonPushed() { |
390 | QString current; | ||
391 | if(zaurusDevice) | 365 | if(zaurusDevice) |
392 | current= "/mnt/cf"; //zaurus | 366 | changeTo("/mnt/cf"); //zaurus |
393 | else | 367 | else |
394 | current = "/mnt/hda"; //ipaq | 368 | changeTo("/mnt/hda"); //ipaq |
395 | chdir( current.latin1() ); | ||
396 | CurrentDir()->cd( current, TRUE); | ||
397 | populateView(); | ||
398 | update(); | ||
399 | } | 369 | } |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 2234b3c..c52b853 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -99,2 +99,3 @@ protected: | |||
99 | void setOtherTabCurrent(); | 99 | void setOtherTabCurrent(); |
100 | void changeTo(QString & dir); | ||
100 | 101 | ||
@@ -115,4 +116,2 @@ protected slots: | |||
115 | void showMenuHidden(); | 116 | void showMenuHidden(); |
116 | void writeConfig(); | ||
117 | void readConfig(); | ||
118 | void ListClicked(QListViewItem *); | 117 | void ListClicked(QListViewItem *); |