author | zecke <zecke> | 2004-08-18 22:07:30 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-18 22:07:30 (UTC) |
commit | 50636a24f8ec2e603f1888a18dba044a1045bf0b (patch) (side-by-side diff) | |
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 | 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 @@ #include <fcntl.h> #include <sys/vfs.h> #include <mntent.h> using namespace Opie::Ui; -#ifdef NOQUICKLAUNCH -AdvancedFm::AdvancedFm( ) -#else AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) -#endif : QMainWindow( ) { init(); renameBox = 0; unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); @@ -256,15 +252,12 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in { if(renameBox != 0 ) { cancelRename(); } } break; - case 2: - menuTimer.start( 500, TRUE ); - break; }; } void AdvancedFm::switchToLocalTab() { //owarn << "switch to local view" << oendl; @@ -603,18 +596,12 @@ void AdvancedFm::showFileMenu() { m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); if(m) delete m; } -void AdvancedFm::cancelMenuTimer() { - - if( menuTimer.isActive() ) - menuTimer.stop(); -} - QString AdvancedFm::checkDiskSpace(const QString &path) { struct statfs fss; if ( !statfs( path.latin1(), &fss ) ) { int blkSize = fss.f_bsize; // int totalBlks = fs.f_blocks; 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; class AdvancedFm : public QMainWindow { Q_OBJECT public: static QString appName() { return QString::fromLatin1("advancedfm"); } -#ifdef NOQUICKLAUNCH - AdvancedFm(); -#else AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); -#endif ~AdvancedFm(); protected slots: void slotSwitchMenu(int); void selectAll(); void addToDocs(); void doDirChange(); @@ -136,13 +132,12 @@ protected: void dealWithSchmooSchmaa(QWidget *); protected slots: void openSearch(); void dirMenuSelected(int); void showFileMenu(); - void cancelMenuTimer(); void homeButtonPushed(); void docButtonPushed(); void SDButtonPushed(); void CFButtonPushed(); void QPEButtonPushed(); void upDir(); @@ -163,13 +158,12 @@ protected slots: bool moveDirectory( const QString & , const QString & ); // void slotSwitchtoLocal(int); private: MenuButton *menuButton; QString oldName; - QTimer menuTimer; void startProcess(const QString &); bool eventFilter( QObject * , QEvent * ); void cancelRename(); void doRename(QListView *); void okRename(); 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() connect( Local_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); - connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); - connect( Remote_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); connect( TabWidget,SIGNAL(currentChanged(QWidget*)), this,SLOT(tabChanged(QWidget*))); - connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); + connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), + this, SLOT(showFileMenu())); + connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), + this, SLOT(showFileMenu())); connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(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,10 +1,8 @@ /*************************************************************************** -using namespace Opie::Core; -using namespace Opie::Core; main.cpp - description ------------------- begin : March 10, 2002 copyright : (C) 2002 by llornkcor email : ljp@llornkcor.com * This program is free software; you can redistribute it and/or modify * |