summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-25 04:51:30 (UTC)
committer llornkcor <llornkcor>2004-09-25 04:51:30 (UTC)
commit688bd5382ab60c2146050fc2ff36850ef08a79b9 (patch) (side-by-side diff)
treef75ea4fa42dadffcae08cc9d2e73ceca710c6feb
parent4eab17fb1381c938188e13ec5025b8302b159c9e (diff)
downloadopie-688bd5382ab60c2146050fc2ff36850ef08a79b9.zip
opie-688bd5382ab60c2146050fc2ff36850ef08a79b9.tar.gz
opie-688bd5382ab60c2146050fc2ff36850ef08a79b9.tar.bz2
move kerypress to keyrelease
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 73d0d57..48332b7 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -353,99 +353,101 @@ void AdvancedFm::homeButtonPushed() {
changeTo(QDir::homeDirPath());
}
void AdvancedFm::docButtonPushed() {
changeTo(QPEApplication::documentDir());
}
void AdvancedFm::SDButtonPushed() {
changeTo("/mnt/card");// this can change so fix
}
void AdvancedFm::CFButtonPushed() {
if(zaurusDevice)
changeTo("/mnt/cf"); //zaurus
else
changeTo("/mnt/hda"); //ipaq
}
void AdvancedFm::doAbout() {
QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>"));
}
void AdvancedFm::keyPressEvent( QKeyEvent *e) {
+ qDebug("keypressevent");
+}
+
+void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
+ qDebug("key release");
+ if( CurrentView()->hasFocus() )
+ e->ignore();
if( e->key() == Key_Left )
upDir();
else if( e->key() == Key_Return || e->key() == Key_Enter)
navigateToSelected();
else if( e->key() == Key_Tab)
setOtherTabCurrent();
else if( e->key() == Key_Delete )
del();
else if( e->key() == Key_A)
copyAs();
else if( e->key() == Key_C)
copy();
else if( e->key() == Key_E)
runThis();
else if( e->key() == Key_G)
currentPathCombo->lineEdit()->setFocus();
else if( e->key() == Key_H )
showHidden();
else if( e->key() == Key_I)
fileStatus();
else if( e->key() == Key_M)
move();
else if( e->key() == Key_N )
mkDir();
else if( e->key() == Key_P)
filePerms();
else if( e->key() == Key_R )
rn();
else if( e->key() == Key_U )
upDir();
else if( e->key() == Key_1)
switchToLocalTab();
else if( e->key() == Key_2)
switchToRemoteTab();
else if( e->key() == Key_3)
CFButtonPushed();
else if( e->key() == Key_4)
SDButtonPushed();
else if( e->key() == Key_5 )
homeButtonPushed();
else if( e->key() == Key_6 )
docButtonPushed();
else
e->accept();
}
-void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
- if( CurrentView()->hasFocus() )
- e->ignore();
-}
-
void AdvancedFm::QPEButtonPushed() {
QString current = QPEApplication::qpeDir();
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::parsetab(const QString &fileName) {
fileSystemTypeList.clear();
fsList.clear();
struct mntent *me;
FILE *mntfp = setmntent( fileName.latin1(), "r" );
if ( mntfp ) {
while ( (me = getmntent( mntfp )) != 0 ) {
QString deviceName = me->mnt_fsname;
QString filesystemType = me->mnt_type;
QString mountDir = me->mnt_dir;
if(deviceName != "none") {
if( fsList.contains(filesystemType) == 0
& filesystemType.find("proc",0,TRUE) == -1
& filesystemType.find("cramfs",0,TRUE) == -1