-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 57 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 8 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 15 | ||||
-rw-r--r-- | noncore/apps/advancedfm/main.cpp | 2 |
4 files changed, 31 insertions, 51 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a47edd8..afb44f5 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -37,7 +37,3 @@ using namespace Opie::Ui; | |||
37 | 37 | ||
38 | #ifdef NOQUICKLAUNCH | ||
39 | AdvancedFm::AdvancedFm( ) | ||
40 | #else | ||
41 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | 38 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) |
42 | #endif | ||
43 | : QMainWindow( ) { | 39 | : QMainWindow( ) { |
@@ -73,3 +69,3 @@ void AdvancedFm::cleanUp() { | |||
73 | void AdvancedFm::tabChanged(QWidget *) { | 69 | void AdvancedFm::tabChanged(QWidget *) { |
74 | // owarn << "tab changed" << oendl; | 70 | // owarn << "tab changed" << oendl; |
75 | QString path = CurrentDir()->canonicalPath(); | 71 | QString path = CurrentDir()->canonicalPath(); |
@@ -95,3 +91,3 @@ void AdvancedFm::populateView() { | |||
95 | 91 | ||
96 | // owarn << "PopulateView" << oendl; | 92 | // owarn << "PopulateView" << oendl; |
97 | QPixmap pm; | 93 | QPixmap pm; |
@@ -101,3 +97,3 @@ void AdvancedFm::populateView() { | |||
101 | 97 | ||
102 | //owarn << "path is "+path << oendl; | 98 | //owarn << "path is "+path << oendl; |
103 | thisView->clear(); | 99 | thisView->clear(); |
@@ -162,3 +158,3 @@ void AdvancedFm::populateView() { | |||
162 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { | 158 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { |
163 | // odebug << " overlay link image" << oendl; | 159 | // odebug << " overlay link image" << oendl; |
164 | pm= Resource::loadPixmap( "advancedfm/symlink" ); | 160 | pm= Resource::loadPixmap( "advancedfm/symlink" ); |
@@ -186,3 +182,3 @@ void AdvancedFm::populateView() { | |||
186 | lstat( mydirent->d_name, &buf); | 182 | lstat( mydirent->d_name, &buf); |
187 | // odebug << mydirent->d_name << oendl; | 183 | // odebug << mydirent->d_name << oendl; |
188 | fileL.sprintf("%s", mydirent->d_name); | 184 | fileL.sprintf("%s", mydirent->d_name); |
@@ -211,3 +207,3 @@ void AdvancedFm::rePopulate() { | |||
211 | // int tmpTab = whichTab; | 207 | // int tmpTab = whichTab; |
212 | // // odebug << "" << tmpTab << "" << oendl; | 208 | // // odebug << "" << tmpTab << "" << oendl; |
213 | 209 | ||
@@ -221,6 +217,6 @@ void AdvancedFm::rePopulate() { | |||
221 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | 217 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { |
222 | //owarn << "listclicked" << oendl; | 218 | //owarn << "listclicked" << oendl; |
223 | if(selectedItem) { | 219 | if(selectedItem) { |
224 | QString strItem=selectedItem->text(0); | 220 | QString strItem=selectedItem->text(0); |
225 | // owarn << strItem << oendl; | 221 | // owarn << strItem << oendl; |
226 | QString strSize=selectedItem->text(1); | 222 | QString strSize=selectedItem->text(1); |
@@ -261,5 +257,2 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in | |||
261 | break; | 257 | break; |
262 | case 2: | ||
263 | menuTimer.start( 500, TRUE ); | ||
264 | break; | ||
265 | }; | 258 | }; |
@@ -269,3 +262,3 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in | |||
269 | void AdvancedFm::switchToLocalTab() { | 262 | void AdvancedFm::switchToLocalTab() { |
270 | //owarn << "switch to local view" << oendl; | 263 | //owarn << "switch to local view" << oendl; |
271 | TabWidget->setCurrentWidget(0); | 264 | TabWidget->setCurrentWidget(0); |
@@ -275,3 +268,3 @@ void AdvancedFm::switchToLocalTab() { | |||
275 | void AdvancedFm::switchToRemoteTab() { | 268 | void AdvancedFm::switchToRemoteTab() { |
276 | //owarn << "switch to local view" << oendl; | 269 | //owarn << "switch to local view" << oendl; |
277 | TabWidget->setCurrentWidget(1); | 270 | TabWidget->setCurrentWidget(1); |
@@ -331,3 +324,3 @@ QStringList AdvancedFm::getPath() { | |||
331 | strList << it.current()->text(0); | 324 | strList << it.current()->text(0); |
332 | // odebug << it.current()->text(0) << oendl; | 325 | // odebug << it.current()->text(0) << oendl; |
333 | } | 326 | } |
@@ -382,3 +375,3 @@ void AdvancedFm::doAbout() { | |||
382 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { | 375 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { |
383 | // owarn << "key " << e->key() << "" << oendl; | 376 | // owarn << "key " << e->key() << "" << oendl; |
384 | // if( CurrentView()->hasFocus() ) | 377 | // if( CurrentView()->hasFocus() ) |
@@ -608,8 +601,2 @@ void AdvancedFm::showFileMenu() { | |||
608 | 601 | ||
609 | void AdvancedFm::cancelMenuTimer() { | ||
610 | |||
611 | if( menuTimer.isActive() ) | ||
612 | menuTimer.stop(); | ||
613 | } | ||
614 | |||
615 | QString AdvancedFm::checkDiskSpace(const QString &path) { | 602 | QString AdvancedFm::checkDiskSpace(const QString &path) { |
@@ -640,3 +627,3 @@ void AdvancedFm::addToDocs() { | |||
640 | curFile = thisDir->canonicalPath()+"/"+(*it); | 627 | curFile = thisDir->canonicalPath()+"/"+(*it); |
641 | // odebug << curFile << oendl; | 628 | // odebug << curFile << oendl; |
642 | QFileInfo fi(curFile); | 629 | QFileInfo fi(curFile); |
@@ -713,3 +700,3 @@ void AdvancedFm::addCustomDir() { | |||
713 | void AdvancedFm::removeCustomDir() { | 700 | void AdvancedFm::removeCustomDir() { |
714 | // odebug << "remove custom dir" << oendl; | 701 | // odebug << "remove custom dir" << oendl; |
715 | Config cfg("AdvancedFm"); | 702 | Config cfg("AdvancedFm"); |
@@ -748,3 +735,3 @@ void AdvancedFm::removeCustomDir() { | |||
748 | void AdvancedFm::gotoCustomDir(const QString &dir) { | 735 | void AdvancedFm::gotoCustomDir(const QString &dir) { |
749 | // odebug << "gotoCustomDir(const QString &dir) " +dir << oendl; | 736 | // odebug << "gotoCustomDir(const QString &dir) " +dir << oendl; |
750 | // QString curDir = dir; | 737 | // QString curDir = dir; |
@@ -789,6 +776,6 @@ QListView * AdvancedFm::CurrentView() { | |||
789 | if ( whichTab == 1) { | 776 | if ( whichTab == 1) { |
790 | // owarn << "CurrentView Tab 1" << oendl; | 777 | // owarn << "CurrentView Tab 1" << oendl; |
791 | return Local_View; | 778 | return Local_View; |
792 | } else { | 779 | } else { |
793 | // owarn << "CurrentView Tab 2" << oendl; | 780 | // owarn << "CurrentView Tab 2" << oendl; |
794 | return Remote_View; | 781 | return Remote_View; |
@@ -805,3 +792,3 @@ QListView * AdvancedFm::OtherView() { | |||
805 | void AdvancedFm::setOtherTabCurrent() { | 792 | void AdvancedFm::setOtherTabCurrent() { |
806 | // owarn << "setOtherTabCurrent() " << whichTab << "" << oendl; | 793 | // owarn << "setOtherTabCurrent() " << whichTab << "" << oendl; |
807 | if ( whichTab == 1) { | 794 | if ( whichTab == 1) { |
@@ -816,6 +803,6 @@ void AdvancedFm::setOtherTabCurrent() { | |||
816 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { | 803 | void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { |
817 | // odebug << "qcop message "+msg << oendl; | 804 | // odebug << "qcop message "+msg << oendl; |
818 | QDataStream stream ( data, IO_ReadOnly ); | 805 | QDataStream stream ( data, IO_ReadOnly ); |
819 | if ( msg == "openDirectory(QString)" ) { | 806 | if ( msg == "openDirectory(QString)" ) { |
820 | // odebug << "received" << oendl; | 807 | // odebug << "received" << oendl; |
821 | QString file; | 808 | QString file; |
@@ -832,3 +819,3 @@ void AdvancedFm::setDocument(const QString &file) { | |||
832 | void AdvancedFm::gotoDirectory(const QString &file) { | 819 | void AdvancedFm::gotoDirectory(const QString &file) { |
833 | // owarn << "goto dir "+file << oendl; | 820 | // owarn << "goto dir "+file << oendl; |
834 | QString curDir = file; | 821 | QString curDir = file; |
@@ -868,3 +855,3 @@ void AdvancedFm::findFile(const QString &fileName) { | |||
868 | void AdvancedFm::slotSwitchMenu(int ) { | 855 | void AdvancedFm::slotSwitchMenu(int ) { |
869 | // odebug << "Switch " << item << "" << oendl; | 856 | // odebug << "Switch " << item << "" << oendl; |
870 | // viewMenu->setItemChecked(item, true); | 857 | // viewMenu->setItemChecked(item, true); |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 4eaa6d6..effda0b 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -57,7 +57,3 @@ public: | |||
57 | static QString appName() { return QString::fromLatin1("advancedfm"); } | 57 | static QString appName() { return QString::fromLatin1("advancedfm"); } |
58 | #ifdef NOQUICKLAUNCH | ||
59 | AdvancedFm(); | ||
60 | #else | ||
61 | AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); | 58 | AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); |
62 | #endif | ||
63 | ~AdvancedFm(); | 59 | ~AdvancedFm(); |
@@ -140,4 +136,3 @@ protected slots: | |||
140 | void dirMenuSelected(int); | 136 | void dirMenuSelected(int); |
141 | void showFileMenu(); | 137 | void showFileMenu(); |
142 | void cancelMenuTimer(); | ||
143 | void homeButtonPushed(); | 138 | void homeButtonPushed(); |
@@ -168,3 +163,2 @@ private: | |||
168 | QString oldName; | 163 | QString oldName; |
169 | QTimer menuTimer; | ||
170 | void startProcess(const QString &); | 164 | void startProcess(const QString &); |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 29335f8..dc7e8e1 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -163,3 +163,3 @@ void AdvancedFm::init() { | |||
163 | 163 | ||
164 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 164 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); |
165 | 165 | ||
@@ -187,3 +187,3 @@ void AdvancedFm::init() { | |||
187 | 187 | ||
188 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 188 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); |
189 | 189 | ||
@@ -225,3 +225,3 @@ void AdvancedFm::init() { | |||
225 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { | 225 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { |
226 | odebug << "not have sd" << oendl; | 226 | odebug << "not have sd" << oendl; |
227 | sdButton->hide(); | 227 | sdButton->hide(); |
@@ -229,3 +229,3 @@ void AdvancedFm::init() { | |||
229 | if( !StorageInfo::hasCf() ) { | 229 | if( !StorageInfo::hasCf() ) { |
230 | odebug << "not have cf" << oendl; | 230 | odebug << "not have cf" << oendl; |
231 | cfButton->hide(); | 231 | cfButton->hide(); |
@@ -275,4 +275,2 @@ void AdvancedFm::initConnections() | |||
275 | 275 | ||
276 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | ||
277 | |||
278 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), | 276 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), |
@@ -285,3 +283,6 @@ void AdvancedFm::initConnections() | |||
285 | 283 | ||
286 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); | 284 | connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), |
285 | this, SLOT(showFileMenu())); | ||
286 | connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), | ||
287 | this, SLOT(showFileMenu())); | ||
287 | 288 | ||
diff --git a/noncore/apps/advancedfm/main.cpp b/noncore/apps/advancedfm/main.cpp index df0d4af..06fc741 100644 --- a/noncore/apps/advancedfm/main.cpp +++ b/noncore/apps/advancedfm/main.cpp | |||
@@ -2,4 +2,2 @@ | |||
2 | /*************************************************************************** | 2 | /*************************************************************************** |
3 | using namespace Opie::Core; | ||
4 | using namespace Opie::Core; | ||
5 | main.cpp - description | 3 | main.cpp - description |