summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-02-21 22:44:28 (UTC)
committer llornkcor <llornkcor>2003-02-21 22:44:28 (UTC)
commita7448ec87d97a0128618e83ad7526bd884ef8853 (patch) (unidiff)
tree0dda2db8da959c26d0ec089bec161ae28486d2cc
parentd48baa03492fd4785ca273defb4e21bf8c0d1c08 (diff)
downloadopie-a7448ec87d97a0128618e83ad7526bd884ef8853.zip
opie-a7448ec87d97a0128618e83ad7526bd884ef8853.tar.gz
opie-a7448ec87d97a0128618e83ad7526bd884ef8853.tar.bz2
fix rename cancel.. hehehe
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp34
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp26
2 files changed, 45 insertions, 15 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index c653b90..9edf7c1 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -69,2 +69,4 @@ AdvancedFm::AdvancedFm( )
69 init(); 69 init();
70 renameBox = 0;
71
70 initConnections(); 72 initConnections();
@@ -404,2 +406,10 @@ void AdvancedFm::localListPressed( int mouse, QListViewItem *, const QPoint& , i
404 case 1: 406 case 1:
407 {
408 if(renameBox != 0 )
409 {
410 qDebug("cancel rename");
411 cancelRename();
412 }
413
414 }
405 break; 415 break;
@@ -414,10 +424,17 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, in
414 424
415 switch (mouse) { 425 switch (mouse) {
416 case 1: 426 case 1:
417 break; 427 {
418 case 2: 428 if(renameBox != 0 )
419 menuTimer.start( 500, TRUE ); 429 {
420 qDebug("Start menu timer"); 430 qDebug("cancel rename");
421 break; 431 cancelRename();
422 }; 432 }
433 }
434 break;
435 case 2:
436 menuTimer.start( 500, TRUE );
437 qDebug("Start menu timer");
438 break;
439 };
423} 440}
@@ -881 +898,2 @@ void AdvancedFm::addToDocs() {
881} 898}
899
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index f067013..2ddcabc 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -1029,2 +1029,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
1029 } 1029 }
1030 if ( o->inherits( "QListView" ) ) {
1031 if ( e->type() == QEvent::FocusOut ) {
1032 printf("focusIn\n");
1033
1034 }
1035 }
1036
1030 return QWidget::eventFilter( o, e ); 1037 return QWidget::eventFilter( o, e );
@@ -1033,8 +1040,10 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
1033 1040
1034void AdvancedFm::cancelRename() { 1041void AdvancedFm::cancelRename()
1042{
1035 qDebug("cancel rename"); 1043 qDebug("cancel rename");
1036 QListView * view; 1044 QListView * view;
1037 if (TabWidget->getCurrentTab() == 0) { 1045 if (TabWidget->getCurrentTab() == 0)
1038 view = Local_View; 1046 {
1039 } 1047 view = Local_View;
1048 }
1040 else 1049 else
@@ -1053,3 +1062,4 @@ void AdvancedFm::cancelRename() {
1053 1062
1054void AdvancedFm::doRename(QListView * view) { 1063void AdvancedFm::doRename(QListView * view)
1064{
1055 1065
@@ -1077,3 +1087,4 @@ void AdvancedFm::doRename(QListView * view) {
1077 1087
1078void AdvancedFm::localRename() { 1088void AdvancedFm::localRename()
1089{
1079 oldName = Local_View->currentItem()->text(0); 1090 oldName = Local_View->currentItem()->text(0);
@@ -1090,3 +1101,4 @@ void AdvancedFm::remoteRename()
1090 1101
1091void AdvancedFm::okRename() { 1102void AdvancedFm::okRename()
1103{
1092 QString newName = renameBox->text(); 1104 QString newName = renameBox->text();