-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 8 |
3 files changed, 17 insertions, 11 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 3cd2067..8d07f69 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -282,13 +282,13 @@ void AdvancedFm::refreshCurrentTab() { | |||
282 | 282 | ||
283 | void AdvancedFm::switchToLocalTab() { | 283 | void AdvancedFm::switchToLocalTab() { |
284 | TabWidget->setCurrentWidget(0); | 284 | TabWidget->setCurrentWidget(0); |
285 | Local_View->setFocus(); | 285 | // Local_View->setFocus(); |
286 | whichTab = 1; | 286 | whichTab = 1; |
287 | } | 287 | } |
288 | 288 | ||
289 | void AdvancedFm::switchToRemoteTab() { | 289 | void AdvancedFm::switchToRemoteTab() { |
290 | TabWidget->setCurrentWidget(1); | 290 | TabWidget->setCurrentWidget(1); |
291 | Remote_View->setFocus(); | 291 | // Remote_View->setFocus(); |
292 | whichTab = 2; | 292 | whichTab = 2; |
293 | } | 293 | } |
294 | 294 | ||
@@ -381,9 +381,13 @@ void AdvancedFm::keyPressEvent( QKeyEvent *e) { | |||
381 | } | 381 | } |
382 | 382 | ||
383 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { | 383 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { |
384 | if( CurrentView()->hasFocus() ) | 384 | // if( CurrentView()->hasFocus() ) |
385 | e->ignore(); | 385 | // e->ignore(); |
386 | if( e->key() == Key_Left ) | 386 | if( currentPathCombo->lineEdit()->hasFocus()) { |
387 | // qDebug("shout!"); | ||
388 | } | ||
389 | |||
390 | else if( e->key() == Key_Left ) | ||
387 | upDir(); | 391 | upDir(); |
388 | else if( e->key() == Key_Return || e->key() == Key_Enter) | 392 | else if( e->key() == Key_Return || e->key() == Key_Enter) |
389 | navigateToSelected(); | 393 | navigateToSelected(); |
@@ -755,7 +759,7 @@ void AdvancedFm::setOtherTabCurrent() { | |||
755 | } else { | 759 | } else { |
756 | TabWidget->setCurrentWidget(0); | 760 | TabWidget->setCurrentWidget(0); |
757 | } | 761 | } |
758 | OtherView()->setFocus(); | 762 | // OtherView()->setFocus(); |
759 | OtherView()->setSelected( CurrentView()->firstChild(), true); | 763 | OtherView()->setSelected( CurrentView()->firstChild(), true); |
760 | } | 764 | } |
761 | 765 | ||
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index d2e1d8e..fe565a0 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -128,7 +128,7 @@ void AdvancedFm::init() { | |||
128 | menuButton->insertItem( s_addBookmark); | 128 | menuButton->insertItem( s_addBookmark); |
129 | menuButton->insertItem( s_removeBookmark); | 129 | menuButton->insertItem( s_removeBookmark); |
130 | menuButton->insertSeparator(); | 130 | menuButton->insertSeparator(); |
131 | menuButton->setFocusPolicy(NoFocus); | 131 | // menuButton->setFocusPolicy(NoFocus); |
132 | CBHB->addWidget( menuButton ); | 132 | CBHB->addWidget( menuButton ); |
133 | 133 | ||
134 | customDirsToMenu(); | 134 | customDirsToMenu(); |
@@ -136,7 +136,7 @@ void AdvancedFm::init() { | |||
136 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 136 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
137 | currentPathCombo->setEditable(TRUE); | 137 | currentPathCombo->setEditable(TRUE); |
138 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 138 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
139 | currentPathCombo->setFocusPolicy(NoFocus); | 139 | // currentPathCombo->setFocusPolicy(NoFocus); |
140 | CBHB->addWidget( currentPathCombo ); | 140 | CBHB->addWidget( currentPathCombo ); |
141 | 141 | ||
142 | layout->addLayout( CBHB ); | 142 | layout->addLayout( CBHB ); |
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 5a46579..2e6b0da 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -45,7 +45,7 @@ void AdvancedFm::doDirChange() { | |||
45 | if( pathItem.find(" -> ",0,TRUE) != -1) | 45 | if( pathItem.find(" -> ",0,TRUE) != -1) |
46 | pathItem = dealWithSymName((const QString&)pathItem)+"/"; | 46 | pathItem = dealWithSymName((const QString&)pathItem)+"/"; |
47 | // owarn << pathItem << oendl; | 47 | // owarn << pathItem << oendl; |
48 | gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); | 48 | changeTo( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); |
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
@@ -741,6 +741,7 @@ void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { | |||
741 | 741 | ||
742 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | 742 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { |
743 | if ( o->inherits( "QLineEdit" ) ) { | 743 | if ( o->inherits( "QLineEdit" ) ) { |
744 | qDebug("QLineEdit event"); | ||
744 | if ( e->type() == QEvent::KeyPress ) { | 745 | if ( e->type() == QEvent::KeyPress ) { |
745 | QKeyEvent *ke = (QKeyEvent*)e; | 746 | QKeyEvent *ke = (QKeyEvent*)e; |
746 | if ( ke->key() == Key_Return || | 747 | if ( ke->key() == Key_Return || |
@@ -758,7 +759,7 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | |||
758 | return true; | 759 | return true; |
759 | } | 760 | } |
760 | } | 761 | } |
761 | if ( o->inherits( "QListView" ) ) { | 762 | /* if ( o->inherits( "QListView" ) ) { |
762 | if ( e->type() == QEvent::FocusIn ) { | 763 | if ( e->type() == QEvent::FocusIn ) { |
763 | // if( o == Local_View) { //keep track of which view | 764 | // if( o == Local_View) { //keep track of which view |
764 | // qDebug("local view"); | 765 | // qDebug("local view"); |
@@ -770,7 +771,7 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | |||
770 | } | 771 | } |
771 | OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection | 772 | OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection |
772 | } | 773 | } |
773 | 774 | */ | |
774 | return QWidget::eventFilter( o, e ); | 775 | return QWidget::eventFilter( o, e ); |
775 | } | 776 | } |
776 | 777 | ||
@@ -820,6 +821,7 @@ void AdvancedFm::renameIt() { | |||
820 | } | 821 | } |
821 | 822 | ||
822 | void AdvancedFm::okRename() { | 823 | void AdvancedFm::okRename() { |
824 | qDebug("okrename"); | ||
823 | if( !renameBox) return; | 825 | if( !renameBox) return; |
824 | 826 | ||
825 | QString newName = renameBox->text(); | 827 | QString newName = renameBox->text(); |