From 88435a3192f09453e035a7f1cf73bbc8c24245c9 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sat, 16 Nov 2002 15:30:56 +0000 Subject: fix tab switches, and inputdialog focus on edit --- (limited to 'noncore/apps') diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 23244a2..92804b2 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -87,27 +87,31 @@ void AdvancedFm::cleanUp() { file.remove(); } -void AdvancedFm::tabChanged(QWidget *) { - if (TabWidget->getCurrentTab() == 0) { +void AdvancedFm::tabChanged(QWidget *w) { + qDebug("tab changed %d",TabWidget->getCurrentTab()); + + if ( w == tab) { +// if (TabWidget->getCurrentTab() == 0) { // if (TabWidget->currentPageIndex() == 0) { - currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); - viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); - viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); - QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); - setCaption("AdvancedFm :: "+fs+" :: " - +checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); + currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); + viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); + viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); + QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); + setCaption("AdvancedFm :: "+fs+" :: " + +checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); - } - if (TabWidget->getCurrentTab() == 1) { + } + if ( w == tab_2) { +// if (TabWidget->getCurrentTab() == 1) { // if (TabWidget->currentPageIndex() == 1) { - currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); - viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); - viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); - QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); - setCaption("AdvancedFm :: "+fs+" :: " - +checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); - } + currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); + viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); + viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); + QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); + setCaption("AdvancedFm :: "+fs+" :: " + +checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); + } } diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 946d038..a60cea6 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp @@ -265,6 +265,8 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags LineEdit1 = new QLineEdit( this, "LineEdit1" ); LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); + LineEdit1->setFocus(); + LineEdit1->setFocus(); connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(returned() )); } -- cgit v0.9.0.2