-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 13 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 6 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/advancedfm/main.cpp | 2 |
4 files changed, 4 insertions, 24 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 | |||
@@ -32,17 +32,13 @@ | |||
32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
33 | #include <sys/vfs.h> | 33 | #include <sys/vfs.h> |
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 | ||
47 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 43 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
48 | 44 | ||
@@ -256,15 +252,12 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in | |||
256 | { | 252 | { |
257 | if(renameBox != 0 ) { | 253 | if(renameBox != 0 ) { |
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; |
@@ -603,18 +596,12 @@ void AdvancedFm::showFileMenu() { | |||
603 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 596 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
604 | 597 | ||
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; |
619 | // int totalBlks = fs.f_blocks; | 606 | // int totalBlks = fs.f_blocks; |
620 | int availBlks = fss.f_bavail; | 607 | int availBlks = fss.f_bavail; |
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 | |||
@@ -52,17 +52,13 @@ class Ir; | |||
52 | 52 | ||
53 | class AdvancedFm : public QMainWindow | 53 | 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(); |
67 | void addToDocs(); | 63 | void addToDocs(); |
68 | void doDirChange(); | 64 | void doDirChange(); |
@@ -136,13 +132,12 @@ protected: | |||
136 | void dealWithSchmooSchmaa(QWidget *); | 132 | void dealWithSchmooSchmaa(QWidget *); |
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(); |
147 | void QPEButtonPushed(); | 142 | void QPEButtonPushed(); |
148 | void upDir(); | 143 | void upDir(); |
@@ -163,13 +158,12 @@ protected slots: | |||
163 | bool moveDirectory( const QString & , const QString & ); | 158 | bool moveDirectory( const QString & , const QString & ); |
164 | // void slotSwitchtoLocal(int); | 159 | // void slotSwitchtoLocal(int); |
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 *); |
174 | void okRename(); | 168 | void okRename(); |
175 | void customDirsToMenu(); | 169 | void customDirsToMenu(); |
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 | |||
@@ -270,23 +270,24 @@ void AdvancedFm::initConnections() | |||
270 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), | 270 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), |
271 | this,SLOT( ListClicked(QListViewItem*)) ); | 271 | this,SLOT( ListClicked(QListViewItem*)) ); |
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))); |
291 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); | 292 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); |
292 | 293 | ||
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,10 +1,8 @@ | |||
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 |
9 | email : ljp@llornkcor.com | 7 | email : ljp@llornkcor.com |
10 | * This program is free software; you can redistribute it and/or modify * | 8 | * This program is free software; you can redistribute it and/or modify * |