summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp16
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp4
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp8
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
@@ -281,15 +281,15 @@ void AdvancedFm::refreshCurrentTab() {
}
void AdvancedFm::switchToLocalTab() {
TabWidget->setCurrentWidget(0);
- Local_View->setFocus();
+// Local_View->setFocus();
whichTab = 1;
}
void AdvancedFm::switchToRemoteTab() {
TabWidget->setCurrentWidget(1);
- Remote_View->setFocus();
+// Remote_View->setFocus();
whichTab = 2;
}
void AdvancedFm::currentPathComboChanged() {
@@ -380,11 +380,15 @@ void AdvancedFm::keyPressEvent( QKeyEvent *e) {
Q_UNUSED(e);
}
void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
- if( CurrentView()->hasFocus() )
- e->ignore();
- if( e->key() == Key_Left )
+// if( CurrentView()->hasFocus() )
+// e->ignore();
+ if( currentPathCombo->lineEdit()->hasFocus()) {
+// qDebug("shout!");
+ }
+
+ else if( e->key() == Key_Left )
upDir();
else if( e->key() == Key_Return || e->key() == Key_Enter)
navigateToSelected();
else if( e->key() == Key_Tab)
@@ -754,9 +758,9 @@ void AdvancedFm::setOtherTabCurrent() {
TabWidget->setCurrentWidget(1);
} else {
TabWidget->setCurrentWidget(0);
}
- OtherView()->setFocus();
+// OtherView()->setFocus();
OtherView()->setSelected( CurrentView()->firstChild(), true);
}
void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) {
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
@@ -127,17 +127,17 @@ void AdvancedFm::init() {
menuButton->setMaximumWidth( 20 );
menuButton->insertItem( s_addBookmark);
menuButton->insertItem( s_removeBookmark);
menuButton->insertSeparator();
- menuButton->setFocusPolicy(NoFocus);
+// menuButton->setFocusPolicy(NoFocus);
CBHB->addWidget( menuButton );
customDirsToMenu();
currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
currentPathCombo->setEditable(TRUE);
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
- currentPathCombo->setFocusPolicy(NoFocus);
+// currentPathCombo->setFocusPolicy(NoFocus);
CBHB->addWidget( currentPathCombo );
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
@@ -44,9 +44,9 @@ void AdvancedFm::doDirChange() {
} else {
if( pathItem.find(" -> ",0,TRUE) != -1)
pathItem = dealWithSymName((const QString&)pathItem)+"/";
// owarn << pathItem << oendl;
- gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
+ changeTo( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
}
}
void AdvancedFm::showMenuHidden() {
@@ -740,8 +740,9 @@ void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
}
bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
if ( o->inherits( "QLineEdit" ) ) {
+ qDebug("QLineEdit event");
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent *ke = (QKeyEvent*)e;
if ( ke->key() == Key_Return ||
ke->key() == Key_Enter ) {
@@ -757,9 +758,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
cancelRename();
return true;
}
}
- if ( o->inherits( "QListView" ) ) {
+/* if ( o->inherits( "QListView" ) ) {
if ( e->type() == QEvent::FocusIn ) {
// if( o == Local_View) { //keep track of which view
// qDebug("local view");
// whichTab = 1;
@@ -769,9 +770,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
// }
}
OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
}
-
+*/
return QWidget::eventFilter( o, e );
}
@@ -819,8 +820,9 @@ void AdvancedFm::renameIt() {
doRename( thisView );
}
void AdvancedFm::okRename() {
+ qDebug("okrename");
if( !renameBox) return;
QString newName = renameBox->text();
cancelRename();