author | zecke <zecke> | 2004-08-18 22:07:30 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-18 22:07:30 (UTC) |
commit | 50636a24f8ec2e603f1888a18dba044a1045bf0b (patch) (unidiff) | |
tree | 9f69140b2449aaefe263e7acab3b6b147c7fadf7 /noncore | |
parent | eb0a70826bc77c8b4008bd0444218da7612d32a9 (diff) | |
download | opie-50636a24f8ec2e603f1888a18dba044a1045bf0b.zip opie-50636a24f8ec2e603f1888a18dba044a1045bf0b.tar.gz opie-50636a24f8ec2e603f1888a18dba044a1045bf0b.tar.bz2 |
-Remove #ifdef for NOQUICKLAUNCH as OPIE_EXPORT_APP works for
both cases already.
-Use QPEApplication::setStylusOperation for RightOnHold feature
instead of custom code
-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 | |||
@@ -34,13 +34,9 @@ | |||
34 | #include <mntent.h> | 34 | #include <mntent.h> |
35 | 35 | ||
36 | using namespace Opie::Ui; | 36 | 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( ) { |
44 | init(); | 40 | init(); |
45 | renameBox = 0; | 41 | renameBox = 0; |
46 | 42 | ||
@@ -70,9 +66,9 @@ void AdvancedFm::cleanUp() { | |||
70 | file.remove(); | 66 | file.remove(); |
71 | } | 67 | } |
72 | 68 | ||
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(); |
76 | currentPathCombo->lineEdit()->setText( path ); | 72 | currentPathCombo->lineEdit()->setText( path ); |
77 | 73 | ||
78 | if(whichTab == 1) { | 74 | if(whichTab == 1) { |
@@ -92,15 +88,15 @@ void AdvancedFm::tabChanged(QWidget *) { | |||
92 | 88 | ||
93 | 89 | ||
94 | void AdvancedFm::populateView() { | 90 | void AdvancedFm::populateView() { |
95 | 91 | ||
96 | // owarn << "PopulateView" << oendl; | 92 | // owarn << "PopulateView" << oendl; |
97 | QPixmap pm; | 93 | QPixmap pm; |
98 | QListView *thisView = CurrentView(); | 94 | QListView *thisView = CurrentView(); |
99 | QDir *thisDir = CurrentDir(); | 95 | QDir *thisDir = CurrentDir(); |
100 | QString path = thisDir->canonicalPath(); | 96 | QString path = thisDir->canonicalPath(); |
101 | 97 | ||
102 | //owarn << "path is "+path << oendl; | 98 | //owarn << "path is "+path << oendl; |
103 | thisView->clear(); | 99 | thisView->clear(); |
104 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 100 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
105 | thisDir->setMatchAllDirs(TRUE); | 101 | thisDir->setMatchAllDirs(TRUE); |
106 | thisDir->setNameFilter(filterStr); | 102 | thisDir->setNameFilter(filterStr); |
@@ -159,9 +155,9 @@ void AdvancedFm::populateView() { | |||
159 | pm = unknownXpm; | 155 | pm = unknownXpm; |
160 | } | 156 | } |
161 | } | 157 | } |
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" ); |
165 | // pm= Resource::loadPixmap( "folder" ); | 161 | // pm= Resource::loadPixmap( "folder" ); |
166 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); | 162 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); |
167 | // QPainter painter( &pm ); | 163 | // QPainter painter( &pm ); |
@@ -183,9 +179,9 @@ void AdvancedFm::populateView() { | |||
183 | 179 | ||
184 | if((dir = opendir( path.latin1())) != NULL) | 180 | if((dir = opendir( path.latin1())) != NULL) |
185 | while ((mydirent = readdir(dir)) != NULL) { | 181 | while ((mydirent = readdir(dir)) != NULL) { |
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); |
189 | devT = buf.st_dev; | 185 | devT = buf.st_dev; |
190 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); | 186 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); |
191 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); | 187 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); |
@@ -208,9 +204,9 @@ void AdvancedFm::rePopulate() { | |||
208 | setOtherTabCurrent(); | 204 | setOtherTabCurrent(); |
209 | populateView(); | 205 | populateView(); |
210 | 206 | ||
211 | // int tmpTab = whichTab; | 207 | // int tmpTab = whichTab; |
212 | // // odebug << "" << tmpTab << "" << oendl; | 208 | // // odebug << "" << tmpTab << "" << oendl; |
213 | 209 | ||
214 | // for(int i =1; i < 3; i++) { | 210 | // for(int i =1; i < 3; i++) { |
215 | // TabWidget->setCurrentWidget(i - 1); | 211 | // TabWidget->setCurrentWidget(i - 1); |
216 | // populateView(); | 212 | // populateView(); |
@@ -218,12 +214,12 @@ void AdvancedFm::rePopulate() { | |||
218 | // TabWidget->setCurrentWidget( tmpTab - 1); | 214 | // TabWidget->setCurrentWidget( tmpTab - 1); |
219 | } | 215 | } |
220 | 216 | ||
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); |
227 | strSize=strSize.stripWhiteSpace(); | 223 | strSize=strSize.stripWhiteSpace(); |
228 | bool isDirectory = false; | 224 | bool isDirectory = false; |
229 | QString strItem2; | 225 | QString strItem2; |
@@ -258,23 +254,20 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in | |||
258 | cancelRename(); | 254 | cancelRename(); |
259 | } | 255 | } |
260 | } | 256 | } |
261 | break; | 257 | break; |
262 | case 2: | ||
263 | menuTimer.start( 500, TRUE ); | ||
264 | break; | ||
265 | }; | 258 | }; |
266 | } | 259 | } |
267 | 260 | ||
268 | 261 | ||
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); |
272 | Local_View->setFocus(); | 265 | Local_View->setFocus(); |
273 | } | 266 | } |
274 | 267 | ||
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); |
278 | Remote_View->setFocus(); | 271 | Remote_View->setFocus(); |
279 | } | 272 | } |
280 | 273 | ||
@@ -328,9 +321,9 @@ QStringList AdvancedFm::getPath() { | |||
328 | QListViewItemIterator it( thisView ); | 321 | QListViewItemIterator it( thisView ); |
329 | for ( ; it.current(); ++it ) { | 322 | for ( ; it.current(); ++it ) { |
330 | if ( it.current()->isSelected() ) { | 323 | if ( it.current()->isSelected() ) { |
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 | } |
334 | } | 327 | } |
335 | return strList; | 328 | return strList; |
336 | } | 329 | } |
@@ -379,9 +372,9 @@ void AdvancedFm::doAbout() { | |||
379 | "and is licensed by the GPL")); | 372 | "and is licensed by the GPL")); |
380 | } | 373 | } |
381 | 374 | ||
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() ) |
385 | { | 378 | { |
386 | switch ( e->key() ) { | 379 | switch ( e->key() ) { |
387 | case Key_Left: | 380 | case Key_Left: |
@@ -605,14 +598,8 @@ void AdvancedFm::showFileMenu() { | |||
605 | if(m) delete m; | 598 | if(m) delete m; |
606 | } | 599 | } |
607 | 600 | ||
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) { |
616 | struct statfs fss; | 603 | struct statfs fss; |
617 | if ( !statfs( path.latin1(), &fss ) ) { | 604 | if ( !statfs( path.latin1(), &fss ) ) { |
618 | int blkSize = fss.f_bsize; | 605 | int blkSize = fss.f_bsize; |
@@ -637,9 +624,9 @@ void AdvancedFm::addToDocs() { | |||
637 | if( strListPaths.count() > 0) { | 624 | if( strListPaths.count() > 0) { |
638 | QString curFile; | 625 | QString curFile; |
639 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | 626 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { |
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); |
643 | DocLnk f; | 630 | DocLnk f; |
644 | // curFile.replace(QRegExp("\\..*"),""); | 631 | // curFile.replace(QRegExp("\\..*"),""); |
645 | f.setName(fi.baseName() ); | 632 | f.setName(fi.baseName() ); |
@@ -710,9 +697,9 @@ void AdvancedFm::addCustomDir() { | |||
710 | cfg.write(); | 697 | cfg.write(); |
711 | } | 698 | } |
712 | 699 | ||
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"); |
716 | cfg.setGroup("Menu"); | 703 | cfg.setGroup("Menu"); |
717 | QString dir; | 704 | QString dir; |
718 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); | 705 | QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)','); |
@@ -745,9 +732,9 @@ void AdvancedFm::removeCustomDir() { | |||
745 | 732 | ||
746 | } | 733 | } |
747 | 734 | ||
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; |
751 | // QDir *thisDir = CurrentDir(); | 738 | // QDir *thisDir = CurrentDir(); |
752 | // if( curDir.isEmpty()) { | 739 | // if( curDir.isEmpty()) { |
753 | // } | 740 | // } |
@@ -786,12 +773,12 @@ QDir *AdvancedFm::OtherDir() { | |||
786 | } | 773 | } |
787 | 774 | ||
788 | QListView * AdvancedFm::CurrentView() { | 775 | 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; |
795 | } | 782 | } |
796 | } | 783 | } |
797 | 784 | ||
@@ -802,9 +789,9 @@ QListView * AdvancedFm::OtherView() { | |||
802 | return Local_View; | 789 | return Local_View; |
803 | } | 790 | } |
804 | 791 | ||
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) { |
808 | TabWidget->setCurrentWidget(1); | 795 | TabWidget->setCurrentWidget(1); |
809 | } else { | 796 | } else { |
810 | TabWidget->setCurrentWidget(0); | 797 | TabWidget->setCurrentWidget(0); |
@@ -813,12 +800,12 @@ void AdvancedFm::setOtherTabCurrent() { | |||
813 | OtherView()->setSelected( CurrentView()->firstChild(), true); | 800 | OtherView()->setSelected( CurrentView()->firstChild(), true); |
814 | } | 801 | } |
815 | 802 | ||
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; |
822 | stream >> file; | 809 | stream >> file; |
823 | gotoDirectory( (const QString &) file); | 810 | gotoDirectory( (const QString &) file); |
824 | } | 811 | } |
@@ -829,9 +816,9 @@ void AdvancedFm::setDocument(const QString &file) { | |||
829 | 816 | ||
830 | } | 817 | } |
831 | 818 | ||
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; |
835 | QDir *thisDir = CurrentDir(); | 822 | QDir *thisDir = CurrentDir(); |
836 | if(QDir( curDir).exists() ) { | 823 | if(QDir( curDir).exists() ) { |
837 | thisDir->setPath( curDir ); | 824 | thisDir->setPath( curDir ); |
@@ -865,9 +852,9 @@ void AdvancedFm::findFile(const QString &fileName) { | |||
865 | } | 852 | } |
866 | } | 853 | } |
867 | 854 | ||
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); |
871 | } | 858 | } |
872 | 859 | ||
873 | void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) { | 860 | void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) { |
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 | |||
@@ -54,13 +54,9 @@ class AdvancedFm : public QMainWindow | |||
54 | { | 54 | { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | 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(); |
64 | protected slots: | 60 | protected slots: |
65 | void slotSwitchMenu(int); | 61 | void slotSwitchMenu(int); |
66 | void selectAll(); | 62 | void selectAll(); |
@@ -137,10 +133,9 @@ protected: | |||
137 | 133 | ||
138 | protected slots: | 134 | protected slots: |
139 | void openSearch(); | 135 | void openSearch(); |
140 | void dirMenuSelected(int); | 136 | void dirMenuSelected(int); |
141 | void showFileMenu(); | 137 | void showFileMenu(); |
142 | void cancelMenuTimer(); | ||
143 | void homeButtonPushed(); | 138 | void homeButtonPushed(); |
144 | void docButtonPushed(); | 139 | void docButtonPushed(); |
145 | void SDButtonPushed(); | 140 | void SDButtonPushed(); |
146 | void CFButtonPushed(); | 141 | void CFButtonPushed(); |
@@ -165,9 +160,8 @@ protected slots: | |||
165 | 160 | ||
166 | private: | 161 | private: |
167 | MenuButton *menuButton; | 162 | MenuButton *menuButton; |
168 | QString oldName; | 163 | QString oldName; |
169 | QTimer menuTimer; | ||
170 | void startProcess(const QString &); | 164 | void startProcess(const QString &); |
171 | bool eventFilter( QObject * , QEvent * ); | 165 | bool eventFilter( QObject * , QEvent * ); |
172 | void cancelRename(); | 166 | void cancelRename(); |
173 | void doRename(QListView *); | 167 | void doRename(QListView *); |
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 | |||
@@ -160,9 +160,9 @@ void AdvancedFm::init() { | |||
160 | Local_View->setSelectionMode(QListView::Extended); | 160 | Local_View->setSelectionMode(QListView::Extended); |
161 | Local_View->setFocusPolicy(StrongFocus); | 161 | Local_View->setFocusPolicy(StrongFocus); |
162 | Local_View->installEventFilter( this ); | 162 | Local_View->installEventFilter( this ); |
163 | 163 | ||
164 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 164 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); |
165 | 165 | ||
166 | tabLayout->addWidget( Local_View, 0, 0 ); | 166 | tabLayout->addWidget( Local_View, 0, 0 ); |
167 | 167 | ||
168 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); | 168 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); |
@@ -184,9 +184,9 @@ void AdvancedFm::init() { | |||
184 | Remote_View->setSelectionMode(QListView::Extended); | 184 | Remote_View->setSelectionMode(QListView::Extended); |
185 | Remote_View->setFocusPolicy(StrongFocus); | 185 | Remote_View->setFocusPolicy(StrongFocus); |
186 | Remote_View->installEventFilter( this ); | 186 | Remote_View->installEventFilter( this ); |
187 | 187 | ||
188 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 188 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); |
189 | 189 | ||
190 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 190 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
191 | 191 | ||
192 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 192 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
@@ -222,13 +222,13 @@ void AdvancedFm::init() { | |||
222 | zaurusDevice=FALSE; | 222 | zaurusDevice=FALSE; |
223 | 223 | ||
224 | 224 | ||
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(); |
228 | } | 228 | } |
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(); |
232 | } | 232 | } |
233 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 233 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
234 | currentDir.setPath( QDir::currentDirPath()); | 234 | currentDir.setPath( QDir::currentDirPath()); |
@@ -272,19 +272,20 @@ void AdvancedFm::initConnections() | |||
272 | 272 | ||
273 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | 273 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
274 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | 274 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
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*)), |
279 | this,SLOT( ListClicked(QListViewItem*)) ); | 277 | this,SLOT( ListClicked(QListViewItem*)) ); |
280 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | 278 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
281 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | 279 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
282 | 280 | ||
283 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), | 281 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), |
284 | this,SLOT(tabChanged(QWidget*))); | 282 | this,SLOT(tabChanged(QWidget*))); |
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 | ||
288 | connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); | 289 | connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); |
289 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); | 290 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); |
290 | connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); | 291 | connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); |
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 | |||
@@ -1,8 +1,6 @@ | |||
1 | 1 | ||
2 | /*************************************************************************** | 2 | /*************************************************************************** |
3 | using namespace Opie::Core; | ||
4 | using namespace Opie::Core; | ||
5 | main.cpp - description | 3 | main.cpp - description |
6 | ------------------- | 4 | ------------------- |
7 | begin : March 10, 2002 | 5 | begin : March 10, 2002 |
8 | copyright : (C) 2002 by llornkcor | 6 | copyright : (C) 2002 by llornkcor |