summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-02-06 04:03:25 (UTC)
committer llornkcor <llornkcor>2005-02-06 04:03:25 (UTC)
commite23dd592fc71aa22c449363231eac2f8ebd2a45b (patch) (unidiff)
tree6944284c2632754357578581b564413f0fa09109
parentb09f9ce74d40f47bc336b4647c6c091a4f3bd5b6 (diff)
downloadopie-e23dd592fc71aa22c449363231eac2f8ebd2a45b.zip
opie-e23dd592fc71aa22c449363231eac2f8ebd2a45b.tar.gz
opie-e23dd592fc71aa22c449363231eac2f8ebd2a45b.tar.bz2
fix #1499 - rename working
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp38
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp3
2 files changed, 5 insertions, 36 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 8cc5d7b..56e3282 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -348,72 +348,40 @@ void AdvancedFm::QPEButtonPushed() {
348 348
349void AdvancedFm::doAbout() { 349void AdvancedFm::doAbout() {
350 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>")); 350 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>"));
351} 351}
352 352
353void AdvancedFm::keyPressEvent( QKeyEvent *e) { 353void AdvancedFm::keyPressEvent( QKeyEvent *e) {
354 Q_UNUSED(e); 354 Q_UNUSED(e);
355} 355}
356 356
357void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { 357void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
358// if( CurrentView()->hasFocus() ) 358// if( CurrentView()->hasFocus() )
359// e->ignore(); 359// e->ignore();
360 if( currentPathCombo->lineEdit()->hasFocus()) { 360
361 if( currentPathCombo->lineEdit()->hasFocus()) {
361 // qDebug("shout!"); 362 // qDebug("shout!");
362 } 363 }
363 364
364 else if( e->key() == Key_Left ) 365 else if( e->key() == Key_Left )
365 upDir(); 366 upDir();
366 else if( e->key() == Key_Return || e->key() == Key_Enter) 367 else if( e->key() == Key_Return || e->key() == Key_Enter)
367 navigateToSelected(); 368 navigateToSelected();
368 else if( e->key() == Key_Tab) 369 else if( e->key() == Key_Tab)
369 setOtherTabCurrent(); 370 setOtherTabCurrent();
370 else if( e->key() == Key_Delete ) 371 else if( e->key() == Key_Delete )
371 del(); 372 del();
372 else if( e->key() == Key_A)
373 copyAs();
374 else if( e->key() == Key_C)
375 copy();
376 else if( e->key() == Key_E)
377 runThis();
378 else if( e->key() == Key_G)
379 currentPathCombo->lineEdit()->setFocus();
380 else if( e->key() == Key_H )
381 showHidden();
382 else if( e->key() == Key_I)
383 fileStatus();
384 else if( e->key() == Key_M)
385 move();
386 else if( e->key() == Key_N )
387 mkDir();
388 else if( e->key() == Key_P)
389 filePerms();
390 else if( e->key() == Key_R )
391 rn();
392 else if( e->key() == Key_U )
393 upDir();
394 else if( e->key() == Key_1)
395 switchToLocalTab();
396 else if( e->key() == Key_2)
397 switchToRemoteTab();
398 else if( e->key() == Key_3)
399 CFButtonPushed();
400 else if( e->key() == Key_4)
401 SDButtonPushed();
402 else if( e->key() == Key_5 )
403 homeButtonPushed();
404 else if( e->key() == Key_6 )
405 docButtonPushed();
406 else 373 else
407 e->accept(); 374 e->accept();
375
408} 376}
409 377
410 378
411void AdvancedFm::parsetab(const QString &fileName) { 379void AdvancedFm::parsetab(const QString &fileName) {
412 380
413 fileSystemTypeList.clear(); 381 fileSystemTypeList.clear();
414 fsList.clear(); 382 fsList.clear();
415 struct mntent *me; 383 struct mntent *me;
416 FILE *mntfp = setmntent( fileName.latin1(), "r" ); 384 FILE *mntfp = setmntent( fileName.latin1(), "r" );
417 if ( mntfp ) { 385 if ( mntfp ) {
418 while ( (me = getmntent( mntfp )) != 0 ) { 386 while ( (me = getmntent( mntfp )) != 0 ) {
419 QString deviceName = me->mnt_fsname; 387 QString deviceName = me->mnt_fsname;
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 6abdc85..80324eb 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -856,18 +856,19 @@ void AdvancedFm::okRename() {
856 cancelRename(); 856 cancelRename();
857 QListView * view = CurrentView(); 857 QListView * view = CurrentView();
858 QString path = CurrentDir()->canonicalPath() + "/"; 858 QString path = CurrentDir()->canonicalPath() + "/";
859 oldName = path + oldName; 859 oldName = path + oldName;
860 newName = path + newName; 860 newName = path + newName;
861 if( rename( oldName.latin1(), newName.latin1())== -1) 861 if( rename( oldName.latin1(), newName.latin1())== -1)
862 QMessageBox::message(tr("Note"),tr("Could not rename")); 862 QMessageBox::message(tr("Note"),tr("Could not rename"));
863 else 863 else
864 oldName = ""; 864 oldName = "";
865 QListViewItem *item = view->currentItem(); 865 QListViewItem *item = view->currentItem();
866 view->takeItem( item ); 866 view->takeItem( item );
867 delete item; 867 delete item;
868 rePopulate(); 868 populateView();
869
869} 870}
870 871
871void AdvancedFm::openSearch() { 872void AdvancedFm::openSearch() {
872 QMessageBox::message(tr("Note"),tr("Not Yet Implemented")); 873 QMessageBox::message(tr("Note"),tr("Not Yet Implemented"));
873} 874}