summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmData.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index d0de442..a120f35 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -3,24 +3,26 @@
-------------------
** Created: Mon 09-23-2002 13:24:11
copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "advancedfm.h"
#include <opie/otabwidget.h>
+#include <qpe/storage.h>
+
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qpe/menubutton.h>
#include <qlayout.h>
#include <qhbox.h>
#include <qmenubar.h>
#include <qcombobox.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
#include <qlistview.h>
@@ -74,24 +76,26 @@ void AdvancedFm::init() {
docButton->setPixmap(Resource::loadPixmap("DocsIcon"));
docButton->setAutoRaise( true );
menuBar->insertItem( docButton );
homeButton = new QToolButton( 0, "homeButton");
homeButton->setPixmap(Resource::loadPixmap("home"));
homeButton->setAutoRaise( true );
menuBar->insertItem( homeButton );
fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() ));
fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
fileMenu->insertSeparator();
+ fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() ));
+ fileMenu->insertSeparator();
fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() ));
fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() ));
fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() ));
fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() ));
fileMenu->insertSeparator();
fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() ));
fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() ));
fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() ));
fileMenu->setCheckable(TRUE);
viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
@@ -189,35 +193,43 @@ void AdvancedFm::init() {
QListView *fileTree;
fileTree = new QListView( tab_3, "tree" );
tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
TabWidget->insertTab( tab_3, tr( "Remote" ) );
*/
///////////////
+
struct utsname name; /* check for embedix kernel running on the zaurus*/
if (uname(&name) != -1) {
QString release=name.release;
if(release.find("embedix",0,TRUE) !=-1) {
zaurusDevice=TRUE;
} else {
zaurusDevice=FALSE;
- sdButton->hide();
}
}
+ if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) {
+ qDebug("not have sd");
+ sdButton->hide();
+ }
+ if( !StorageInfo::hasCf() ) {
+ qDebug("not have cf");
+ cfButton->hide();
+ }
currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentDir.setPath( QDir::currentDirPath());
currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentRemoteDir.setPath( QDir::currentDirPath());
b = TRUE;
filterStr="*";
b=FALSE;
TabWidget->setCurrentTab(0);
@@ -239,24 +251,25 @@ void AdvancedFm::initConnections()
connect( docButton,SIGNAL(released()),
this,SLOT( docButtonPushed()) );
connect( homeButton,SIGNAL(released()),
this,SLOT( homeButtonPushed()) );
connect( currentPathCombo, SIGNAL( activated( const QString & ) ),
this, SLOT( currentPathComboActivated( const QString & ) ) );
connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
this,SLOT(currentPathComboChanged()));
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*)));