summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
authorzecke <zecke>2004-08-18 22:07:30 (UTC)
committer zecke <zecke>2004-08-18 22:07:30 (UTC)
commit50636a24f8ec2e603f1888a18dba044a1045bf0b (patch) (side-by-side diff)
tree9f69140b2449aaefe263e7acab3b6b147c7fadf7 /noncore/apps/advancedfm
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 (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp57
-rw-r--r--noncore/apps/advancedfm/advancedfm.h8
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp15
-rw-r--r--noncore/apps/advancedfm/main.cpp2
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;
-#ifdef NOQUICKLAUNCH
-AdvancedFm::AdvancedFm( )
-#else
AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
-#endif
: QMainWindow( ) {
@@ -73,3 +69,3 @@ void AdvancedFm::cleanUp() {
void AdvancedFm::tabChanged(QWidget *) {
-// owarn << "tab changed" << oendl;
+// owarn << "tab changed" << oendl;
QString path = CurrentDir()->canonicalPath();
@@ -95,3 +91,3 @@ void AdvancedFm::populateView() {
-// owarn << "PopulateView" << oendl;
+// owarn << "PopulateView" << oendl;
QPixmap pm;
@@ -101,3 +97,3 @@ void AdvancedFm::populateView() {
-//owarn << "path is "+path << oendl;
+//owarn << "path is "+path << oendl;
thisView->clear();
@@ -162,3 +158,3 @@ void AdvancedFm::populateView() {
if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) {
- // odebug << " overlay link image" << oendl;
+ // odebug << " overlay link image" << oendl;
pm= Resource::loadPixmap( "advancedfm/symlink" );
@@ -186,3 +182,3 @@ void AdvancedFm::populateView() {
lstat( mydirent->d_name, &buf);
-// odebug << mydirent->d_name << oendl;
+// odebug << mydirent->d_name << oendl;
fileL.sprintf("%s", mydirent->d_name);
@@ -211,3 +207,3 @@ void AdvancedFm::rePopulate() {
// int tmpTab = whichTab;
-// // odebug << "" << tmpTab << "" << oendl;
+// // odebug << "" << tmpTab << "" << oendl;
@@ -221,6 +217,6 @@ void AdvancedFm::rePopulate() {
void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
-//owarn << "listclicked" << oendl;
+//owarn << "listclicked" << oendl;
if(selectedItem) {
QString strItem=selectedItem->text(0);
-// owarn << strItem << oendl;
+// owarn << strItem << oendl;
QString strSize=selectedItem->text(1);
@@ -261,5 +257,2 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
break;
- case 2:
- menuTimer.start( 500, TRUE );
- break;
};
@@ -269,3 +262,3 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
void AdvancedFm::switchToLocalTab() {
-//owarn << "switch to local view" << oendl;
+//owarn << "switch to local view" << oendl;
TabWidget->setCurrentWidget(0);
@@ -275,3 +268,3 @@ void AdvancedFm::switchToLocalTab() {
void AdvancedFm::switchToRemoteTab() {
-//owarn << "switch to local view" << oendl;
+//owarn << "switch to local view" << oendl;
TabWidget->setCurrentWidget(1);
@@ -331,3 +324,3 @@ QStringList AdvancedFm::getPath() {
strList << it.current()->text(0);
-// odebug << it.current()->text(0) << oendl;
+// odebug << it.current()->text(0) << oendl;
}
@@ -382,3 +375,3 @@ void AdvancedFm::doAbout() {
void AdvancedFm::keyPressEvent( QKeyEvent *e) {
-// owarn << "key " << e->key() << "" << oendl;
+// owarn << "key " << e->key() << "" << oendl;
// if( CurrentView()->hasFocus() )
@@ -608,8 +601,2 @@ void AdvancedFm::showFileMenu() {
-void AdvancedFm::cancelMenuTimer() {
-
- if( menuTimer.isActive() )
- menuTimer.stop();
-}
-
QString AdvancedFm::checkDiskSpace(const QString &path) {
@@ -640,3 +627,3 @@ void AdvancedFm::addToDocs() {
curFile = thisDir->canonicalPath()+"/"+(*it);
-// odebug << curFile << oendl;
+// odebug << curFile << oendl;
QFileInfo fi(curFile);
@@ -713,3 +700,3 @@ void AdvancedFm::addCustomDir() {
void AdvancedFm::removeCustomDir() {
-// odebug << "remove custom dir" << oendl;
+// odebug << "remove custom dir" << oendl;
Config cfg("AdvancedFm");
@@ -748,3 +735,3 @@ void AdvancedFm::removeCustomDir() {
void AdvancedFm::gotoCustomDir(const QString &dir) {
-// odebug << "gotoCustomDir(const QString &dir) " +dir << oendl;
+// odebug << "gotoCustomDir(const QString &dir) " +dir << oendl;
// QString curDir = dir;
@@ -789,6 +776,6 @@ QListView * AdvancedFm::CurrentView() {
if ( whichTab == 1) {
-// owarn << "CurrentView Tab 1" << oendl;
+// owarn << "CurrentView Tab 1" << oendl;
return Local_View;
} else {
-// owarn << "CurrentView Tab 2" << oendl;
+// owarn << "CurrentView Tab 2" << oendl;
return Remote_View;
@@ -805,3 +792,3 @@ QListView * AdvancedFm::OtherView() {
void AdvancedFm::setOtherTabCurrent() {
-// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl;
+// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl;
if ( whichTab == 1) {
@@ -816,6 +803,6 @@ void AdvancedFm::setOtherTabCurrent() {
void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) {
-// odebug << "qcop message "+msg << oendl;
+// odebug << "qcop message "+msg << oendl;
QDataStream stream ( data, IO_ReadOnly );
if ( msg == "openDirectory(QString)" ) {
-// odebug << "received" << oendl;
+// odebug << "received" << oendl;
QString file;
@@ -832,3 +819,3 @@ void AdvancedFm::setDocument(const QString &file) {
void AdvancedFm::gotoDirectory(const QString &file) {
-// owarn << "goto dir "+file << oendl;
+// owarn << "goto dir "+file << oendl;
QString curDir = file;
@@ -868,3 +855,3 @@ void AdvancedFm::findFile(const QString &fileName) {
void AdvancedFm::slotSwitchMenu(int ) {
-// odebug << "Switch " << item << "" << oendl;
+// odebug << "Switch " << item << "" << oendl;
// 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:
static QString appName() { return QString::fromLatin1("advancedfm"); }
-#ifdef NOQUICKLAUNCH
- AdvancedFm();
-#else
AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0);
-#endif
~AdvancedFm();
@@ -140,4 +136,3 @@ protected slots:
void dirMenuSelected(int);
- void showFileMenu();
- void cancelMenuTimer();
+ void showFileMenu();
void homeButtonPushed();
@@ -168,3 +163,2 @@ private:
QString oldName;
- QTimer menuTimer;
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() {
- QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
+ QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold);
@@ -187,3 +187,3 @@ void AdvancedFm::init() {
- QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
+ QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold);
@@ -225,3 +225,3 @@ void AdvancedFm::init() {
if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) {
- odebug << "not have sd" << oendl;
+ odebug << "not have sd" << oendl;
sdButton->hide();
@@ -229,3 +229,3 @@ void AdvancedFm::init() {
if( !StorageInfo::hasCf() ) {
- odebug << "not have cf" << oendl;
+ odebug << "not have cf" << oendl;
cfButton->hide();
@@ -275,4 +275,2 @@ void AdvancedFm::initConnections()
- connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
-
connect( Remote_View, SIGNAL( clicked(QListViewItem*)),
@@ -285,3 +283,6 @@ void AdvancedFm::initConnections()
- 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()));
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 @@
/***************************************************************************
-using namespace Opie::Core;
-using namespace Opie::Core;
main.cpp - description