summaryrefslogtreecommitdiff
authorzecke <zecke>2004-08-18 22:07:30 (UTC)
committer zecke <zecke>2004-08-18 22:07:30 (UTC)
commit50636a24f8ec2e603f1888a18dba044a1045bf0b (patch) (unidiff)
tree9f69140b2449aaefe263e7acab3b6b147c7fadf7
parenteb0a70826bc77c8b4008bd0444218da7612d32a9 (diff)
downloadopie-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
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp13
-rw-r--r--noncore/apps/advancedfm/advancedfm.h6
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp7
-rw-r--r--noncore/apps/advancedfm/main.cpp2
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
@@ -34,13 +34,9 @@
34#include <mntent.h> 34#include <mntent.h>
35 35
36using namespace Opie::Ui; 36using namespace Opie::Ui;
37 37
38#ifdef NOQUICKLAUNCH
39AdvancedFm::AdvancedFm( )
40#else
41AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) 38AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
42#endif
43 : QMainWindow( ) { 39 : QMainWindow( ) {
44 init(); 40 init();
45 renameBox = 0; 41 renameBox = 0;
46 42
@@ -258,11 +254,8 @@ 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
@@ -605,14 +598,8 @@ void AdvancedFm::showFileMenu() {
605 if(m) delete m; 598 if(m) delete m;
606} 599}
607 600
608 601
609void AdvancedFm::cancelMenuTimer() {
610
611 if( menuTimer.isActive() )
612 menuTimer.stop();
613}
614
615QString AdvancedFm::checkDiskSpace(const QString &path) { 602QString 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;
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
56public: 56public:
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();
64protected slots: 60protected slots:
65 void slotSwitchMenu(int); 61 void slotSwitchMenu(int);
66 void selectAll(); 62 void selectAll();
@@ -138,9 +134,8 @@ protected:
138protected slots: 134protected 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
166private: 161private:
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
@@ -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/***************************************************************************
3using namespace Opie::Core;
4using 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